結果
問題 |
No.548 国士無双
|
ユーザー |
![]() |
提出日時 | 2020-09-06 06:27:23 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 802 bytes |
コンパイル時間 | 1,645 ms |
コンパイル使用メモリ | 173,388 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-29 06:38:13 |
合計ジャッジ時間 | 2,757 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 24 |
ソースコード
#include<bits/stdc++.h> using namespace std; using ll=long long; #define rep2(i, a, n) for(int i = (a); i < (n); i++) #define rep(i, n) rep2(i,0,n) template<typename S,typename T,typename U>void flagfunc1(S flag,T A,U B){flag?cout<<A<<'\n':cout<<B<<'\n';} int main(){ cin.tie(nullptr);ios_base::sync_with_stdio(false); string s;cin>>s; map<char,int> map; rep(i,13)map[s[i]]++; int cnt=0; for(auto itr=map.begin();itr!=map.end();++itr){ //cout<<"key="<<itr->first<<",val="<<itr->second<<"\n"; cnt++; } //cnt==12or13 if(cnt==12){ rep(i,13){ char hoge=i+'a'; if(map[hoge]==0){ cout<<hoge<<endl; } } }else if(cnt==13){ rep(i,13){ char hoge=i+'a'; cout<<hoge<<endl; } //cnt<11 }else{ cout<<"Impossible"<<endl; } }