結果

問題 No.250 atetubouのzetubou
ユーザー tailstails
提出日時 2020-11-11 17:17:24
言語 C
(gcc 12.3.0)
結果
AC  
実行時間 2 ms / 5,000 ms
コード長 778 bytes
コンパイル時間 123 ms
コンパイル使用メモリ 31,040 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-09-30 00:35:08
合計ジャッジ時間 1,328 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ(β)

テストケース

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

ソースコード

diff #

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

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

char wbuf[8*10000];

#define TMAX 1000000000000001l
#define JMAX 28

long c[3000][JMAX];

main(){
	c[0][0]=1;
	for(int i=1;i<3000;++i){
		c[i][0]=1;
		for(int j=1;j<JMAX;++j){
			long x=c[i-1][j-1]+c[i-1][j];
			c[i][j]=x<TMAX?x:TMAX;
		}
	}

	char*rp=mmap(0l,27l*10000+6,1,2,0,0ll);
	char*wp=wbuf;
	while(*rp++!=10);
	do{
		RD(d);
		RD(x);
		RDL(t);
		--d;
		int i=x+d;
		int j=x<d?x:d;
		if(j>=JMAX||c[i][j]>t){
			*(long*)wp=0x0a554f425554455al;
			wp+=8;
		}else{
			*(int*)wp=0x0a204341;
			wp+=4;
		}
	}while(*rp);
	write(1,wbuf,wp-wbuf);
	_exit(0);
}
0