結果
問題 |
No.587 七対子
|
ユーザー |
![]() |
提出日時 | 2018-02-13 19:05:47 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 449 bytes |
コンパイル時間 | 500 ms |
コンパイル使用メモリ | 60,808 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-11-30 05:39:59 |
合計ジャッジ時間 | 1,510 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 32 WA * 3 |
ソースコード
#include<iostream> #include<algorithm> #include<vector> using namespace std; int main(){ int table[26]={},count=-1; char out; string str; cin >> str; for(int i=0;str[i]!='\0';i++){ table[str[i]-'a']++; } for(int i=0;i<26;i++){ if(!(table[i]==2||table[i]==0)){ out = 'a' + i; count++; } } if(count) cout << "Impossible" << endl; else cout << out << endl; }