結果
| 問題 | 
                            No.2521 Don't be Same
                             | 
                    
| コンテスト | |
| ユーザー | 
                             titia
                         | 
                    
| 提出日時 | 2023-11-02 00:42:37 | 
| 言語 | Python3  (3.13.1 + numpy 2.2.1 + scipy 1.14.1)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 1,054 bytes | 
| コンパイル時間 | 172 ms | 
| コンパイル使用メモリ | 12,544 KB | 
| 実行使用メモリ | 27,992 KB | 
| 平均クエリ数 | 2.96 | 
| 最終ジャッジ日時 | 2024-09-25 18:03:23 | 
| 合計ジャッジ時間 | 4,720 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge1 / judge5 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 1 | 
| other | AC * 10 WA * 4 RE * 13 | 
ソースコード
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
    
    
    
            
            
            
        
            
titia