結果
問題 | No.1220 yukipoker |
ユーザー | kappybar |
提出日時 | 2020-09-04 22:51:27 |
言語 | C++14 (gcc 12.3.0 + boost 1.83.0) |
結果 |
AC
|
実行時間 | 1,189 ms / 2,000 ms |
コード長 | 1,251 bytes |
コンパイル時間 | 5,590 ms |
コンパイル使用メモリ | 392,856 KB |
実行使用メモリ | 11,392 KB |
最終ジャッジ日時 | 2024-05-05 03:25:27 |
合計ジャッジ時間 | 13,797 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 30 ms
11,264 KB |
testcase_01 | AC | 30 ms
11,276 KB |
testcase_02 | AC | 30 ms
11,192 KB |
testcase_03 | AC | 30 ms
11,216 KB |
testcase_04 | AC | 31 ms
11,100 KB |
testcase_05 | AC | 29 ms
11,392 KB |
testcase_06 | AC | 29 ms
11,264 KB |
testcase_07 | AC | 30 ms
11,264 KB |
testcase_08 | AC | 30 ms
11,264 KB |
testcase_09 | AC | 30 ms
11,240 KB |
testcase_10 | AC | 28 ms
11,244 KB |
testcase_11 | AC | 523 ms
11,264 KB |
testcase_12 | AC | 576 ms
11,264 KB |
testcase_13 | AC | 1,147 ms
11,264 KB |
testcase_14 | AC | 1,102 ms
11,220 KB |
testcase_15 | AC | 709 ms
11,284 KB |
testcase_16 | AC | 845 ms
11,272 KB |
testcase_17 | AC | 479 ms
11,264 KB |
testcase_18 | AC | 638 ms
11,264 KB |
testcase_19 | AC | 1,168 ms
11,264 KB |
testcase_20 | AC | 1,189 ms
11,340 KB |
testcase_21 | AC | 30 ms
11,264 KB |
testcase_22 | AC | 30 ms
11,252 KB |
testcase_23 | AC | 31 ms
11,260 KB |
testcase_24 | AC | 31 ms
11,288 KB |
testcase_25 | AC | 32 ms
11,264 KB |
ソースコード
#include <bits/stdc++.h> #define rep(i,n) for(int i=0;i<(int)(n);i++) using namespace std; using ll = long long ; using P = pair<int,int> ; using pll = pair<long long,long long>; constexpr int INF = 1e9; constexpr long long LINF = 1e17; constexpr int MOD = 1000000007; constexpr double PI = 3.14159265358979323846; #include <boost/multiprecision/cpp_dec_float.hpp> #include <boost/multiprecision/cpp_int.hpp> namespace mp = boost::multiprecision; // 任意長整数型 using Bint = mp::cpp_int; // 仮数部が1024ビットの浮動小数点数型(TLEしたら小さくする) using Real = mp::number<mp::cpp_dec_float<100>>; Real fact[100001]; Real mypow(Real x, long long n) { Real ret = 1; while (n > 0) { if (n & 1) ret = (ret * x) ; x = (x * x) ; n >>= 1; } return ret; } int main(){ fact[0] = 1; for(int i=1;i<100001;i++) fact[i] = fact[i-1] * (Real)i; //cout << fact[100000] << endl; int q; cin >> q; while(q--){ int n,m,k; cin >> n >> m >> k; Real com = (fact[n] / fact[k]) / fact[n-k]; Real p = (Real)(n-k+1) * mypow(m,k-1); if(com < p) cout << "Flush" << endl; else cout << "Straight" << endl; } return 0; }