結果
| 問題 |
No.587 七対子
|
| コンテスト | |
| ユーザー |
hogeover30
|
| 提出日時 | 2018-01-17 19:48:51 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 316 bytes |
| コンパイル時間 | 2,000 ms |
| コンパイル使用メモリ | 200,300 KB |
| 最終ジャッジ日時 | 2025-01-05 07:36:25 |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 35 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main()
{
string s; cin>>s;
map<char, int> a;
for(auto& c: s) ++a[c];
int c2=0;
char res=-1;
for(auto& [x, y]: a)
y==2 ? ++c2 : res=x;
if (size(a)==7 && c2==6)
cout<<res<<endl;
else
cout<<"Impossible"<<endl;
}
hogeover30