結果
問題 | No.250 atetubouのzetubou |
ユーザー | ngtkana |
提出日時 | 2020-03-22 12:49:07 |
言語 | C++17 (gcc 13.2.0 + boost 1.83.0) |
結果 |
AC
|
実行時間 | 79 ms / 5,000 ms |
コード長 | 792 bytes |
コンパイル時間 | 1,840 ms |
コンパイル使用メモリ | 203,668 KB |
実行使用メモリ | 73,604 KB |
最終ジャッジ日時 | 2023-08-26 03:36:17 |
合計ジャッジ時間 | 4,649 ms |
ジャッジサーバーID (参考情報) |
judge12 / judge14 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 71 ms
73,604 KB |
testcase_01 | AC | 69 ms
73,396 KB |
testcase_02 | AC | 74 ms
73,560 KB |
testcase_03 | AC | 74 ms
73,344 KB |
testcase_04 | AC | 74 ms
73,560 KB |
testcase_05 | AC | 72 ms
73,504 KB |
testcase_06 | AC | 72 ms
73,564 KB |
testcase_07 | AC | 70 ms
73,564 KB |
testcase_08 | AC | 73 ms
73,352 KB |
testcase_09 | AC | 73 ms
73,556 KB |
testcase_10 | AC | 74 ms
73,344 KB |
testcase_11 | AC | 72 ms
73,484 KB |
testcase_12 | AC | 79 ms
73,508 KB |
testcase_13 | AC | 74 ms
73,460 KB |
testcase_14 | AC | 70 ms
73,372 KB |
testcase_15 | AC | 74 ms
73,404 KB |
testcase_16 | AC | 70 ms
73,396 KB |
testcase_17 | AC | 72 ms
73,344 KB |
testcase_18 | AC | 71 ms
73,400 KB |
testcase_19 | AC | 74 ms
73,500 KB |
testcase_20 | AC | 70 ms
73,508 KB |
testcase_21 | AC | 70 ms
73,460 KB |
ソースコード
#include<bits/stdc++.h> using lint=long long; lint inf=std::numeric_limits<lint>::max(); lint add(lint x,lint y){return inf-x<=y?inf:x+y;} void add_eq(lint&x,lint y){x=add(x,y);} int main(){ std::cin.tie(nullptr);std::ios_base::sync_with_stdio(false); std::cout.setf(std::ios_base::fixed);std::cout.precision(15); lint max=3000; std::vector<std::vector<lint>>binom(max+1,std::vector<lint>(max+1)); binom.at(0).at(0)=1; for(lint i=0;i<max;i++){ for(lint j=0;j<=i;j++){ add_eq(binom.at(i+1).at(j),binom.at(i).at(j)); add_eq(binom.at(i+1).at(j+1),binom.at(i).at(j)); } } lint q;std::cin>>q; while(q--){ lint d,x,t;std::cin>>d>>x>>t; std::cout<<(binom.at(x+d-1).at(d-1)<=t?"AC":"ZETUBOU")<<'\n'; } }