結果

問題 No.2521 Don't be Same
ユーザー Shirotsume
提出日時 2023-10-21 02:20:54
言語 PyPy3
(7.3.15)
結果
RE  
実行時間 -
コード長 679 bytes
コンパイル時間 306 ms
コンパイル使用メモリ 82,580 KB
実行使用メモリ 85,244 KB
平均クエリ数 1.96
最終ジャッジ日時 2024-09-21 03:15:48
合計ジャッジ時間 5,930 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample RE * 1
other WA * 26 RE * 1
権限があれば一括ダウンロードができます

ソースコード

diff #

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 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()

        
0