結果

問題 No.250 atetubouのzetubou
ユーザー fumiphysfumiphys
提出日時 2018-08-19 14:58:26
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 927 bytes
コンパイル時間 517 ms
コンパイル使用メモリ 72,080 KB
実行使用メモリ 21,248 KB
最終ジャッジ日時 2024-04-28 14:40:09
合計ジャッジ時間 1,811 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 22 ms
21,120 KB
testcase_01 AC 15 ms
21,248 KB
testcase_02 AC 26 ms
21,120 KB
testcase_03 AC 29 ms
21,120 KB
testcase_04 WA -
testcase_05 AC 27 ms
21,248 KB
testcase_06 AC 27 ms
21,120 KB
testcase_07 AC 18 ms
21,248 KB
testcase_08 AC 25 ms
21,120 KB
testcase_09 AC 23 ms
21,248 KB
testcase_10 WA -
testcase_11 AC 21 ms
21,120 KB
testcase_12 AC 26 ms
21,248 KB
testcase_13 AC 22 ms
21,248 KB
testcase_14 AC 16 ms
21,120 KB
testcase_15 AC 29 ms
21,120 KB
testcase_16 AC 29 ms
21,120 KB
testcase_17 AC 29 ms
21,120 KB
testcase_18 AC 29 ms
21,120 KB
testcase_19 AC 28 ms
20,992 KB
testcase_20 AC 14 ms
20,992 KB
testcase_21 AC 13 ms
20,992 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
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);
      |                         ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~

ソースコード

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 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;
}
0