結果
問題 | No.2317 Expression Menu |
ユーザー |
![]() |
提出日時 | 2023-05-26 23:22:07 |
言語 | C90 (gcc 12.3.0) |
結果 |
AC
|
実行時間 | 16 ms / 2,000 ms |
コード長 | 827 bytes |
コンパイル時間 | 702 ms |
コンパイル使用メモリ | 28,916 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-12-25 10:54:35 |
合計ジャッジ時間 | 2,335 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 37 |
コンパイルメッセージ
main.c: In function ‘main’: main.c:7:59: warning: implicit declaration of function ‘write’ [-Wimplicit-function-declaration] 7 | #define wt1(v) ({char wbuf[64],*wp=wbuf+sizeof wbuf;wt(v);write(1,wp,wbuf+sizeof wbuf-wp);}) | ^~~~~ main.c:38:9: note: in expansion of macro ‘wt1’ 38 | wt1(z); | ^~~ main.c:39:9: warning: implicit declaration of function ‘_exit’ [-Wimplicit-function-declaration] 39 | _exit(0); | ^~~~~ main.c:39: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() ({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 rrep(v,e) for(typeof(e) v=e;--v>=0;)#define chmax(v,a) (v=v>=a?v:a)typedef unsigned long ulong;char wbuf[1<<25];long d[301][301];int main(){rd_init();int n=rd();int x=rd();int y=rd();rep(i,n){int a=rd();int b=rd();int c=rd();rrep(v,y+1-b){rrep(u,x+1-a){chmax(d[b+v][a+u],c+d[v][u]);}}}long z=0;rrep(v,y+1){rrep(u,x+1){chmax(z,d[v][u]);}}wt1(z);_exit(0);}