結果
問題 | No.250 atetubouのzetubou |
ユーザー |
![]() |
提出日時 | 2015-07-24 22:59:45 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 40 ms / 5,000 ms |
コード長 | 778 bytes |
コンパイル時間 | 611 ms |
コンパイル使用メモリ | 80,288 KB |
実行使用メモリ | 21,120 KB |
最終ジャッジ日時 | 2024-07-08 13:29:19 |
合計ジャッジ時間 | 2,143 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 20 |
ソースコード
#include<sstream> #include<iostream> #include<cstdio> #include<cstdlib> #include<cstring> #include<cmath> #include<string> #include<vector> #include<set> #include<map> #include<queue> #include<numeric> #include<functional> #include<algorithm> #include<bitset> using namespace std; #define rep(i,n) for(int i=0;i<(int)(n);i++) #define all(v) v.begin(),v.end() #define uniq(v) v.erase(unique(all(v)),v.end()) #define indexOf(v,x) (find(all(v),x)-v.begin()) #define INF (1LL<<50) long long dp[1501][1501]; int main(){ dp[0][0]=1; rep(i,1500){ long long s=0; rep(j,1501){ s=min(s+dp[i][j],INF); dp[i+1][j]=s; } } int q; cin>>q; rep(i,q){ int d,x; long long t; cin>>d>>x>>t; if(dp[d][x]<=t)cout<<"AC"<<endl; else cout<<"ZETUBOU"<<endl; } return 0; }