結果

問題 No.601 Midpoint Erase
ユーザー tailstails
提出日時 2021-02-22 21:38:38
言語 C
(gcc 12.3.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 340 bytes
コンパイル時間 1,020 ms
コンパイル使用メモリ 30,040 KB
実行使用メモリ 4,348 KB
最終ジャッジ日時 2023-10-21 15:57:36
合計ジャッジ時間 2,405 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,348 KB
testcase_01 AC 1 ms
4,348 KB
testcase_02 AC 1 ms
4,348 KB
testcase_03 AC 2 ms
4,348 KB
testcase_04 AC 2 ms
4,348 KB
testcase_05 AC 2 ms
4,348 KB
testcase_06 AC 1 ms
4,348 KB
testcase_07 AC 2 ms
4,348 KB
testcase_08 AC 2 ms
4,348 KB
testcase_09 AC 2 ms
4,348 KB
testcase_10 AC 1 ms
4,348 KB
testcase_11 AC 2 ms
4,348 KB
testcase_12 AC 2 ms
4,348 KB
testcase_13 AC 1 ms
4,348 KB
testcase_14 AC 1 ms
4,348 KB
testcase_15 AC 1 ms
4,348 KB
testcase_16 AC 0 ms
4,348 KB
testcase_17 AC 1 ms
4,348 KB
testcase_18 AC 1 ms
4,348 KB
testcase_19 AC 1 ms
4,348 KB
testcase_20 AC 1 ms
4,348 KB
testcase_21 AC 0 ms
4,348 KB
testcase_22 AC 0 ms
4,348 KB
testcase_23 AC 0 ms
4,348 KB
testcase_24 AC 1 ms
4,348 KB
testcase_25 AC 1 ms
4,348 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c:6:1: warning: return type defaults to 'int' [-Wimplicit-int]
    6 | main(){
      | ^~~~
main.c: In function 'main':
main.c:21:9: warning: implicit declaration of function 'write' [-Wimplicit-function-declaration]
   21 |         write(1,(f[0]^f[1]^f[2]^f[3])&2?"Alice":"Bob  ",5);
      |         ^~~~~
main.c:22:9: warning: implicit declaration of function '_exit'; did you mean '_Exit'? [-Wimplicit-function-declaration]
   22 |         _exit(0);
      |         ^~~~~
      |         _Exit

ソースコード

diff #

#pragma GCC optimize("Ofast")
#pragma GCC target("avx2")

char*mmap();

main(){
	char*rp=mmap(0l,1l<<28,1,2,0,0ll);
	while(*rp++>=48);
	int c,d,e,f[4]={0,0,0,0};
	while(c=*rp++){
		if(c<48){
			if(c==10){
				e|=d&1;
				++f[e];
			}else{
				e=(d&1)<<1;
			}
		}
		d=c;
	}
	write(1,(f[0]^f[1]^f[2]^f[3])&2?"Alice":"Bob  ",5);
	_exit(0);
}
0