結果
| 問題 |
No.587 七対子
|
| コンテスト | |
| ユーザー |
Kutimoti_T
|
| 提出日時 | 2018-06-13 00:01:19 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 423 bytes |
| コンパイル時間 | 1,384 ms |
| コンパイル使用メモリ | 169,220 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-06-30 13:58:30 |
| 合計ジャッジ時間 | 2,493 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 30 WA * 5 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
using i64 = long long;
#define rep(i,s,e) for(int (i) = (s);(i) <= (e);(i)++)
string s;
int main(){
cin >> s;
map<char,int> mp;
for(char c : s){
mp[c]++;
}
vector<pair<char,int>> ans;
for(auto p : mp){
if(p.second == 1)
ans.push_back(p);
}
if(ans.size() == 1){
cout << ans[0].first << endl;
}
else{
cout << "Impossible" << endl;
}
}
Kutimoti_T