結果
| 問題 |
No.548 国士無双
|
| コンテスト | |
| ユーザー |
tenkyu9
|
| 提出日時 | 2018-03-25 19:29:02 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 750 bytes |
| コンパイル時間 | 1,533 ms |
| コンパイル使用メモリ | 82,432 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-09-17 14:47:32 |
| 合計ジャッジ時間 | 2,381 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 23 WA * 1 |
ソースコード
#include<iostream>
#include<string>
#include<algorithm>
#include<cmath>
#include<iomanip>
#include<cstring>
#include<map>
#include<vector>
#include<queue>
#include<climits>
#include<set>
using namespace std;
typedef long long int ll;
int main(){
int x[26]={0};
string s;
string abc="abcdefghijklmnopqrstuvwxyz";
cin >> s;
for(int i=0; i<13; i++){
for(int j=0; j<26; j++){
if(s[i]==abc[j]){
x[j]++;
}
}
}
for(int i=0; i<26; i++){
if(x[i]>2){
cout << "Impossible" << endl;
return 0;
}
if(x[i]>0 && i>13){
cout << "Impossible" << endl;
return 0;
}
}
for(int i=0; i<13; i++){
if(x[i]==0){
cout << abc[i] << endl;
return 0;
}
}
for(int i=0; i<13; i++){
cout << abc[i] << endl;
}
return 0;
}
tenkyu9