結果
問題 |
No.548 国士無双
|
ユーザー |
![]() |
提出日時 | 2023-08-17 17:18:18 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 790 bytes |
コンパイル時間 | 888 ms |
コンパイル使用メモリ | 105,580 KB |
最終ジャッジ日時 | 2025-02-16 08:58:58 |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 22 WA * 2 |
ソースコード
#include<iostream> #include<string> #include<algorithm> #include<cctype> #include<set> #include<bitset> #include<math.h> #include<map> #include<queue> #include<iomanip> using namespace std; #ifdef _WIN32 #include <Windows.h> #endif int main() { string s, t = "abcdefghijklm", t2 = "abcdefghijklm"; cin >> s; if (s.size() != 13){ cout << "impossible" << endl; return 0; } for (int i = 0; i < 13; i++){ for (int j = 0; j < t.size(); j++){ if (s[i] == t[j]){ t.erase(t.begin()+j); break; } } } if (t.size() == 1) cout << t << endl; else if (t.size() == 0){ for (char c : t2){ cout << c << endl; } } else cout << "impossible" << endl; }