結果
| 問題 | No.587 七対子 | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2017-04-14 21:53:10 | 
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) | 
| 結果 | 
                                RE
                                 
                             | 
| 実行時間 | - | 
| コード長 | 860 bytes | 
| コンパイル時間 | 781 ms | 
| コンパイル使用メモリ | 86,120 KB | 
| 実行使用メモリ | 6,948 KB | 
| 最終ジャッジ日時 | 2024-07-18 15:20:10 | 
| 合計ジャッジ時間 | 6,215 ms | 
| ジャッジサーバーID (参考情報) | judge4 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 6 RE * 29 | 
ソースコード
#include<iostream>
#include<cstdio>
#include<cmath>
#include<cstring>
#include<string>
#include<stack>
#include<queue>
#include<vector>
#include<algorithm>
#include<iomanip>
#include<cassert>
typedef long long int ll;
using namespace std;
#define FOR(i,a,b) for (int i=(a);i<(b);i++)
#define REP(i,n) for (int i=0;i<(n);i++)
#define EREP(i,n) for (int i=1;i<=(n);i++)
const int MOD = 1000000007;
const int INF = 1000000;
    string S;
     int Y=0,E=0,A[15],H=0,EX=0;
    bool fir=true;
int main(){
    ios::sync_with_stdio(false);
    cin>>S;
    sort(S.begin(),S.end());
    string as="Impossible";
    REP(i,13){
        A[(((int)S[i]-'a')%26)]++;
    }
    REP(i,26){
        if(A[i]==0)continue;
        if(A[i]==1){
            if(!fir){as="Impossible";break;}
            as=(char)(i+'a');fir=false;
        }
    }
    cout<<as<<endl;
    return 0;
}
            
            
            
        