結果
| 問題 |
No.250 atetubouのzetubou
|
| コンテスト | |
| ユーザー |
nanasili
|
| 提出日時 | 2015-07-31 11:44:33 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 1,134 bytes |
| コンパイル時間 | 668 ms |
| コンパイル使用メモリ | 84,596 KB |
| 実行使用メモリ | 34,956 KB |
| 最終ジャッジ日時 | 2024-07-17 22:54:12 |
| 合計ジャッジ時間 | 3,221 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 5 WA * 15 |
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:51:8: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
51 | scanf("%d", &q);
| ~~~~~^~~~~~~~~~
main.cpp:54:10: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
54 | scanf("%lld %lld %lld", &d, &x, &t);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ソースコード
#include <algorithm>
#include <vector>
#include <cfloat>
#include <string>
#include <cmath>
#include <set>
#include <cstdlib>
#include <map>
#include <ctime>
#include <iomanip>
#include <functional>
#include <deque>
#include <iostream>
#include <cstring>
#include <queue>
#include <cstdio>
#include <stack>
#include <climits>
#include <sys/time.h>
#include <cctype>
using namespace std;
typedef long long ll;
#define MODN 1000000000000001
ll memo[3001][1501];
ll combi(ll a, ll b) {
/* if (a < (b<<1)) b = a-b; */
if (b == 1) return memo[a][b] = a;
if (a == b || b == 0) return memo[a][b] = 1;
if (memo[a][b]) return memo[a][b];
memo[a][b]=combi(a-1, b-1)+combi(a-1, b);
return memo[a][b] = memo[a][b]%MODN;
}
ll hcom(ll l, ll s) {
// return combi(l+s-1, l-1);
return combi(l+s-1, s-1);
}
int main() {
for (int i = 1; i < 1501; i++) {
for (int j = i; j < 1501; j++) {
hcom(j, i);
}
}
int q;
scanf("%d", &q);
for (int i = 0; i < q; i++) {
ll d, x, t;
scanf("%lld %lld %lld", &d, &x, &t);
if (hcom(x, d) > t) {
puts("ZETUBOU");
}else {
puts("AC");
}
}
}
nanasili