結果
問題 |
No.3300 Frog Game
|
ユーザー |
|
提出日時 | 2025-10-05 15:23:26 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 665 bytes |
コンパイル時間 | 1,722 ms |
コンパイル使用メモリ | 194,736 KB |
実行使用メモリ | 7,716 KB |
最終ジャッジ日時 | 2025-10-05 15:23:36 |
合計ジャッジ時間 | 2,877 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 35 |
ソースコード
#include <bits/stdc++.h> using namespace std; using ll = long long; int main() { ios::sync_with_stdio(false); cin.tie(0); ll n, a, b; cin >> n >> a >> b; #if 0 vector<int> dp(n + 1); for(int i = 0; i <= n; i++){ int S = 0; if(i >= a) S |= 1 << dp[i - a]; if(i >= b) S |= 1 << dp[i - b]; while(S >> dp[i] & 1) dp[i]++; cerr << dp[i] << " "; } cerr << '\n'; #else ll c = a + b; n -= 2; n %= c; if(n < a){ cout << "ryota\n"; }else if(n >= b){ cout << "sepa\n"; }else{ n %= 2 * a; cout << (n < a ? "ryota" : "sepa") << '\n'; } #endif }