結果

問題 No.1539 不可欠な部分
ユーザー tailstails
提出日時 2021-06-08 19:06:18
言語 C
(gcc 12.3.0)
結果
AC  
実行時間 6 ms / 2,000 ms
コード長 1,145 bytes
コンパイル時間 1,946 ms
コンパイル使用メモリ 28,180 KB
実行使用メモリ 7,480 KB
最終ジャッジ日時 2023-08-17 22:09:02
合計ジャッジ時間 21,991 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,376 KB
testcase_01 AC 5 ms
4,664 KB
testcase_02 AC 6 ms
7,276 KB
testcase_03 AC 3 ms
4,380 KB
testcase_04 AC 3 ms
4,380 KB
testcase_05 AC 3 ms
4,380 KB
testcase_06 AC 4 ms
4,380 KB
testcase_07 AC 1 ms
4,380 KB
testcase_08 AC 2 ms
4,376 KB
testcase_09 AC 5 ms
4,708 KB
testcase_10 AC 5 ms
4,920 KB
testcase_11 AC 6 ms
7,264 KB
testcase_12 AC 6 ms
7,272 KB
testcase_13 AC 6 ms
7,260 KB
testcase_14 AC 6 ms
7,344 KB
testcase_15 AC 6 ms
7,328 KB
testcase_16 AC 5 ms
6,836 KB
testcase_17 AC 4 ms
5,868 KB
testcase_18 AC 5 ms
7,356 KB
testcase_19 AC 6 ms
7,480 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c:57:1: 警告: 戻り値の型をデフォルトの ‘int’ にします [-Wimplicit-int]
   57 | main(){
      | ^~~~
main.c: 関数 ‘main’ 内:
main.c:79:9: 警告: 関数 ‘write’ の暗黙的な宣言です [-Wimplicit-function-declaration]
   79 |         write(1,wbuf,wp-wbuf);
      |         ^~~~~
main.c:80:9: 警告: implicit declaration of function ‘_exit’; did you mean ‘_Exit’? [-Wimplicit-function-declaration]
   80 |         _exit(0);
      |         ^~~~~
      |         _Exit

ソースコード

diff #

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

char*mmap();

char wbuf[1<<25];

char const mbd[]=
"0.00000000\n"
"0.10129773\n"
"0.10131532\n"
"0.10131858\n"
"0.10131972\n"
"0.10132025\n"
"0.10132054\n"
"0.10132071\n"
"0.10132082\n"
"0.10132090\n"
"0.10132095\n"
"0.10132099\n"
"0.10132102\n"
"0.10132105\n"
"0.10132107\n"
"0.10132108\n"
"0.10132110\n"
"0.10132111\n"
"0.10132111\n"
"0.10132112\n"
"0.10132113\n"
"0.10132113\n"
"0.10132114\n"
"0.10132114\n"
"0.10132115\n"
"0.10132115\n"
"0.10132115\n"
"0.10132115\n"
"0.10132116\n"
"0.10132116\n"
"0.10132116\n"
"0.10132116\n"
"0.10132116\n"
"0.10132117\n"
"0.10132117\n"
"0.10132117\n"
"0.10132117\n"
"0.10132117\n"
"0.10132117\n"
"0.10132117\n"
"0.10132117\n"
"0.10132117\n"
"0.10132117\n"
"0.10132117\n"
"0.10132117\n"
"0.10132118\n"
;

main(){
	char*rp=mmap(0l,1l<<25,1,2,0,0ll);
	char*wp=wbuf;

	while(*rp++>=48);
	int v=0;
	for(int c;c=*rp++;){
		if(c>=48){
			v=10*v+(c-'0');
			if(v>=45){
				v=45;
				while(c=*rp++,c>=48);
			}
		}
		if(c==10){
			typedef struct { int a[3]; } S;
			*(S*)wp=*(S*)(mbd+v*11);
			wp+=11;
			v=0;
		}
	}
	
	write(1,wbuf,wp-wbuf);
	_exit(0);
}
0