結果
問題 | No.2925 2-Letter Shiritori |
ユーザー |
|
提出日時 | 2024-12-26 13:52:17 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
RE
|
実行時間 | - |
コード長 | 1,162 bytes |
コンパイル時間 | 6,613 ms |
コンパイル使用メモリ | 324,216 KB |
実行使用メモリ | 25,580 KB |
平均クエリ数 | 0.92 |
最終ジャッジ日時 | 2024-12-26 13:52:34 |
合計ジャッジ時間 | 13,005 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | RE * 2 |
other | RE * 10 |
ソースコード
#include <bits/stdc++.h>#include <atcoder/all>using namespace std;using ll = long long;using ull = unsigned long long;using mint = atcoder::modint998244353;using maxt = atcoder::modint1000000007;vector<ll> Era(int N) {vector<ll> ans(0, 0);vector<bool> isprime(N + 1, true);isprime.at(1) = false;for(int i = 1; i <= N; i++) {if(isprime.at(i)) {ans.push_back(i);for(int j = 2 * i; j <= N; j += i) {isprime.at(j) = false;}}}return ans;}ll POW(ll a, int N) {if(N == 1) {return a;}ll ans = POW(a, N / 2) * POW(a, N / 2);if(N % 2 == 1) {ans *= a;}return ans;}//ライブラリここまでint main() {int alpha;cin >> alpha;map<char, set<string>> str;for(int i = 0; i < 26; i++) {for(int j = 0; j < 26; j++) {string tmp = "";tmp += (char)(i + 65);tmp += (char)(j + 65);str[(char)(i + 65)].insert(tmp);}}char ans = '?';while(ans != '!') {string tmp = *begin(str[alpha]);cout << tmp << endl;str[alpha].erase(tmp);cin >> ans >> tmp;str[tmp.at(0)].erase(tmp);alpha = tmp.at(1);}}