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