結果
| 問題 | No.587 七対子 | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2020-06-12 07:40:57 | 
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 4 ms / 2,000 ms | 
| コード長 | 410 bytes | 
| コンパイル時間 | 2,393 ms | 
| コンパイル使用メモリ | 194,820 KB | 
| 最終ジャッジ日時 | 2025-01-11 01:39:29 | 
| ジャッジサーバーID (参考情報) | judge5 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| 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;
}
            
            
            
        