結果
問題 |
No.2551 2, 3, 5, 7 Game
|
ユーザー |
![]() |
提出日時 | 2023-11-25 14:43:13 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
MLE
|
実行時間 | - |
コード長 | 515 bytes |
コンパイル時間 | 661 ms |
コンパイル使用メモリ | 63,488 KB |
実行使用メモリ | 818,048 KB |
最終ジャッジ日時 | 2024-09-26 10:46:15 |
合計ジャッジ時間 | 5,151 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | MLE * 1 -- * 9 |
ソースコード
#include<iostream> using namespace std; int N; int d[4]={7,5,3,2}; int dfs(int num,int stat); int main(){ int t; cin>>t; for(int i=0;i<t;i++){ cin>>N; if(dfs(1,1)==1){ cout<<"sepa"<<endl; }else{ cout<<"ryota"<<endl; } } return(0); } int dfs(int num,int stat){ if(num>=N){ return(stat); } bool success=false; for(int i=0;i<4;i++){ if(dfs(num*d[i],stat^1)==stat){ success=true; } } if(success){ return(stat); } return(stat^1); }