結果
| 問題 |
No.3324 ハイライト動画
|
| コンテスト | |
| ユーザー |
tails
|
| 提出日時 | 2025-11-02 06:20:38 |
| 言語 | C (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 7 ms / 2,000 ms |
| コード長 | 956 bytes |
| コンパイル時間 | 396 ms |
| コンパイル使用メモリ | 28,796 KB |
| 実行使用メモリ | 7,716 KB |
| 最終ジャッジ日時 | 2025-11-02 06:20:43 |
| 合計ジャッジ時間 | 2,908 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 25 |
コンパイルメッセージ
main.c: In function ‘main’:
main.c:42:9: warning: implicit declaration of function ‘write’ [-Wimplicit-function-declaration]
42 | write(1,wbuf,wlen);
| ^~~~~
main.c:43:9: warning: implicit declaration of function ‘_exit’ [-Wimplicit-function-declaration]
43 | _exit(0);
| ^~~~~
main.c:43:9: warning: incompatible implicit declaration of built-in function ‘_exit’ [-Wbuiltin-declaration-mismatch]
ソースコード
#pragma GCC optimize("Ofast")
#pragma GCC target("avx2")
#define rd_init() char*rp=({char*mmap();mmap(0l,1l<<25,1,2,0,0ll);})
#define rd_skip() while(*rp++>=48)
#define rd() ({int _v=0,_c;while(_c=*rp++-48,_c>=0)_v=_v*10+_c;_v;})
#define wthi(v) {unsigned _z=v,_n=0;long _d=0;while(++_n,_d=_d<<8|0x30|_z%10,_z/=10);*(long*)wp=_d;wp+=_n;}
#define wtlo(v) {unsigned _z=v,_n=8;long _d=0;while(_d=_d<<8|0x30|_z%10,_z/=10,--_n);*(long*)wp=_d;wp+=8;}
#define wt(v) if(v>=100000000){wthi(v/100000000);wtlo(v%100000000);}else{wthi(v);}
#define repeat(e) for(typeof(e)_=e;_--;)
char wbuf[1<<25];
int main(){
char*wp=wbuf;
rd_init();
rd_skip();
int m=rd();
unsigned p=1000000000;
int q=10000000;
int x=0;
repeat(m){
unsigned a=rd();
if(a!=p+q){
wthi(q);
*wp++='\n';
wt(a);
*wp++=' ';
p=a;
q=0;
++x;
}
++q;
}
wthi(q);
int wlen=wp-wbuf;
wp=wbuf;
wthi(x);
while(wp<wbuf+8){
*wp++=' ';
}
write(1,wbuf,wlen);
_exit(0);
}
tails