結果

問題 No.1399 すごろくで世界旅行 (構築)
ユーザー tailstails
提出日時 2021-02-19 23:15:56
言語 C
(gcc 12.3.0)
結果
AC  
実行時間 3 ms / 3,153 ms
コード長 440 bytes
コンパイル時間 1,644 ms
コンパイル使用メモリ 30,468 KB
実行使用メモリ 4,348 KB
最終ジャッジ日時 2023-10-16 22:59:30
合計ジャッジ時間 23,075 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
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 1 ms
4,348 KB
testcase_04 AC 1 ms
4,348 KB
testcase_05 AC 1 ms
4,348 KB
testcase_06 AC 0 ms
4,348 KB
testcase_07 AC 1 ms
4,348 KB
testcase_08 AC 0 ms
4,348 KB
testcase_09 AC 2 ms
4,348 KB
testcase_10 AC 1 ms
4,348 KB
testcase_11 AC 1 ms
4,348 KB
testcase_12 AC 1 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 1 ms
4,348 KB
testcase_17 AC 3 ms
4,348 KB
testcase_18 AC 2 ms
4,348 KB
testcase_19 AC 2 ms
4,348 KB
testcase_20 AC 2 ms
4,348 KB
testcase_21 AC 2 ms
4,348 KB
testcase_22 AC 3 ms
4,348 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c:9:1: warning: return type defaults to 'int' [-Wimplicit-int]
    9 | main(){
      | ^~~~
main.c: In function 'main':
main.c:23:9: warning: implicit declaration of function 'write' [-Wimplicit-function-declaration]
   23 |         write(1,wbuf,n);
      |         ^~~~~

ソースコード

diff #

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

char*mmap();
#define RD(v) int v=0;{int _c;while(_c=*rp++-48,_c>=0)v=v*10+_c;}

char wbuf[1<<28];

main(){
	char*rp=mmap(0l,1l<<28,1,2,0,0ll);
	RD(v);
	RD(d);
	long t=d==1?0x3131313131313131l:0x3030303030303030l;
	int n=(v+1)*v;
	for(int i=0;i<n;i+=8){
		*(long*)(wbuf+i)=t;
	}
	for(int i=0;i<v;++i){
		wbuf[i]='1';
		wbuf[(v+1)*i]='1';
		wbuf[(v+1)*i+v]=10;
	}
	write(1,wbuf,n);
}
0