結果
問題 |
No.587 七対子
|
ユーザー |
|
提出日時 | 2017-11-03 22:26:50 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 445 bytes |
コンパイル時間 | 682 ms |
コンパイル使用メモリ | 73,848 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-22 15:53:59 |
合計ジャッジ時間 | 1,590 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
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 << 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; }