結果
| 問題 | No.1032 数数え |
| ユーザー |
👑 tails
|
| 提出日時 | 2020-11-16 21:10:05 |
| 言語 | C(gnu17) (gcc 15.2.0) |
| 結果 |
CE
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 806 bytes |
| 記録 | |
| コンパイル時間 | 141 ms |
| コンパイル使用メモリ | 28,700 KB |
| 最終ジャッジ日時 | 2026-02-22 06:20:51 |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
コンパイルエラー時のメッセージ・ソースコードは、提出者また管理者しか表示できないようにしております。(リジャッジ後のコンパイルエラーは公開されます)
ただし、clay言語の場合は開発者のデバッグのため、公開されます。
ただし、clay言語の場合は開発者のデバッグのため、公開されます。
コンパイルメッセージ
main.c:13:1: error: return type defaults to 'int' [-Wimplicit-int]
13 | main(){
| ^~~~
main.c: In function 'main':
main.c:14:17: error: too many arguments to function 'mmap'; expected 0, have 6
14 | char*rp=mmap(0l,7l*200002,1,2,0,0ll);
| ^~~~ ~~
main.c:4:6: note: declared here
4 | char*mmap();
| ^~~~
main.c:32:9: error: implicit declaration of function 'write' [-Wimplicit-function-declaration]
32 | write(1,buf,(wp-buf)*sizeof*buf);
| ^~~~~
main.c:33:9: error: implicit declaration of function '_exit' [-Wimplicit-function-declaration]
33 | _exit(0);
| ^~~~~
main.c:33:9: warning: incompatible implicit declaration of built-in function '_exit' [-Wbuiltin-declaration-mismatch]
ソースコード
#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 buf[8*2*200000];
int h[200001];
#define WTSP(v) {long _z=v,_n=1,_d=32;while(++_n,_d=_d<<8|0x30|_z&15,_z>>=4);*(long*)wp=_d;wp+=_n;}
#define WTLN(v) {long _z=v,_n=1,_d=10;while(++_n,_d=_d<<8|0x30|_z&15,_z>>=4);*(long*)wp=_d;wp+=_n;}
main(){
char*rp=mmap(0l,7l*200002,1,2,0,0ll);
while(*rp++!=32);
RD(m);
do{
RD(l);
int x=h[l];
int y=x&x>>3;
x+=y&1?y&0x10?y&0x100?y&0x1000?y&0x10000?0x66667:0x6667:0x667:0x67:7:1;
h[l]=x;
}while(*rp);
char*wp=buf;
int z=0;
for(int i=0;++i<=m;){
int y=z&z>>3;
z+=y&1?y&0x10?y&0x100?y&0x1000?y&0x10000?0x66667:0x6667:0x667:0x67:7:1;
WTSP(z);
WTLN(h[i]);
}
write(1,buf,(wp-buf)*sizeof*buf);
_exit(0);
}
tails