結果
| 問題 | No.548 国士無双 |
| コンテスト | |
| ユーザー |
youthfuldays072
|
| 提出日時 | 2026-09-05 01:08:36 |
| 言語 | C++23(gcc16) (gcc 16.1.0 + boost 1.92.0 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 1 ms / 2,000 ms |
| + 274µs | |
| コード長 | 454 bytes |
| 記録 | |
| コンパイル時間 | 3,031 ms |
| コンパイル使用メモリ | 172,776 KB |
| 実行使用メモリ | 9,792 KB |
| 最終ジャッジ日時 | 2026-09-05 01:08:41 |
| 合計ジャッジ時間 | 3,644 ms |
|
ジャッジサーバーID (参考情報) |
judge3_1 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 24 |
ソースコード
#include <iostream>
#include <set>
using namespace std;
int main() {
string s, ans;
cin >> s;
// 'a' 〜 'm' を1文字ずつ試す
for (char c = 'a'; c <= 'm'; c++) {
string t = s + c;
// 14文字の中にユニークな文字が13種類あれば正解
if (set<char>(t.begin(), t.end()).size() == 13) ans += c;
}
if (ans.empty()) cout << "Impossible\n";
else for (char c : ans) cout << c << '\n';
}
youthfuldays072