Submission #3969153


Source Code Expand

structure A2 = Array2
structure C  = Char
structure CV = CharVector
structure I  = Int
structure L  = List
structure SC = StringCvt
structure T  = TextIO
structure V  = Vector

fun scan rdr strm = SOME (SC.splitl (not o C.isSpace) rdr (SC.skipWS rdr strm))

fun next () = valOf (T.scanStream scan T.stdIn)

fun nextInt () = valOf (T.scanStream (I.scan SC.DEC) T.stdIn)

val () =
    let
        val N = nextInt ()
        val ary = A2.fromList (L.tabulate (N, fn _ => explode (next ())))
        val ary' = A2.tabulate A2.RowMajor
                               (N, N, fn (i, j) => A2.sub (ary, N - j - 1, i))
        val i = ref 0
    in
        while !i < N do (
            let
                val vec = A2.row (ary', !i)
            in
                print (CV.tabulate (N, fn m => V.sub (vec, m)) ^ "\n")
            end;
            i := !i + 1)
    end

Submission Info

Submission Time
Task B - 回転
User masquerade0324
Language Standard ML (MLton 20100608)
Score 100
Code Size 892 Byte
Status AC
Exec Time 1 ms
Memory 512 KB

Judge Result

Set Name All
Score / Max Score 100 / 100
Status
AC × 11
Set Name Test Cases
All 000.txt, 001.txt, 002.txt, 003.txt, 004.txt, 005.txt, 006.txt, 007.txt, 008.txt, 009.txt, 010.txt
Case Name Status Exec Time Memory
000.txt AC 1 ms 256 KB
001.txt AC 1 ms 256 KB
002.txt AC 1 ms 512 KB
003.txt AC 1 ms 256 KB
004.txt AC 1 ms 512 KB
005.txt AC 1 ms 256 KB
006.txt AC 1 ms 512 KB
007.txt AC 1 ms 256 KB
008.txt AC 1 ms 512 KB
009.txt AC 1 ms 256 KB
010.txt AC 1 ms 512 KB