結果

問題 No.250 atetubouのzetubou
ユーザー fumiphysfumiphys
提出日時 2018-08-19 14:56:51
言語 C++11
(gcc 11.4.0)
結果
TLE  
実行時間 -
コード長 939 bytes
コンパイル時間 642 ms
コンパイル使用メモリ 72,204 KB
実行使用メモリ 27,700 KB
最終ジャッジ日時 2024-04-28 14:37:50
合計ジャッジ時間 17,346 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 3,817 ms
20,992 KB
testcase_01 AC 697 ms
20,956 KB
testcase_02 TLE -
testcase_03 TLE -
testcase_04 -- -
testcase_05 -- -
testcase_06 -- -
testcase_07 -- -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
権限があれば一括ダウンロードができます
コンパイルメッセージ
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:31:30: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   31 |                         scanf("%d %d %lld", &d, &x, &t);
      |                         ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~

ソースコード

diff #

#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 i = 0; i < q; i++){
			int d, x;
			ll t;
			scanf("%d %d %lld", &d, &x, &t);
			for(int j = 0; j <= d; j++){
					for(int k = 0; k <= x; k++){
							dp[j][k] = 0;
					}
			}
			dp[0][0] = 1;
			for(int j = 0; j < d; j++){
					dp[j+1][0] = 1;
					for(int k = 1; k <= x; k++){
							dp[j+1][k] = dp[j][k] + dp[j+1][k-1];
					}
			}
			if(dp[d][x] >= 0 && t >= dp[d][x])cout << "AC" << endl;
			else cout << "ZETUBOU" << endl;
	}
	return 0;
}
0