結果
| 問題 | No.250 atetubouのzetubou |
| コンテスト | |
| ユーザー |
👑 tails
|
| 提出日時 | 2020-11-11 16:15:59 |
| 言語 | C(gnu17) (gcc 15.2.0) |
| 結果 |
CE
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 835 bytes |
| 記録 | |
| コンパイル時間 | 98 ms |
| コンパイル使用メモリ | 28,412 KB |
| 最終ジャッジ日時 | 2026-02-22 06:20:30 |
|
ジャッジサーバーID (参考情報) |
judge4 / judge4 |
(要ログイン)
コンパイルエラー時のメッセージ・ソースコードは、提出者また管理者しか表示できないようにしております。(リジャッジ後のコンパイルエラーは公開されます)
ただし、clay言語の場合は開発者のデバッグのため、公開されます。
ただし、clay言語の場合は開発者のデバッグのため、公開されます。
コンパイルメッセージ
main.c:24:1: error: return type defaults to 'int' [-Wimplicit-int]
24 | main(){
| ^~~~
main.c: In function 'main':
main.c:25:16: error: implicit declaration of function 'shmget'; did you mean 'shmat'? [-Wimplicit-function-declaration]
25 | int id=shmget(101,8l*3000*1500,950);
| ^~~~~~
| shmat
main.c:26:24: error: too many arguments to function 'shmat'; expected 0, have 3
26 | long(*c)[1500]=shmat(id,0l,0);
| ^~~~~ ~~
main.c:4:6: note: declared here
4 | void*shmat();
| ^~~~~
main.c:30:17: error: too many arguments to function 'mmap'; expected 0, have 6
30 | char*rp=mmap(0l,27l*10000+6,1,2,0,0ll);
| ^~~~ ~~
main.c:5:6: note: declared here
5 | void*mmap();
| ^~~~
main.c:45:9: error: implicit declaration of function 'write' [-Wimplicit-function-declaration]
45 | write(1,wbuf,wp-wbuf);
| ^~~~~
main.c:46:9: error: implicit declaration of function '_exit' [-Wimplicit-function-declaration]
46 | _exit(0);
| ^~~~~
main.c:46:9: warning: incompatible implicit declaration of built-in function '_exit' [-Wbuiltin-declaration-mismatch]
ソースコード
#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 1000000000000000l
void mkc(long(*c)[1500]){
c[0][0]=1;
for(int i=1;i<3000;++i){
c[i][0]=1;
for(int j=1;j<1500;++j){
long x=c[i-1][j-1]+c[i-1][j];
c[i][j]=x<(TMAX+1)?x:(TMAX+1);
}
}
}
main(){
int id=shmget(101,8l*3000*1500,950);
long(*c)[1500]=shmat(id,0l,0);
if(c[0][0]==0){
mkc(c);
}
char*rp=mmap(0l,27l*10000+6,1,2,0,0ll);
char*wp=wbuf;
while(*rp++!=10);
do{
RD(d);
RD(x);
RDL(t);
if(c[x+d-1][d-1]>t){
*(long*)wp=0x0a554f425554455al;
wp+=8;
}else{
*(int*)wp=0x0a4341;
wp+=3;
}
}while(*rp);
write(1,wbuf,wp-wbuf);
_exit(0);
}
tails