結果
問題 | No.250 atetubouのzetubou |
ユーザー |
![]() |
提出日時 | 2015-10-26 01:33:50 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 45 ms / 5,000 ms |
コード長 | 677 bytes |
コンパイル時間 | 1,405 ms |
コンパイル使用メモリ | 158,528 KB |
実行使用メモリ | 73,360 KB |
最終ジャッジ日時 | 2024-09-13 09:12:14 |
合計ジャッジ時間 | 3,793 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 20 |
ソースコード
#include<bits/stdc++.h>using namespace std;#define int long long#define rep(i,n) for(int i=0;i<(n);i++)#define REP(i,a,b) for(int i=(a);i<(b);i++)#define pb push_back#define all(v) (v).begin(),(v).end()typedef vector<int>vi;const int INF=1001001001001001001ll;int comb[3000][3000];signed main(){comb[0][0]=1;for(int i=1;i<3000;i++){comb[i][0]=comb[i][i]=1;for(int j=1;j<i;j++){comb[i][j]=min(INF,comb[i-1][j]+comb[i-1][j-1]);}}int Q;cin>>Q;while(Q--){int d,x,t;cin>>d>>x>>t;if(comb[x+d-1][d-1]>t)cout<<"ZETUBOU"<<endl;else cout<<"AC"<<endl;}return 0;}