結果
問題 | No.250 atetubouのzetubou |
ユーザー |
|
提出日時 | 2017-01-09 01:49:13 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 312 bytes |
コンパイル時間 | 646 ms |
コンパイル使用メモリ | 64,936 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-12-17 23:54:49 |
合計ジャッジ時間 | 2,539 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 15 WA * 5 |
コンパイルメッセージ
main.cpp:16:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 16 | main() | ^~~~
ソースコード
#include<iostream> using namespace std; long t; bool c(int d,int x) { long a=1; d--; if(d>x)swap(d,x); for(int i=1;i<=d;i++) { a*=(d+x-i+1);a/=i; if(a>t)return false; } return true; } main() { int n;cin>>n; for(int i=0;i<n;i++) { int d,x;cin>>d>>x>>t; cout<<(c(d,x)?"AC":"ZETUBOU")<<endl; } }