結果
| 問題 | No.548 国士無双 |
| コンテスト | |
| ユーザー |
Bantako
|
| 提出日時 | 2017-08-22 19:26:01 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 475 bytes |
| コンパイル時間 | 1,629 ms |
| コンパイル使用メモリ | 168,444 KB |
| 実行使用メモリ | 6,948 KB |
| 最終ジャッジ日時 | 2024-07-05 20:30:19 |
| 合計ジャッジ時間 | 2,382 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 22 WA * 2 |
コンパイルメッセージ
main.cpp:7:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
7 | main(){
| ^~~~
ソースコード
#include<bits/stdc++.h>
typedef long long ll;
using namespace std;
int INF = 1e9;
int MOD = 1e9+7;
int cnt[13];
main(){
string s;
cin >> s;
for(char c:s)if(c <= 'm')cnt[c-'a']++;
int maxe = *max_element(cnt,cnt+13);
if(accumulate(cnt,cnt+13,0) != 13){
cout << "Impossible" << endl;
}else if(maxe == 2){
printf("%c\n",distance(cnt,min_element(cnt,cnt+13))+'a');
}else{
for(int i = 0;i < 13;i++)printf("%c\n",i+'a');
}
}
Bantako