結果
問題 | No.587 七対子 |
ユーザー | 👑 Nafmo2 |
提出日時 | 2017-04-14 22:15:41 |
言語 | C++14 (gcc 12.3.0 + boost 1.83.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 791 bytes |
コンパイル時間 | 883 ms |
コンパイル使用メモリ | 84,320 KB |
実行使用メモリ | 4,384 KB |
最終ジャッジ日時 | 2023-09-25 19:23:53 |
合計ジャッジ時間 | 2,202 ms |
ジャッジサーバーID (参考情報) |
judge15 / judge13 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 1 ms
4,380 KB |
testcase_01 | AC | 1 ms
4,380 KB |
testcase_02 | AC | 2 ms
4,380 KB |
testcase_03 | AC | 2 ms
4,380 KB |
testcase_04 | AC | 1 ms
4,380 KB |
testcase_05 | AC | 1 ms
4,384 KB |
testcase_06 | WA | - |
testcase_07 | WA | - |
testcase_08 | WA | - |
testcase_09 | AC | 1 ms
4,384 KB |
testcase_10 | AC | 2 ms
4,380 KB |
testcase_11 | WA | - |
testcase_12 | AC | 1 ms
4,380 KB |
testcase_13 | AC | 2 ms
4,380 KB |
testcase_14 | AC | 2 ms
4,380 KB |
testcase_15 | AC | 1 ms
4,380 KB |
testcase_16 | AC | 2 ms
4,384 KB |
testcase_17 | AC | 1 ms
4,380 KB |
testcase_18 | AC | 2 ms
4,384 KB |
testcase_19 | AC | 2 ms
4,380 KB |
testcase_20 | AC | 1 ms
4,380 KB |
testcase_21 | AC | 2 ms
4,380 KB |
testcase_22 | AC | 2 ms
4,380 KB |
testcase_23 | AC | 1 ms
4,380 KB |
testcase_24 | AC | 2 ms
4,380 KB |
testcase_25 | AC | 1 ms
4,380 KB |
testcase_26 | AC | 1 ms
4,384 KB |
testcase_27 | AC | 1 ms
4,380 KB |
testcase_28 | WA | - |
testcase_29 | AC | 2 ms
4,384 KB |
testcase_30 | AC | 1 ms
4,384 KB |
testcase_31 | AC | 1 ms
4,384 KB |
testcase_32 | AC | 2 ms
4,380 KB |
testcase_33 | AC | 2 ms
4,380 KB |
testcase_34 | AC | 2 ms
4,380 KB |
ソースコード
#include<iostream> #include<cstdio> #include<cmath> #include<cstring> #include<string> #include<stack> #include<queue> #include<vector> #include<algorithm> #include<iomanip> 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++) string S; int Y=0,E=0,A[30],H=0,EX=0; bool fir=true; int main(){ ios::sync_with_stdio(false); cin>>S; sort(S.begin(),S.end()); string as="Impossible\0"; 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+(int)'a');fir=false; } } cout<<as<<endl; return 0; }