結果

問題 No.250 atetubouのzetubou
ユーザー MamonboMamonbo
提出日時 2015-08-17 00:56:15
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 912 bytes
コンパイル時間 98 ms
コンパイル使用メモリ 10,688 KB
実行使用メモリ 7,952 KB
最終ジャッジ日時 2023-09-25 12:30:00
合計ジャッジ時間 2,771 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 70 ms
7,836 KB
testcase_01 AC 25 ms
7,768 KB
testcase_02 AC 94 ms
7,824 KB
testcase_03 AC 99 ms
7,816 KB
testcase_04 AC 91 ms
7,820 KB
testcase_05 AC 93 ms
7,880 KB
testcase_06 AC 75 ms
7,748 KB
testcase_07 AC 45 ms
7,920 KB
testcase_08 AC 91 ms
7,800 KB
testcase_09 AC 71 ms
7,772 KB
testcase_10 AC 94 ms
7,808 KB
testcase_11 AC 64 ms
7,788 KB
testcase_12 AC 87 ms
7,792 KB
testcase_13 AC 54 ms
7,824 KB
testcase_14 AC 15 ms
7,808 KB
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 AC 16 ms
7,872 KB
testcase_21 AC 16 ms
7,936 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#coding=UTF-8

#数学的に煮詰めないと間に合わなさそうだな
Q=int(input())
for idx in range(0,Q,1):
    mojir=input()
    hyo=mojir.split(' ')
    Depth=int(hyo[0])#1500重ループとかZETUBOUでしょ
    width=int(hyo[1])
    Timeslimit=int(hyo[2])
    #あれか、n個の箱の中に合計w個のミカン入れる話か
    #nHrつかうやつ (D-1+w)C(w)でいいか
    sisan=1
#    print(list(range(Depth-1+width,Depth-1,-1)))
    #オーダー的にはO(QW) \sim 10^7で間に合うはず
    #あとはnot多倍長で頑張るということか
    nagasa=min(width,Depth-1)
    ans=True
    for idy in range(0,nagasa,1):
        sisan=sisan*(Depth-1+width-idy)//(idy+1)#割り算は小さい方から
        if sisan > Timeslimit:#単調増加のために打ち切りが使える
            print('ZETUBOU')
            ans=False
            break
    if ans:
        print('AC')
0