結果
| 問題 | No.587 七対子 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-06-12 07:40:57 |
| 言語 | C++17 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 410 bytes |
| 記録 | |
| コンパイル時間 | 1,255 ms |
| コンパイル使用メモリ | 215,420 KB |
| 実行使用メモリ | 6,400 KB |
| 最終ジャッジ日時 | 2026-06-10 15:41:38 |
| 合計ジャッジ時間 | 2,504 ms |
|
ジャッジサーバーID (参考情報) |
judge3_1 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 35 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
#define REP(i,n) for(int i=0; i<(int)(n); i++)
int main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
string s;
cin >> s;
vector<int> cnt(128);
for (char c: s) cnt[c]++;
if (count(cnt.begin(), cnt.end(), 2) == 6)
cout << char(find(cnt.begin(), cnt.end(), 1) - cnt.begin()) << endl;
else
cout << "Impossible" << endl;
return 0;
}