結果
| 問題 |
No.587 七対子
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-11-03 22:27:35 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 461 bytes |
| コンパイル時間 | 655 ms |
| コンパイル使用メモリ | 73,700 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-11-22 15:55:02 |
| 合計ジャッジ時間 | 1,593 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 32 WA * 3 |
ソースコード
#include <iostream>
#include <algorithm>
#include <vector>
#include <string>
using namespace std;
int main() {
string s;
cin >> s;
if (s.size() != 13) {
cout << "Impossible" << endl;
return 0;
}
sort(s.begin(), s.end());
string t(s);
t.erase(unique(t.begin(), t.end()), t.end());
if (t.size() != 7) {
cout << "Impossible" << endl;
return 0;
}
char ans = 0;
for (char c : s) {
ans ^= c;
}
cout << ans << endl;
}