結果

問題 No.250 atetubouのzetubou
ユーザー 37kt_
提出日時 2015-09-10 17:51:30
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 93 ms / 5,000 ms
コード長 947 bytes
コンパイル時間 1,187 ms
コンパイル使用メモリ 157,540 KB
実行使用メモリ 73,856 KB
最終ジャッジ日時 2024-07-19 05:13:10
合計ジャッジ時間 4,174 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 20
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:42:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   42 |         scanf("%d", &q);
      |         ~~~~~^~~~~~~~~~
main.cpp:46:22: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   46 |                 scanf("%d %d %lld", &d, &x, &t);
      |                 ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~

ソースコード

diff #
プレゼンテーションモードにする

// BCC
/*
#include <cstdio>
#include <algorithm>
#include <iostream>
#include <utility>
#include <vector>
#include <queue>
*/
// GCC
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rrep(i, n) for (int i = (int)(n) - 1; i >= 0; i--)
#define each(i, c) for (__typeof((c).begin()) i = (c).begin(); i != (c).end(); ++i)
#define chmin(a, b) a = min(a, b)
#define chmax(a, b) a = max(a, b)
#define pb push_back
#define mp make_pair
typedef long long ll;
const int INF = 1 << 28;
const ll INFLL = 1ll << 56;
#define add(a, b) min(a + b, INFLL)
ll dp[3001][3001];
int main()
{
dp[0][0] = 1;
rep(i, 3000) rep(j, 3000){
dp[i + 1][j] = add(dp[i + 1][j], dp[i][j]);
dp[i + 1][j + 1] = add(dp[i + 1][j + 1], dp[i][j]);
}
int q;
scanf("%d", &q);
rep(i, q){
int d, x;
ll t;
scanf("%d %d %lld", &d, &x, &t);
ll s = dp[x + d - 1][d - 1];
puts(s <= t ? "AC" : "ZETUBOU");
}
}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
0