結果
問題 |
No.548 国士無双
|
ユーザー |
![]() |
提出日時 | 2020-01-23 19:32:05 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 3 ms / 2,000 ms |
コード長 | 417 bytes |
コンパイル時間 | 1,637 ms |
コンパイル使用メモリ | 168,188 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-07-20 01:14:15 |
合計ジャッジ時間 | 2,231 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 24 |
ソースコード
#include <bits/stdc++.h> using namespace std; int main() { string S; cin >> S; vector<int> V(13); for (int i = 0; i < 13; i++) V.at(S.at(i) - 'a')++; int x, cnt = 0; for (int i = 0; i < 13; i++) if (!V.at(i)) x = i, cnt++; if (!cnt) { for (char c = 'a'; c <= 'm'; c++) cout << c << "\n"; } else if (cnt == 1) { cout << char('a' + x) << "\n"; } else { cout << "Impossible" << "\n"; } }