結果
| 問題 | No.3300 Frog Game | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2025-10-05 14:42:05 | 
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 2 ms / 2,000 ms | 
| コード長 | 764 bytes | 
| コンパイル時間 | 2,657 ms | 
| コンパイル使用メモリ | 276,264 KB | 
| 実行使用メモリ | 7,716 KB | 
| 最終ジャッジ日時 | 2025-10-05 14:42:09 | 
| 合計ジャッジ時間 | 3,767 ms | 
| ジャッジサーバーID (参考情報) | judge4 / judge5 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 35 | 
ソースコード
#include<bits/stdc++.h>
using namespace std;
using ll =long long;
int main(){
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    ll N,A,B;
    cin>>N>>A>>B;
    ll g=gcd(A,B);
    N/=g;
    A/=g;
    B/=g;
    if(A>B)swap(A,B);
    N-=2;
    N%=(A+B);
    ll p=((A+B)/(2*A))*(2*A);
    // cout<<N<<" "<<p<<endl;
    if(N<p){
        cout<<(N%(2*A)<A?"ryota":"sepa")<<"\n";
        // return 0;
    }
    else{
        if(N>=B-A)cout<<"sepa"<<"\n";
        else cout<<"ryota"<<"\n";
    }
    return 0;
    vector<bool> P(100+1,0);
    P[0]=1;
    cout<<1<<"\n";
    ll L=A+B;
    for(int i=1;i<=100;i++){
        if(i>=A&&P[i-A]==0)P[i]=1;
        if(i>=B&&P[i-B]==0)P[i]=1;
        cout<<P[i];
        if(i%L==0)cout<<endl;
    }
    cout<<endl;
}  
            
            
            
        