結果
| 問題 | No.587 七対子 | 
| コンテスト | |
| ユーザー |  forest3 | 
| 提出日時 | 2020-04-07 14:18:52 | 
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 2 ms / 2,000 ms | 
| コード長 | 387 bytes | 
| コンパイル時間 | 2,004 ms | 
| コンパイル使用メモリ | 172,996 KB | 
| 実行使用メモリ | 5,376 KB | 
| 最終ジャッジ日時 | 2024-07-19 20:05:47 | 
| 合計ジャッジ時間 | 2,701 ms | 
| ジャッジサーバーID (参考情報) | judge2 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 35 | 
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main()
{
	string S;
	cin >> S;
	map<char, int> mp;
	for( int i = 0; i < S.size(); i++ ) {
		mp[ S[i] ]++;
	}
	int cnt = 0;
	for( auto e : mp ) {
		if( e.second == 2 ) cnt++;
	}
	if( cnt != 6 ) cout << "Impossible" << endl;
	else {
		for( auto e : mp ) {
			if( e.second == 2 ) continue;
			cout << e.first << endl;
			break;
		}
	}
}
            
            
            
        