結果
| 問題 |
No.2521 Don't be Same
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-10-21 02:23:56 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 714 bytes |
| コンパイル時間 | 174 ms |
| コンパイル使用メモリ | 82,280 KB |
| 実行使用メモリ | 85,760 KB |
| 平均クエリ数 | 1.96 |
| 最終ジャッジ日時 | 2024-09-21 03:18:42 |
| 合計ジャッジ時間 | 5,501 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | RE * 1 |
| other | WA * 26 RE * 1 |
ソースコード
X, Y = map(int,input().split())
if max(X, Y) - min(X, Y) == 1 and min(X, Y) % 2 == 1:
print('Second', flush=True)
i = 1
else:
print('First', flush=True)
i = 0
import random
for itr in range(10 ** 6):
if X == Y == 0:
exit()
if itr % 2 == i:
if random.random() < 0.5:
x = random.randint(1, X)
print('A', 1, x)
X -= x
else:
x = random.randint(1, Y)
print('A', 1, x)
Y -= x
else:
Op = input().split()
if Op[0] == 'A':
if Op[1] == '1':
X -= int(Op[2])
else:
Y -= int(Op[2])
else:
exit()