結果
問題 | No.548 国士無双 |
ユーザー |
![]() |
提出日時 | 2020-04-09 16:51:05 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 4 ms / 2,000 ms |
コード長 | 512 bytes |
コンパイル時間 | 2,695 ms |
コンパイル使用メモリ | 199,088 KB |
最終ジャッジ日時 | 2025-01-09 15:29:35 |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 24 |
ソースコード
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; map<char, int> d; for (char c : s) d[c]++; string t; for (auto x : d) { t.push_back(x.first); } if (t.size() == 13) { for (char c = 'a'; c <= 'm'; c++) cout << c << endl; } else if (t.size() < 12) { puts("Impossible"); } else { for (char c = 'a'; c <= 'm'; c++) { if (d[c] == 0) { cout << c << endl; } } } }