結果
| 問題 |
No.548 国士無双
|
| コンテスト | |
| ユーザー |
かぼちゃ
|
| 提出日時 | 2018-04-15 13:04:00 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 783 bytes |
| コンパイル時間 | 534 ms |
| コンパイル使用メモリ | 73,176 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-09-17 14:49:11 |
| 合計ジャッジ時間 | 1,198 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge6 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 23 WA * 1 |
ソースコード
#include <iostream>
#include <vector>
#include <algorithm>
#include <math.h>
#include <map>
#include <set>
#define ALL(x) (x).begin(),(x).end()
#define RALL(x) (x).rbegin(),(x).rend()
#define REP(i,a,n) for(int i = (a);i < (n);i++)
#define PI 3.14159265359
#define MOD 1000000007
using namespace std;
int main(){
string s,b = "abcdefghijklm";
cin >> s;
vector<int> a(13);
int m = 0;
REP(i, 0, 13){
int index = s[i]-'a';
if(index > 13)index = 0;
a[index]++;
m = max(m,a[index]);
}
if(m > 2)cout << "Impossible\n";
else if(m == 2){
REP(i, 0, 13){
if(a[i] == 0)cout << b[i] << endl;
}
}
else {
REP(i, 0, 13){
cout << b[i] << endl;
}
}
return 0;
}
かぼちゃ