結果
| 問題 |
No.2344 (l+r)^2
|
| コンテスト | |
| ユーザー |
tails
|
| 提出日時 | 2023-06-10 00:57:56 |
| 言語 | C90 (gcc 12.3.0) |
| 結果 |
CE
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 1,164 bytes |
| コンパイル時間 | 1,531 ms |
| コンパイル使用メモリ | 27,264 KB |
| 最終ジャッジ日時 | 2025-01-02 07:37:40 |
| 合計ジャッジ時間 | 2,486 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
コンパイルエラー時のメッセージ・ソースコードは、提出者また管理者しか表示できないようにしております。(リジャッジ後のコンパイルエラーは公開されます)
ただし、clay言語の場合は開発者のデバッグのため、公開されます。
ただし、clay言語の場合は開発者のデバッグのため、公開されます。
コンパイルメッセージ
main.c: In function 'main':
main.c:26:29: error: expected ';' before 'i'
26 | rep(i,n){
| ^
main.c:11:32: note: in definition of macro 'rep'
11 | #define rep(v,e) for(typeof(e) v=0;v<e;++v)
| ^
main.c:26:29: error: 'i' undeclared (first use in this function)
26 | rep(i,n){
| ^
main.c:11:36: note: in definition of macro 'rep'
11 | #define rep(v,e) for(typeof(e) v=0;v<e;++v)
| ^
main.c:26:29: note: each undeclared identifier is reported only once for each function it appears in
26 | rep(i,n){
| ^
main.c:11:36: note: in definition of macro 'rep'
11 | #define rep(v,e) for(typeof(e) v=0;v<e;++v)
| ^
main.c:30:29: error: expected ';' before 'j'
30 | rep(j,18){
| ^
main.c:11:32: note: in definition of macro 'rep'
11 | #define rep(v,e) for(typeof(e) v=0;v<e;++v)
| ^
main.c:30:29: error: 'j' undeclared (first use in this function)
30 | rep(j,18){
| ^
main.c:11:36: note: in definition of macro 'rep'
11 | #define rep(v,e) for(typeof(e) v=0;v<e;++v)
| ^
main.c:34:45: error: expected ';' before 'i'
34 | rep(i,n){
| ^
main.c:11:32: note: in definition of macro 'rep'
11 | #define rep(v,e) for(typeof(e) v=0;v<e;++v)
| ^
main.c:40:29: error: expected ';' before 'i'
40 | rep(i,n){
| ^
main.c:11:32: note: in definition of macro 'rep'
11 | #define rep(v,e) for(typeof(e) v=0;v<e;++v)
ソースコード
#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 rd_mod2() ({rd_skip();rp[-2];})
#define WTHI(v) {unsigned _z=v,_n=0;ulong _d=0;while(++_n,_d=_d<<8|0x30|_z%10,_z/=10);*(ulong*)wp=_d;wp+=_n;}
#define WTLO(v) {unsigned _z=v,_n=8;ulong _d=0;while(_d=_d<<8|0x30|_z%10,_z/=10,--_n);*(ulong*)wp=_d;wp+=8;}
#define wt(v) if(v>=100000000){WTHI(v/100000000);WTLO(v);}else{WTHI(v);}
#define rep(v,e) for(typeof(e) v=0;v<e;++v)
typedef unsigned long ulong;
unsigned a[200000];
char wbuf[1<<25];
int main(){
char*wp=wbuf;
rd_init();
rd_skip();
while(*rp){
int n=rd();
int m=rd();
if(n>=m){
rep(i,n){
a[i]=rd_mod2();
}
int d=n-m;
rep(j,18){
unsigned k=1<<j;
if(k&d){
n-=k;
rep(i,n){
a[i]+=a[i+k];
}
}
}
}else{
rep(i,n){
a[i]=rd();
}
}
rep(i,n-1){
rep(j,n-1-i){
unsigned t=a[j]+a[j+1];
a[j]=t*t;
}
}
unsigned z=a[0]&(1<<m)-1;
wt(z);
*wp++='\n';
}
write(1,wbuf,wp-wbuf);
_exit(0);
}
tails