結果

問題 No.250 atetubouのzetubou
ユーザー nanaenanae
提出日時 2017-03-30 12:08:21
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 1,672 ms / 5,000 ms
コード長 533 bytes
コンパイル時間 89 ms
コンパイル使用メモリ 10,888 KB
実行使用メモリ 80,340 KB
最終ジャッジ日時 2023-09-21 08:37:41
合計ジャッジ時間 39,536 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1,654 ms
80,204 KB
testcase_01 AC 1,644 ms
80,156 KB
testcase_02 AC 1,659 ms
80,252 KB
testcase_03 AC 1,660 ms
80,244 KB
testcase_04 AC 1,660 ms
80,176 KB
testcase_05 AC 1,658 ms
80,248 KB
testcase_06 AC 1,671 ms
80,192 KB
testcase_07 AC 1,659 ms
80,248 KB
testcase_08 AC 1,664 ms
80,300 KB
testcase_09 AC 1,672 ms
80,244 KB
testcase_10 AC 1,651 ms
80,200 KB
testcase_11 AC 1,656 ms
80,288 KB
testcase_12 AC 1,656 ms
80,180 KB
testcase_13 AC 1,648 ms
80,132 KB
testcase_14 AC 1,640 ms
80,180 KB
testcase_15 AC 1,664 ms
80,280 KB
testcase_16 AC 1,657 ms
80,172 KB
testcase_17 AC 1,659 ms
80,224 KB
testcase_18 AC 1,657 ms
80,168 KB
testcase_19 AC 1,664 ms
80,340 KB
testcase_20 AC 1,663 ms
80,124 KB
testcase_21 AC 1,668 ms
80,176 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from sys import stdin

def solve():
    comb = [[0]*(3000 + 1) for i in range(3000 + 1)]
    inf = 10**15 + 1

    for n in range(3000 + 1):
        comb[n][0] = comb[n][n] = 1

        for k in range(1, n):
            comb[n][k] = min(inf, comb[n - 1][k] + comb[n - 1][k - 1])

    Q = int(stdin.readline())

    for q in range(Q):
        d, x, t = map(int, stdin.readline().split())

        if comb[d + x - 1][d - 1] > t:
            print('ZETUBOU')
        else:
            print('AC')

if __name__ == '__main__':
    solve()
0