結果
| 問題 |
No.587 七対子
|
| コンテスト | |
| ユーザー |
mmn15277198
|
| 提出日時 | 2021-02-08 21:23:04 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 602 bytes |
| コンパイル時間 | 686 ms |
| コンパイル使用メモリ | 81,288 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-07-05 23:13:43 |
| 合計ジャッジ時間 | 1,703 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 35 |
ソースコード
#include <iostream>
#include <vector>
#include <algorithm>
#include <map>
using namespace std;
typedef long long ll;
int main(){
string s;
cin >> s;
map<char , int> mp;
for(auto i : s){
mp[i]++;
}
if(mp.size() != 7){
cout << "Impossible" << endl;
exit(0);
}
int cnt = 0;
for(auto i : mp){
if(i.second == 1)cnt++;
}
if(cnt > 1){
cout << "Impossible" << endl;
exit(0);
}
for(auto i : mp){
if(i.second == 1){
cout << i.first << endl;
}
}
return 0;
}
mmn15277198