結果

問題 No.2521 Don't be Same
ユーザー titiatitia
提出日時 2023-11-02 00:42:37
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 1,054 bytes
コンパイル時間 161 ms
コンパイル使用メモリ 12,000 KB
実行使用メモリ 26,804 KB
平均クエリ数 2.89
最終ジャッジ日時 2023-11-02 00:42:43
合計ジャッジ時間 5,716 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 106 ms
26,676 KB
testcase_01 WA -
testcase_02 RE -
testcase_03 RE -
testcase_04 RE -
testcase_05 WA -
testcase_06 WA -
testcase_07 RE -
testcase_08 RE -
testcase_09 RE -
testcase_10 AC 99 ms
26,676 KB
testcase_11 AC 98 ms
26,676 KB
testcase_12 AC 100 ms
26,676 KB
testcase_13 AC 100 ms
26,676 KB
testcase_14 AC 99 ms
26,676 KB
testcase_15 AC 99 ms
26,676 KB
testcase_16 AC 99 ms
26,676 KB
testcase_17 AC 100 ms
26,676 KB
testcase_18 AC 99 ms
26,676 KB
testcase_19 AC 98 ms
26,676 KB
testcase_20 WA -
testcase_21 RE -
testcase_22 RE -
testcase_23 RE -
testcase_24 WA -
testcase_25 RE -
testcase_26 RE -
testcase_27 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = sys.stdin.readline

A=list(map(int,input().split()))

if min(A)%2==1 and max(A)==min(A)+1:
    print("Second",flush=True)
else:
    print("First",flush=True)

while True:
    if A[0]==A[1]:
        print("B",flush=True)
    elif A[0]==0:
        print("A",2,A[1],flush=True)
        A[1]=0
    elif A[1]==0:
        print("A",1,A[0],flush=True)
        A[0]=0
    else:
        if A[0]%2==1 and A[1]>A[0]+1:
            print("A",2,A[1]-(A[0]+1),flush=True)
            A[1]-=A[1]-(A[0]+1)
            
        elif A[0]%2==0 and A[1]>A[0]-1:
            print("A",2,A[1]-(A[0]-1),flush=True)
            A[1]-=A[1]-(A[0]-1)

        elif A[1]%2==1 and A[0]>A[1]+1:
            print("A",1,A[0]-(A[1]+1),flush=True)
            A[1]-=A[0]-(A[1]+1)
            
        elif A[1]%2==0 and A[0]>A[1]-1:
            print("A",1,A[0]-(A[1]-1),flush=True)
            A[1]-=A[0]-(A[1]-1)

    ans=input().strip()
    if ans=="C" or ans=="D":
        exit()

    com,x,y=ans.split()
    x=int(x)-1
    y=int(y)

    A[x]-=y

    

    
    
0