結果

問題 No.2521 Don't be Same
ユーザー tailstails
提出日時 2023-10-27 23:37:57
言語 cLay
(20240104-1)
結果
AC  
実行時間 75 ms / 2,000 ms
コード長 441 bytes
コンパイル時間 4,812 ms
コンパイル使用メモリ 171,908 KB
実行使用メモリ 24,660 KB
平均クエリ数 10.11
最終ジャッジ日時 2023-10-27 23:38:07
合計ジャッジ時間 7,151 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
24,648 KB
testcase_01 AC 73 ms
24,660 KB
testcase_02 AC 75 ms
24,660 KB
testcase_03 AC 66 ms
24,660 KB
testcase_04 AC 67 ms
24,660 KB
testcase_05 AC 68 ms
24,660 KB
testcase_06 AC 66 ms
24,660 KB
testcase_07 AC 68 ms
24,660 KB
testcase_08 AC 69 ms
24,660 KB
testcase_09 AC 69 ms
24,660 KB
testcase_10 AC 68 ms
24,660 KB
testcase_11 AC 67 ms
24,660 KB
testcase_12 AC 72 ms
24,660 KB
testcase_13 AC 67 ms
24,660 KB
testcase_14 AC 68 ms
24,660 KB
testcase_15 AC 67 ms
24,660 KB
testcase_16 AC 67 ms
24,660 KB
testcase_17 AC 67 ms
24,660 KB
testcase_18 AC 67 ms
24,660 KB
testcase_19 AC 68 ms
24,660 KB
testcase_20 AC 69 ms
24,660 KB
testcase_21 AC 68 ms
24,660 KB
testcase_22 AC 69 ms
24,660 KB
testcase_23 AC 66 ms
24,660 KB
testcase_24 AC 68 ms
24,660 KB
testcase_25 AC 67 ms
24,660 KB
testcase_26 AC 67 ms
24,660 KB
testcase_27 AC 69 ms
24,660 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

//interactive
ll@x,@y;
if(x==0&&y==0||x%2==1&&y==x+1||y%2==1&&x==y+1){
	wt("Second");
	goto opp_turn;
}else{
	wt("First");
}

my_turn:
if(x==y){
	wt("B");
	x=y=0;
}else if(x==0){
	wt("A 2",y);
	y=0;
}else if(y==0){
	wt("A 1",x);
	x=0;
}else if(x<y){
	ll newy=x%2?x+1:x-1;
	wt("A 2",y-newy);
	y=newy;
}else{
	ll newx=y%2?y+1:y-1;
	wt("A 1",x-newx);
	x=newx;
}

opp_turn:
char@c;
if(c!='A'){
	exit(0);
}
ll@i,@z;
(i==1?x:y)-=z;

goto my_turn;
0