結果
| 問題 |
No.250 atetubouのzetubou
|
| コンテスト | |
| ユーザー |
nanophoto12
|
| 提出日時 | 2016-01-08 01:30:02 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 32 ms / 5,000 ms |
| コード長 | 1,201 bytes |
| コンパイル時間 | 747 ms |
| コンパイル使用メモリ | 84,236 KB |
| 実行使用メモリ | 23,088 KB |
| 最終ジャッジ日時 | 2024-09-19 13:06:14 |
| 合計ジャッジ時間 | 1,717 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 20 |
ソースコード
#include <iostream>
#include <iomanip>
#include <vector>
#include <list>
#include <deque>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <algorithm>
#include <cmath>
#include <cstring>
#include <limits>
using namespace std;
#define FOR(x,y) for(int x = 0;x < (y);x++)
#define LLI long long int
#define FORR(x,arr) for(auto& x:arr)
#define ALL(a) (a.begin()),(a.end())
#define _L(x) cout<<(x)<<endl
static const int MAX_N = 1600;
static const LLI INF = 1e17;
LLI dp[MAX_N][MAX_N];
int main()
{
FOR(i, 1501)
{
dp[i][0] = 1;
dp[i][1] = i;
}
FOR(i, 1501)
{
dp[0][i] = 1;
dp[1][i] = 1;
}
for(int i = 1;i < 1501;i++)
{
LLI sum = 0;
for(int k = 0;k < 1501;k++)
{
sum += dp[i][k];
sum = min(sum, INF);
dp[i+1][k] = sum;
}
}
int n;
cin >> n;
FOR(i, n)
{
LLI d, x, t;
cin >> d >> x >> t;
auto r = dp[d][x];
//cout << r << endl;
if(r <= t)
{
cout << "AC" << endl;
}
else
{
cout << "ZETUBOU" << endl;
}
}
return 0;
}
nanophoto12