結果
| 問題 | No.2788 4-33 Hard |
| コンテスト | |
| ユーザー |
👑 tails
|
| 提出日時 | 2024-06-17 19:49:56 |
| 言語 | C90(gcc15) (gcc 15.2.0) |
| 結果 |
CE
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 1,242 bytes |
| 記録 | |
| コンパイル時間 | 126 ms |
| コンパイル使用メモリ | 25,984 KB |
| 最終ジャッジ日時 | 2026-02-24 01:20:04 |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
コンパイルエラー時のメッセージ・ソースコードは、提出者また管理者しか表示できないようにしております。(リジャッジ後のコンパイルエラーは公開されます)
ただし、clay言語の場合は開発者のデバッグのため、公開されます。
ただし、clay言語の場合は開発者のデバッグのため、公開されます。
コンパイルメッセージ
main.c: In function 'main':
main.c:23:13: error: expected ';' before 'a'
23 | rep(a,5){
| ^
main.c:9:31: note: in definition of macro 'rep'
9 | #define rep(v,e) for(typeof(e)v=0;v<e;++v)
| ^
main.c:23:13: error: 'a' undeclared (first use in this function)
23 | rep(a,5){
| ^
main.c:9:35: note: in definition of macro 'rep'
9 | #define rep(v,e) for(typeof(e)v=0;v<e;++v)
| ^
main.c:23:13: note: each undeclared identifier is reported only once for each function it appears in
23 | rep(a,5){
| ^
main.c:9:35: note: in definition of macro 'rep'
9 | #define rep(v,e) for(typeof(e)v=0;v<e;++v)
| ^
main.c:24:21: error: expected ';' before 'b'
24 | rep(b,34){
| ^
main.c:9:31: note: in definition of macro 'rep'
9 | #define rep(v,e) for(typeof(e)v=0;v<e;++v)
| ^
main.c:24:21: error: 'b' undeclared (first use in this function)
24 | rep(b,34){
| ^
main.c:9:35: note: in definition of macro 'rep'
9 | #define rep(v,e) for(typeof(e)v=0;v<e;++v)
| ^
main.c:28:29: error: expected ';' before 'i'
28 | rep(i,10){
| ^
main.c:9:31: note: in definition of macro 'rep'
9 | #define rep(v,e) for(typeof(e)v=0;v<e;++v)
| ^
main.c:28:29: error: 'i' undeclared (first use in this function)
28 | rep(i,10){
| ^
main.c:9:35: note: in definition of macro 'rep'
9 | #define rep(v,e) for(typeof(e)v=0;v<e;++v)
| ^
main.c:31:31: error: expected ';' before 'i'
31 | rreps(i,1,9){
|
ソースコード
#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() ({long _v=0,_c;while(_c=*rp++-48,_c>=0)_v=_v*10+_c;_v;})
#define wt(v) ({ulong _z=v;do*--wp=_z%10+48;while(_z/=10);})
#define wt1(v) ({char wbuf[64],*wp=wbuf+sizeof wbuf;wt(v);write(1,wp,wbuf+sizeof wbuf-wp);})
#define rep(v,e) for(typeof(e)v=0;v<e;++v)
#define reps(v,s,e) for(typeof(e)v=s;v<e;++v)
#define rrep(v,e) for(typeof(e)v=e;--v>=0;)
#define rreps(v,s,e) for(typeof(e)v=e;--v>=s;)
#define MD 998244353
typedef unsigned long ulong;
unsigned const v[10]={0,1,499122177,332748118,748683265,598946612,166374059,855638017,873463809,443664157};
unsigned d[9][5][34];
int main(){
d[0][0][0]=1;
rd_init();
rep(a,5){
rep(b,34){
ulong o=(ulong)rd()%MD;
ulong c[10];
c[0]=1;
rep(i,10){
c[i+1]=c[i]*((o-i+MD)%MD)%MD*v[i+1]%MD;
}
rreps(i,1,9){
reps(j,1,i+1){
rrep(x,5-a*j){
rrep(y,34-b*j){
d[i][x+a*j][y+b*j]=(d[i][x+a*j][y+b*j]+d[i-j][x][y]*c[j])%MD;
}
}
}
}
}
}
ulong z=0;
rep(a,5){
ulong o=(ulong)rd()%MD;
z=(z+d[8][4-a][33]*o)%MD;
rep(b,33){
rd_skip();
}
}
wt1(z);
_exit(0);
}
tails