結果
| 問題 |
No.548 国士無双
|
| コンテスト | |
| ユーザー |
templepmet
|
| 提出日時 | 2017-07-28 22:35:11 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 577 bytes |
| コンパイル時間 | 589 ms |
| コンパイル使用メモリ | 74,116 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-09-17 13:00:37 |
| 合計ジャッジ時間 | 1,259 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 23 WA * 1 |
ソースコード
#include <iostream>
#include <string>
#include <cmath>
#include <vector>
#include <algorithm>
#include <queue>
#include <map>
#include <utility>
#include <functional>
using namespace std;
int main() {
string s;
int cnt[26] = { 0 };
cin >> s;
for (int i = 0; i < 13; ++i) {
cnt[s[i] - 'a']++;
if (cnt[s[i] - 'a'] > 2) {
cout << "Impossible" << endl;
return 0;
}
}
for (int i = 0; i < 13; ++i) {
if (cnt[i] == 0) {
cout << (char)(i + 'a') << endl;
return 0;
}
}
for (int i = 0; i < 13; ++i) {
cout << (char)(i + 'a') << endl;
}
return 0;
}
templepmet