結果
問題 |
No.250 atetubouのzetubou
|
ユーザー |
![]() |
提出日時 | 2015-09-10 17:49:29 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
RE
|
実行時間 | - |
コード長 | 948 bytes |
コンパイル時間 | 1,135 ms |
コンパイル使用メモリ | 157,700 KB |
実行使用メモリ | 21,120 KB |
最終ジャッジ日時 | 2024-07-19 05:13:06 |
合計ジャッジ時間 | 6,787 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | RE * 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); | ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
ソースコード
// 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[1501][1501]; int main() { dp[0][0] = 1; rep(i, 1500) rep(j, 1500){ 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"); } }