結果
| 問題 | No.182 新規性の虜 |
| コンテスト | |
| ユーザー |
👑 tails
|
| 提出日時 | 2020-10-29 09:43:53 |
| 言語 | C(gnu17) (gcc 15.2.0) |
| 結果 |
CE
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 580 bytes |
| 記録 | |
| コンパイル時間 | 103 ms |
| コンパイル使用メモリ | 28,956 KB |
| 最終ジャッジ日時 | 2026-02-22 06:16:13 |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
コンパイルエラー時のメッセージ・ソースコードは、提出者また管理者しか表示できないようにしております。(リジャッジ後のコンパイルエラーは公開されます)
ただし、clay言語の場合は開発者のデバッグのため、公開されます。
ただし、clay言語の場合は開発者のデバッグのため、公開されます。
コンパイルメッセージ
main.c:9:1: error: return type defaults to 'int' [-Wimplicit-int]
9 | main(){
| ^~~~
main.c: In function 'main':
main.c:11:15: error: implicit declaration of function 'time' [-Wimplicit-function-declaration]
11 | int t=time(0)|1;
| ^~~~
main.c:1:1: note: 'time' is defined in header '<time.h>'; this is probably fixable by adding '#include <time.h>'
+++ |+#include <time.h>
1 | #pragma GCC optimize("Ofast")
main.c:13:17: error: too many arguments to function 'mmap'; expected 0, have 6
13 | char*rp=mmap(0l,1100l<<10,1,2,0,0ll);
| ^~~~ ~~
main.c:4:6: note: declared here
4 | char*mmap();
| ^~~~
main.c:37:9: error: implicit declaration of function 'write' [-Wimplicit-function-declaration]
37 | write(1,wp,wbuf+16-wp);
| ^~~~~
main.c:38:9: error: implicit declaration of function '_exit' [-Wimplicit-function-declaration]
38 | _exit(0);
| ^~~~~
main.c:38: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;}
int m[1<<19];
main(){
int z=0;
int t=time(0)|1;
char*rp=mmap(0l,1100l<<10,1,2,0,0ll);
while(*rp++!=10);
do{
RD(a);
long b=(long)t*a;
int h=b&0x7ffff;
int s=b>>19|1;
while(1){
if(m[h]==0){
m[h]=a<<1;
++z;
break;
}
if(m[h]>>1==a){
z-=~m[h]&1;
m[h]|=1;
break;
}
h=(h+s)&0x7ffff;
}
}while(*rp);
char wbuf[16],*wp=wbuf+16;
while(*--wp=z%10+48,z/=10);
write(1,wp,wbuf+16-wp);
_exit(0);
}
tails