結果
| 問題 |
No.2551 2, 3, 5, 7 Game
|
| コンテスト | |
| ユーザー |
tonphy
|
| 提出日時 | 2023-11-25 14:39:42 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
MLE
|
| 実行時間 | - |
| コード長 | 535 bytes |
| コンパイル時間 | 763 ms |
| コンパイル使用メモリ | 65,336 KB |
| 実行使用メモリ | 814,720 KB |
| 最終ジャッジ日時 | 2024-09-26 10:45:54 |
| 合計ジャッジ時間 | 4,650 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | MLE * 1 -- * 9 |
ソースコード
#include<iostream>
using namespace std;
int d[4]={2,3,5,7};
int dfs(int num,int stat,int n);
int main(){
int t;
cin>>t;
for(int i=0;i<t;i++){
int n;
cin>>n;
if(dfs(1,1,n)==1){
cout<<"sepa"<<endl;
}else{
cout<<"ryota"<<endl;
}
}
return(0);
}
int dfs(int num,int stat,int n){
if(num>=n){
return(stat);
}
bool success=false;
for(int i=0;i<4;i++){
if(dfs(num*d[i],stat^1,n)==stat){
success=true;
}
}
if(success){
return(stat);
}
return(stat^1);
}
tonphy