結果

問題 No.250 atetubouのzetubou
ユーザー ShibuyapShibuyap
提出日時 2020-02-29 13:05:07
言語 C++14
(gcc 13.2.0 + boost 1.83.0)
結果
AC  
実行時間 59 ms / 5,000 ms
コード長 850 bytes
コンパイル時間 1,698 ms
コンパイル使用メモリ 162,332 KB
実行使用メモリ 49,920 KB
最終ジャッジ日時 2024-04-21 21:33:24
合計ジャッジ時間 4,253 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 49 ms
49,792 KB
testcase_01 AC 37 ms
49,792 KB
testcase_02 AC 57 ms
49,792 KB
testcase_03 AC 59 ms
49,664 KB
testcase_04 AC 56 ms
49,664 KB
testcase_05 AC 56 ms
49,664 KB
testcase_06 AC 51 ms
49,792 KB
testcase_07 AC 43 ms
49,664 KB
testcase_08 AC 54 ms
49,920 KB
testcase_09 AC 50 ms
49,664 KB
testcase_10 AC 56 ms
49,792 KB
testcase_11 AC 47 ms
49,792 KB
testcase_12 AC 55 ms
49,664 KB
testcase_13 AC 45 ms
49,920 KB
testcase_14 AC 34 ms
49,664 KB
testcase_15 AC 56 ms
49,792 KB
testcase_16 AC 56 ms
49,664 KB
testcase_17 AC 56 ms
49,920 KB
testcase_18 AC 57 ms
49,664 KB
testcase_19 AC 56 ms
49,664 KB
testcase_20 AC 34 ms
49,664 KB
testcase_21 AC 35 ms
49,664 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#define rep(i,n) for(int i = 0; i < (n); ++i)
#define srep(i,s,t) for (int i = s; i < t; ++i)
#define drep(i,n) for(int i = (n)-1; i >= 0; --i)
using namespace std;
typedef long long int ll;
typedef pair<int,int> P;
#define yn {puts("AC");}else{puts("ZETUBOU");}
#define MAX_N 200005

ll com[3010][3010];

int main() {
    srep(i,1,3001){
        ll tmp = 1;
        rep(j,3000){
            com[i][j] = tmp;
            com[i][i-j] = tmp;
            if(j + 1 >= i - j)break;
            if(tmp > 1000000000000000){
                srep(k,j,i-j)com[i][k] = tmp;
                break;
            }
            tmp *= i - j;
            tmp /= j + 1;
        }
    }

    int q;
    cin >> q;
    rep(loop, q){
        ll d, x, t;
        cin >> d >> x >> t;
        if(com[x+d-1][x] <= t)yn;
    }
    
    return 0;
}
 
 
0