結果
問題 | No.2476 Knight Game |
ユーザー | 👑 p-adic |
提出日時 | 2023-09-18 19:06:36 |
言語 | Python3 (3.12.2 + numpy 1.26.4 + scipy 1.12.0) |
結果 |
AC
|
実行時間 | 1,580 ms / 2,000 ms |
コード長 | 266 bytes |
コンパイル時間 | 312 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 10,880 KB |
最終ジャッジ日時 | 2024-07-05 08:54:33 |
合計ジャッジ時間 | 9,166 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 29 ms
10,752 KB |
testcase_01 | AC | 1,503 ms
10,752 KB |
testcase_02 | AC | 1,502 ms
10,880 KB |
testcase_03 | AC | 1,482 ms
10,752 KB |
testcase_04 | AC | 1,580 ms
10,752 KB |
testcase_05 | AC | 1,533 ms
10,752 KB |
コンパイルメッセージ
Main.py:4: SyntaxWarning: invalid decimal literal print(["Bob","Alice"][(H==2and(W%4<1or(y-1)//2%2+(W-y)//2%2)or H==3<W and W%2<1or H==4or H>4 and H*W%2<1or H>2and(x+y)%2or H==W==3and(x==y==2)<1or H==3==W-2and x!=2and y==3)>0]) Main.py:4: SyntaxWarning: invalid decimal literal print(["Bob","Alice"][(H==2and(W%4<1or(y-1)//2%2+(W-y)//2%2)or H==3<W and W%2<1or H==4or H>4 and H*W%2<1or H>2and(x+y)%2or H==W==3and(x==y==2)<1or H==3==W-2and x!=2and y==3)>0]) Main.py:4: SyntaxWarning: invalid decimal literal print(["Bob","Alice"][(H==2and(W%4<1or(y-1)//2%2+(W-y)//2%2)or H==3<W and W%2<1or H==4or H>4 and H*W%2<1or H>2and(x+y)%2or H==W==3and(x==y==2)<1or H==3==W-2and x!=2and y==3)>0]) Main.py:4: SyntaxWarning: invalid decimal literal print(["Bob","Alice"][(H==2and(W%4<1or(y-1)//2%2+(W-y)//2%2)or H==3<W and W%2<1or H==4or H>4 and H*W%2<1or H>2and(x+y)%2or H==W==3and(x==y==2)<1or H==3==W-2and x!=2and y==3)>0]) Main.py:4: SyntaxWarning: invalid decimal literal print(["Bob","Alice"][(H==2and(W%4<1or(y-1)//2%2+(W-y)//2%2)or H==3<W and W%2<1or H==4or H>4 and H*W%2<1or H>2and(x+y)%2or H==W==3and(x==y==2)<1or H==3==W-2and x!=2and y==3)>0]) Main.py:4: SyntaxWarning: invalid decimal literal print(["Bob","Alice"][(H==2and(W%4<1or(y-1)//2%2+(W-y)//2%2)or H==3<W and W%2<1or H==4or H>4 and H*W%2<1or H>2and(x+y)%2or H==W==3and(x==y==2)<1or H==3==W-2and x!=2and y==3)>0]) Main.py:4: SyntaxWarning: invalid decimal literal print(["Bob","Alice"][(H==2and(W%4<1or(y-1)//2%2+(W-y)//2%2)or H==3<W and W%2<1or H==4or H>4 and H*W%2<1or H>2and(x+y)%2or H==W==3and(x==y==2)<1or H==3==W-2and x!=2and y==3)>0]) Main.py:4: SyntaxWarning: invalid decimal literal print(["Bob","Alice"][(H==2and(W%4<1or(y-1)//2%2+(W-y)//2%2)or H==3<W and W%2<1or H==4or H>4 and H*W%2<1or H>2and(x+y)%2or H==W==3and(x==y==2)<1or H==3==W-2and x!=2and y==3)>0]) Main.py:4: SyntaxWarning: invalid decimal literal print(["Bob","Alice"][(H==2and(W%4<1or(y-1)//2%2+(W-y)//2%2)or H==3<W and W%2<1or H==4or H>4 and H*W%2<1or H
ソースコード
for t in range(int(input())): H,W,x,y=map(int,input().split()) if H>W:H,W,x,y=W,H,y,x print(["Bob","Alice"][(H==2and(W%4<1or(y-1)//2%2+(W-y)//2%2)or H==3<W and W%2<1or H==4or H>4 and H*W%2<1or H>2and(x+y)%2or H==W==3and(x==y==2)<1or H==3==W-2and x!=2and y==3)>0])