結果
| 問題 | No.548 国士無双 |
| コンテスト | |
| ユーザー |
SSRS
|
| 提出日時 | 2020-08-24 07:43:33 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 448 bytes |
| コンパイル時間 | 778 ms |
| コンパイル使用メモリ | 75,736 KB |
| 実行使用メモリ | 6,824 KB |
| 最終ジャッジ日時 | 2024-11-06 03:29:50 |
| 合計ジャッジ時間 | 1,642 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 1 WA * 23 |
ソースコード
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
using namespace std;
int main(){
string S;
cin >> S;
bool ok = false;
for (int i = 0; i < 13; i++){
char c = 'a' + i;
string T = S + c;
vector<int> cnt(13, 0);
for (int j = 0; j < 14; j++){
cnt[T[j] - 'a']++;
}
sort(cnt.begin(), cnt.end());
if (cnt[12] != 0){
cout << c << endl;
ok = true;
}
}
if (!ok){
cout << "Impossible" << endl;
}
}
SSRS