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