結果

問題 No.587 七対子
コンテスト
ユーザー yansi819
提出日時 2024-03-30 17:02:30
言語 C++17
(gcc 15.2.0 + boost 1.90.0)
コンパイル:
g++-15 -O2 -lm -std=c++17 -Wuninitialized -DONLINE_JUDGE -o a.out _filename_
実行:
./a.out
結果
WA  
実行時間 -
コード長 459 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 2,944 ms
コンパイル使用メモリ 281,380 KB
実行使用メモリ 11,968 KB
最終ジャッジ日時 2026-07-04 07:45:38
合計ジャッジ時間 4,218 ms
ジャッジサーバーID
(参考情報)
judge2_0 / judge1_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 32 WA * 3
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#include <bits/stdc++.h>
#include <atcoder/all>
using namespace std;
using namespace atcoder;
using ll = long long;
using ld = long double;

string S;
map<char, int> mp;

int main() {
  cin >> S;
  int N = S.size();
  for (int i = 0; i < N; i++) mp[S[i]]++;
  if (mp.size() == 7) {
    for (auto p: mp) {
      if (p.second == 1) {
        cout << p.first << endl;
        return 0;
      }
    }
  } else {
    cout << "Impossible" << endl;
  }
  return 0;
}
0