結果
| 問題 | No.587 七対子 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-04-02 05:08:37 |
| 言語 | C++11 (gcc 15.3.0 + boost 1.92.0) |
| 結果 |
AC
不安定
|
| 実行時間 | 1 ms / 2,000 ms |
| + 367µs | |
| コード長 | 389 bytes |
| 記録 | |
| コンパイル時間 | 111 ms |
| コンパイル使用メモリ | 39,680 KB |
| 実行使用メモリ | 5,888 KB |
| 最終ジャッジ日時 | 2026-08-19 00:21:25 |
| 合計ジャッジ時間 | 2,101 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 35 |
ソースコード
#include <cstdio>
int main(){
int cnt1=0,cnt2=0;
char str[14],alfa[26]={0},key;
scanf("%s",str);
for(int i=0;i<13;i++){
alfa[str[i]-'a']++;
}
for(int i=0;i<13;i++){
if(alfa[str[i]-'a']==1){cnt1++;key=str[i];}
if(alfa[str[i]-'a']==2)cnt2++;
}
if(cnt1==1 && cnt2==12)printf("%c\n",key);
else printf("Impossible\n");
return 0;
}