結果
| 問題 |
No.3300 Frog Game
|
| コンテスト | |
| ユーザー |
ripity
|
| 提出日時 | 2025-10-05 14:58:15 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 919 bytes |
| コンパイル時間 | 5,441 ms |
| コンパイル使用メモリ | 335,096 KB |
| 実行使用メモリ | 7,720 KB |
| 最終ジャッジ日時 | 2025-10-05 14:58:22 |
| 合計ジャッジ時間 | 6,242 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 4 WA * 31 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
#include <atcoder/all>
using namespace atcoder;
using ll = long long;
using mint = modint998244353;
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
ll N, A, B;
cin >> N >> A >> B;
N -= 1;
string ans = "";
if(A != 1) {
ans = ((N - 1) % (A + B) < A ? "sepa" : "ryota");
}else if(A == 1 && B % 2 == 1) {
ans = (N % 2 == 1 ? "sepa" : "ryota");
}else if(A == 1 && B % 2 == 0) {
ll r = (N - 1) % (1 + B);
ans = (r < B && r % 2 == 0 ? "sepa" : "ryota");
}
cout << ans << endl;
// vector<int> dp(N + A + B);
// for(int i = N - 1; i >= 0; i--) {
// dp[i] = (1 - dp[i + A]) & (1 - dp[i + B]);
// }
// for(int i = 0; i <= N; i++) {
// cout << dp[i] << " \n"[i == N];
// }
// assert((dp[0] == 1 && ans == "sepa") || (dp[0] == 0 && ans == "ryota"));
}
ripity