結果

問題 No.587 七対子
ユーザー 👑 Nafmo2Nafmo2
提出日時 2017-04-14 21:53:10
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
RE  
実行時間 -
コード長 860 bytes
コンパイル時間 907 ms
コンパイル使用メモリ 84,412 KB
実行使用メモリ 4,508 KB
最終ジャッジ日時 2023-09-25 19:23:29
合計ジャッジ時間 5,925 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,388 KB
testcase_01 RE -
testcase_02 RE -
testcase_03 RE -
testcase_04 RE -
testcase_05 RE -
testcase_06 RE -
testcase_07 RE -
testcase_08 RE -
testcase_09 RE -
testcase_10 RE -
testcase_11 RE -
testcase_12 RE -
testcase_13 RE -
testcase_14 RE -
testcase_15 RE -
testcase_16 AC 2 ms
4,380 KB
testcase_17 RE -
testcase_18 RE -
testcase_19 RE -
testcase_20 RE -
testcase_21 AC 1 ms
4,380 KB
testcase_22 RE -
testcase_23 RE -
testcase_24 AC 1 ms
4,376 KB
testcase_25 RE -
testcase_26 RE -
testcase_27 RE -
testcase_28 RE -
testcase_29 RE -
testcase_30 AC 1 ms
4,380 KB
testcase_31 AC 2 ms
4,380 KB
testcase_32 RE -
testcase_33 RE -
testcase_34 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

#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;
}
0