結果

問題 No.250 atetubouのzetubou
ユーザー nanasilinanasili
提出日時 2015-07-31 11:44:33
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 1,134 bytes
コンパイル時間 1,342 ms
コンパイル使用メモリ 81,768 KB
実行使用メモリ 33,848 KB
最終ジャッジ日時 2023-09-24 22:26:52
合計ジャッジ時間 3,693 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 AC 78 ms
33,724 KB
testcase_16 AC 77 ms
33,592 KB
testcase_17 AC 78 ms
33,792 KB
testcase_18 AC 78 ms
33,796 KB
testcase_19 AC 79 ms
33,600 KB
testcase_20 AC 80 ms
33,680 KB
testcase_21 AC 75 ms
33,672 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#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");
    }
  }

}
0