結果
| 問題 |
No.2925 2-Letter Shiritori
|
| コンテスト | |
| ユーザー |
forest3
|
| 提出日時 | 2025-02-13 16:16:22 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 446 bytes |
| コンパイル時間 | 1,685 ms |
| コンパイル使用メモリ | 166,632 KB |
| 実行使用メモリ | 26,216 KB |
| 平均クエリ数 | 3.17 |
| 最終ジャッジ日時 | 2025-02-13 16:16:27 |
| 合計ジャッジ時間 | 4,497 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 2 |
| other | WA * 10 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for( int i = 0; i < n; i++ )
using ll = long long;
int main() {
char c;
cin >> c;
set<char> st;
cout << "? " << c << c << endl;
st.insert(c);
while(1) {
string t;
cin >> t;
if(t[0] == '!') break;
st.insert(t[3]);
rep(i, 26) {
char cc = (char(i + 'a'));
if(st.count(cc) == 0) {
cout << "? " << cc << c << endl;
st.insert(cc);
break;
}
}
}
}
forest3