結果
| 問題 |
No.250 atetubouのzetubou
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-08-19 14:58:26 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 927 bytes |
| コンパイル時間 | 677 ms |
| コンパイル使用メモリ | 71,828 KB |
| 実行使用メモリ | 21,376 KB |
| 最終ジャッジ日時 | 2024-11-17 07:23:29 |
| 合計ジャッジ時間 | 2,237 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 18 WA * 2 |
コンパイルメッセージ
main.cpp: In function ‘int main(int, const char**)’:
main.cpp:27:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
27 | scanf("%d", &q);
| ~~~~~^~~~~~~~~~
main.cpp:43:30: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
43 | scanf("%d %d %lld", &d, &x, &t);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
ソースコード
#include <iostream>
#include <string>
#include <queue>
#include <vector>
#include <set>
#include <map>
#include <algorithm>
#include <utility>
#include <iomanip>
#include <cstdio>
#define ll long long int
#define pb push_back
#define mk make_pair
#define pq priority_queue
using namespace std;
typedef pair<int, int> P;
typedef pair<ll, int> Pl;
const int inf = 1e9;
const ll linf = 1LL << 50;
ll dp[1501][1501];
int main(int argc, char const* argv[])
{
int q;
scanf("%d", &q);
for(int j = 0; j <= 1500; j++){
for(int k = 0; k <= 1500; k++){
dp[j][k] = 0;
}
}
dp[0][0] = 1;
for(int j = 0; j < 1500; j++){
dp[j+1][0] = 1;
for(int k = 1; k <= 1500; k++){
dp[j+1][k] = dp[j][k] + dp[j+1][k-1];
}
}
for(int i = 0; i < q; i++){
int d, x;
ll t;
scanf("%d %d %lld", &d, &x, &t);
if(dp[d][x] >= 0 && t >= dp[d][x])cout << "AC" << endl;
else cout << "ZETUBOU" << endl;
}
return 0;
}