結果
| 問題 |
No.548 国士無双
|
| コンテスト | |
| ユーザー |
nanophoto12
|
| 提出日時 | 2017-08-16 22:52:13 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 1,236 bytes |
| コンパイル時間 | 922 ms |
| コンパイル使用メモリ | 104,352 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-09-17 13:43:49 |
| 合計ジャッジ時間 | 1,742 ms |
|
ジャッジサーバーID (参考情報) |
judge6 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 24 |
ソースコード
#include <cmath>
#include <vector>
#include <list>
#include <map>
#include <set>
#include <functional>
#include <queue>
#include <iostream>
#include <string.h>
#include <iomanip>
#include <algorithm>
#include <functional>
#include <cstdint>
#include <climits>
#include <unordered_set>
#include <sstream>
#include <stack>
using namespace std;
typedef long long int ll;
typedef pair<int,int> pii;
typedef tuple<int,int,int> t3;
int main()
{
set<char> u;
const string key = "abcdefghijklm";
for(char c : key)
{
u.insert(c);
}
string s;
cin >> s;
map<char,int> m;
for(char c : s)
{
if(u.find(c) != u.end())
{
m[c]++;
}
}
const string err = "Impossible";
if(m.size() <= 11)
{
cout << err << endl;
return 0;
}
if(m.size() == 12)
{
for(auto c : u)
{
if(m[c] == 0)
{
cout << c << endl;
return 0;
}
}
return 0;
}
if(m.size() == 13)
{
for(auto c : u)
{
cout << c << endl;
}
return 0;
}
else
{
cout << err << endl;
return 0;
}
}
nanophoto12