結果
| 問題 |
No.250 atetubouのzetubou
|
| コンテスト | |
| ユーザー |
kongarishisyamo
|
| 提出日時 | 2016-05-06 16:41:33 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 584 bytes |
| コンパイル時間 | 404 ms |
| コンパイル使用メモリ | 55,392 KB |
| 実行使用メモリ | 21,120 KB |
| 最終ジャッジ日時 | 2024-10-05 10:10:25 |
| 合計ジャッジ時間 | 19,945 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 1 RE * 1 |
| other | WA * 5 RE * 15 |
ソースコード
#include<iostream>
using namespace std;
long long dp[1501][1501]={{0}};
int main(){
long long Q,D,X,T;
cin>>Q;
dp[0][0]=1;
for(int i=1;i<=1500;i++){
long long sum=0;
for(int j=0;j<=1500;j++){
sum+=dp[i-1][j];
dp[i][j]=sum;
}
}
for(int i=0;i<Q;i++){
cin>>D>>X>>T;
if(D==1){
cout<<"AC"<<endl;
continue;
}
long long sum=0;
D--;
for(int i=0;;i++){
sum+=dp[D][i]*X;
X--;
if(sum<0){
cout<<"ZETUBOU"<<endl;
continue;
}
if(X==0) break;
}
cout<<sum<<endl;
if(sum<=T) cout<<"AC"<<endl;
else cout<<"ZETUBOU"<<endl;
}
}
kongarishisyamo