結果

問題 No.250 atetubouのzetubou
ユーザー しらっ亭しらっ亭
提出日時 2015-09-11 04:38:16
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 1,021 ms / 5,000 ms
コード長 527 bytes
コンパイル時間 100 ms
コンパイル使用メモリ 10,868 KB
実行使用メモリ 483,512 KB
最終ジャッジ日時 2023-09-26 10:28:27
合計ジャッジ時間 24,065 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 980 ms
483,512 KB
testcase_01 AC 962 ms
483,372 KB
testcase_02 AC 997 ms
483,376 KB
testcase_03 AC 1,003 ms
483,456 KB
testcase_04 AC 997 ms
483,488 KB
testcase_05 AC 1,000 ms
483,448 KB
testcase_06 AC 983 ms
483,380 KB
testcase_07 AC 969 ms
483,404 KB
testcase_08 AC 1,000 ms
483,440 KB
testcase_09 AC 1,021 ms
483,380 KB
testcase_10 AC 993 ms
483,372 KB
testcase_11 AC 980 ms
483,376 KB
testcase_12 AC 998 ms
483,512 KB
testcase_13 AC 974 ms
483,360 KB
testcase_14 AC 951 ms
483,484 KB
testcase_15 AC 1,011 ms
483,376 KB
testcase_16 AC 1,010 ms
483,488 KB
testcase_17 AC 1,005 ms
483,444 KB
testcase_18 AC 1,006 ms
483,380 KB
testcase_19 AC 1,004 ms
483,408 KB
testcase_20 AC 940 ms
483,372 KB
testcase_21 AC 945 ms
483,416 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def solve():
    dp = [[0 for x in range(1501)] for d in range(1501)]
    for d in range(1, 1501):
        dp1 = dp[d - 1]
        s = 0
        for x in range(1501):
            s += dp1[x]
            if d == 1:
                dp[d][x] = 1
            elif x == 0:
                dp[d][x] = 1
            else:
                dp[d][x] += s

    Q = int(input())
    for _ in range(Q):
        d, x, t = map(int, input().split())
        print('AC' if dp[d][x] <= t else 'ZETUBOU')


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