結果

問題 No.1613 Rush and Remove
ユーザー ayaoniayaoni
提出日時 2021-07-21 22:11:13
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 50 ms / 2,000 ms
コード長 762 bytes
コンパイル時間 163 ms
コンパイル使用メモリ 82,296 KB
実行使用メモリ 62,548 KB
最終ジャッジ日時 2024-07-17 18:53:45
合計ジャッジ時間 3,139 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 37 ms
52,736 KB
testcase_01 AC 39 ms
53,484 KB
testcase_02 AC 40 ms
53,428 KB
testcase_03 AC 39 ms
52,876 KB
testcase_04 AC 41 ms
53,160 KB
testcase_05 AC 38 ms
52,884 KB
testcase_06 AC 38 ms
53,136 KB
testcase_07 AC 38 ms
53,200 KB
testcase_08 AC 39 ms
53,480 KB
testcase_09 AC 47 ms
62,548 KB
testcase_10 AC 50 ms
61,800 KB
testcase_11 AC 48 ms
61,780 KB
testcase_12 AC 48 ms
61,308 KB
testcase_13 AC 46 ms
62,500 KB
testcase_14 AC 47 ms
61,660 KB
testcase_15 AC 47 ms
61,860 KB
testcase_16 AC 46 ms
62,036 KB
testcase_17 AC 48 ms
61,296 KB
testcase_18 AC 42 ms
59,244 KB
testcase_19 AC 43 ms
60,516 KB
testcase_20 AC 43 ms
60,608 KB
testcase_21 AC 43 ms
59,256 KB
testcase_22 AC 43 ms
60,412 KB
testcase_23 AC 42 ms
59,032 KB
testcase_24 AC 42 ms
59,524 KB
testcase_25 AC 42 ms
59,824 KB
testcase_26 AC 43 ms
58,904 KB
testcase_27 AC 37 ms
52,340 KB
testcase_28 AC 38 ms
53,828 KB
testcase_29 AC 37 ms
52,832 KB
testcase_30 AC 37 ms
52,068 KB
testcase_31 AC 37 ms
53,624 KB
testcase_32 AC 37 ms
52,216 KB
testcase_33 AC 38 ms
52,872 KB
testcase_34 AC 38 ms
52,316 KB
testcase_35 AC 37 ms
53,604 KB
testcase_36 AC 38 ms
52,608 KB
testcase_37 AC 37 ms
52,192 KB
testcase_38 AC 38 ms
53,744 KB
testcase_39 AC 38 ms
53,996 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys

sys.setrecursionlimit(10**7)
def I(): return int(sys.stdin.readline().rstrip())
def MI(): return map(int,sys.stdin.readline().rstrip().split())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def LI2(): return list(map(int,sys.stdin.readline().rstrip()))
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip().split())
def LS2(): return list(sys.stdin.readline().rstrip())


H,W = MI()
B = [S() for _ in range(H)]

grundy = 0
for j in range(W):
    g = 0
    for i in range(H):
        if B[i][j] == 'o':
            if i % 2 == 0:
                g += 1
            else:
                g -= 1
    g %= 3
    grundy ^= g

if grundy == 0:
    print('Second')
else:
    print('First')
0