結果

問題 No.548 国士無双
ユーザー RIGIHRIGIH
提出日時 2017-08-01 03:58:36
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 816 bytes
コンパイル時間 627 ms
コンパイル使用メモリ 65,640 KB
実行使用メモリ 4,504 KB
最終ジャッジ日時 2023-09-19 08:38:14
合計ジャッジ時間 1,795 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 AC 2 ms
4,380 KB
testcase_03 WA -
testcase_04 AC 2 ms
4,376 KB
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 AC 2 ms
4,376 KB
testcase_09 AC 1 ms
4,376 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 AC 2 ms
4,376 KB
testcase_13 WA -
testcase_14 WA -
testcase_15 AC 2 ms
4,380 KB
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 AC 2 ms
4,376 KB
testcase_20 AC 2 ms
4,376 KB
testcase_21 AC 1 ms
4,376 KB
testcase_22 WA -
testcase_23 AC 1 ms
4,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <stdio.h>
#include <cstring>
#include <math.h>
#include <algorithm>
#include <vector>
#include <string>
#define rep(i,n) for(int i=0;i<n;i++)
#define rrep(i,n) for(int i=n-1;i>=0;i--)
#define FOR(i,a,b) for(int i=a;i<b;i++)
#define ll long long
#define LL long long
#define mass 1000000007
using namespace std;
int keta(int n,int k){return (n/int(pow(10,double(k-1)))) % 10;} //nの下からk桁目



int main(){

	char a[13];
	rep(i,13){
		cin>>a[i];
	}
	int b[13];
	rep(i,13){
		b[i]=0;
	}
	rep(i,13){
		if(int(a[i])>109){
			cout<<"Impossible"<<endl;
			return 0;
		}
		b[ int(a[i])-97 ]++;
	}
	rep(i,13){
		if(b[i]==0){
			cout<<char(i+97)<<endl;
			return 0;
		}else if(b[i]>1){
			cout<<"Impossible"<<endl;
			return 0;
		}
	}
	rep(i,13){
		cout<<char(i+97)<<endl;
	}
	return 0;
}
0