結果
問題 | No.250 atetubouのzetubou |
ユーザー | lapi |
提出日時 | 2019-07-20 21:15:37 |
言語 | C++14 (gcc 13.2.0 + boost 1.83.0) |
結果 |
AC
|
実行時間 | 38 ms / 5,000 ms |
コード長 | 1,116 bytes |
コンパイル時間 | 3,542 ms |
コンパイル使用メモリ | 107,120 KB |
実行使用メモリ | 67,956 KB |
最終ジャッジ日時 | 2023-08-28 22:48:49 |
合計ジャッジ時間 | 3,174 ms |
ジャッジサーバーID (参考情報) |
judge13 / judge12 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 30 ms
67,712 KB |
testcase_01 | AC | 23 ms
67,800 KB |
testcase_02 | AC | 35 ms
67,772 KB |
testcase_03 | AC | 36 ms
67,832 KB |
testcase_04 | AC | 34 ms
67,956 KB |
testcase_05 | AC | 35 ms
67,916 KB |
testcase_06 | AC | 31 ms
67,640 KB |
testcase_07 | AC | 27 ms
67,692 KB |
testcase_08 | AC | 34 ms
67,700 KB |
testcase_09 | AC | 31 ms
67,644 KB |
testcase_10 | AC | 34 ms
67,832 KB |
testcase_11 | AC | 30 ms
67,852 KB |
testcase_12 | AC | 34 ms
67,768 KB |
testcase_13 | AC | 29 ms
67,588 KB |
testcase_14 | AC | 22 ms
67,528 KB |
testcase_15 | AC | 37 ms
67,852 KB |
testcase_16 | AC | 37 ms
67,928 KB |
testcase_17 | AC | 37 ms
67,696 KB |
testcase_18 | AC | 38 ms
67,692 KB |
testcase_19 | AC | 37 ms
67,920 KB |
testcase_20 | AC | 21 ms
67,532 KB |
testcase_21 | AC | 22 ms
67,620 KB |
ソースコード
#include <iostream> #include <string> #include <algorithm> #include <vector> #include <stack> #include <queue> #include <list> #include <set> #include <map> #include <numeric> #include <regex> #include <tuple> #include <iomanip> #include <cmath> using namespace std; typedef long long ll; typedef pair<int, int> P; #define MOD 1000000007 // 10^9 + 7 #define INF 1000000000 // 10^9 #define LLINF 1LL<<60 const ll M = 10000000000000000LL; // combination_table // パスカルの三角形 ll Com[3009][3009]; // C[n][k] = nCk void combination_table(int N) { for (int i = 1; i <= N; i++) { for (int j = 0; j <= i; j++) { if (j == 0 || j == i) Com[i][j] = 1LL; else Com[i][j] = min(M, Com[i - 1][j] + Com[i - 1][j - 1]); } } } int D[10009]; int X[10009]; ll T[10009]; int main() { cin.tie(0); ios::sync_with_stdio(false); int Q; cin >> Q; for (int i = 1; i <= Q; i++) cin >> D[i] >> X[i] >> T[i]; combination_table(3002); //cout << "ok2" << endl; for (int i = 1; i <= Q; i++) { if (Com[X[i] + D[i] - 1][X[i]] <= T[i]) cout << "AC" << endl; else cout << "ZETUBOU" << endl; } return 0; }