結果

問題 No.3300 Frog Game
ユーザー karinohito
提出日時 2025-10-05 14:41:55
言語 C++23
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 761 bytes
コンパイル時間 2,762 ms
コンパイル使用メモリ 278,588 KB
実行使用メモリ 7,720 KB
最終ジャッジ日時 2025-10-05 14:42:03
合計ジャッジ時間 3,943 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other WA * 35
権限があれば一括ダウンロードができます

ソースコード

diff #

#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;

}  

0