結果
| 問題 |
No.587 七対子
|
| コンテスト | |
| ユーザー |
kekenx
|
| 提出日時 | 2020-04-19 20:52:53 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 441 bytes |
| コンパイル時間 | 1,667 ms |
| コンパイル使用メモリ | 173,384 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-07-19 20:06:40 |
| 合計ジャッジ時間 | 2,682 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 35 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
string s;
cin >> s;
map<char, int> mp;
for (int i = 0; i < 13; ++i) mp[s[i]]++;
if (mp.size() != 7) {
puts("Impossible");
} else {
int ans = -1;
for (auto const &e: mp) {
if (e.second == 1) {
if (ans != -1) {
puts("Impossible");
return 0;
}
ans = e.first;
}
}
cout << (char)ans << '\n';
}
return 0;
}
kekenx