結果
問題 | No.548 国士無双 |
ユーザー |
👑 |
提出日時 | 2020-01-22 07:37:01 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 520 bytes |
コンパイル時間 | 521 ms |
コンパイル使用メモリ | 71,416 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-07-07 06:12:27 |
合計ジャッジ時間 | 1,181 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 24 |
ソースコード
#include <iostream> #include <algorithm> using namespace std; int main(){ string s;cin>>s;sort(s.begin(),s.end());s.erase(unique(s.begin(),s.end()),s.end()); if(s.size() == 13){ for(char i = 'a'; 'm' >= i; i++){ cout << i << endl; } }else if(s.size() == 12){ for(int i = 0; 13 > i; i++){ if(s[i] != 'a'+i){ cout << (char)('a'+i) << endl; return 0; } } }else{ cout << "Impossible" << endl; } }