結果

問題 No.1613 Rush and Remove
ユーザー yudedakoyudedako
提出日時 2022-03-01 16:06:04
言語 Scala(Beta)
(3.4.0)
結果
AC  
実行時間 1,037 ms / 2,000 ms
コード長 627 bytes
コンパイル時間 10,814 ms
コンパイル使用メモリ 261,284 KB
実行使用メモリ 63,240 KB
最終ジャッジ日時 2023-09-22 05:53:16
合計ジャッジ時間 51,022 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 923 ms
62,220 KB
testcase_01 AC 914 ms
62,276 KB
testcase_02 AC 911 ms
62,260 KB
testcase_03 AC 925 ms
62,160 KB
testcase_04 AC 913 ms
61,960 KB
testcase_05 AC 911 ms
62,280 KB
testcase_06 AC 931 ms
62,360 KB
testcase_07 AC 912 ms
62,412 KB
testcase_08 AC 912 ms
62,116 KB
testcase_09 AC 991 ms
62,368 KB
testcase_10 AC 998 ms
62,340 KB
testcase_11 AC 998 ms
62,540 KB
testcase_12 AC 993 ms
62,272 KB
testcase_13 AC 986 ms
62,540 KB
testcase_14 AC 985 ms
62,604 KB
testcase_15 AC 1,037 ms
62,212 KB
testcase_16 AC 986 ms
62,236 KB
testcase_17 AC 973 ms
62,356 KB
testcase_18 AC 916 ms
63,240 KB
testcase_19 AC 914 ms
62,212 KB
testcase_20 AC 914 ms
61,996 KB
testcase_21 AC 910 ms
62,244 KB
testcase_22 AC 908 ms
62,264 KB
testcase_23 AC 898 ms
62,176 KB
testcase_24 AC 899 ms
62,204 KB
testcase_25 AC 900 ms
62,100 KB
testcase_26 AC 911 ms
62,252 KB
testcase_27 AC 911 ms
62,276 KB
testcase_28 AC 907 ms
62,472 KB
testcase_29 AC 908 ms
62,328 KB
testcase_30 AC 907 ms
62,004 KB
testcase_31 AC 909 ms
62,104 KB
testcase_32 AC 908 ms
62,272 KB
testcase_33 AC 910 ms
62,128 KB
testcase_34 AC 896 ms
62,484 KB
testcase_35 AC 902 ms
62,140 KB
testcase_36 AC 897 ms
62,240 KB
testcase_37 AC 899 ms
62,224 KB
testcase_38 AC 906 ms
62,316 KB
testcase_39 AC 910 ms
62,248 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.PrintWriter
import scala.collection.mutable.*
import scala.io.StdIn.*
import scala.util.chaining.*
import scala.math.*
import scala.reflect.ClassTag
import scala.util.*
import scala.annotation.tailrec
import scala.collection.mutable


@main def main =
  val Array(height, width) = readLine.split(' ').map(_.toInt)
  val state = Array.fill(height){readLine}
  var result = 0
  for j <- 0 until width do
    var rest = 0
    for i <- height - 1 to 0 by -1 do
      rest = ((rest << 1) + (if state(i)(j) == 'o' then 1 else 0)) % 3
    result ^= rest
  println{
    if result == 0 then "Second"
    else "First"
  }
0