結果
| 問題 |
No.2671 NUPC Decompressor
|
| コンテスト | |
| ユーザー |
t9unkubj
|
| 提出日時 | 2024-03-15 21:27:51 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 3 ms / 2,000 ms |
| コード長 | 798 bytes |
| コンパイル時間 | 2,160 ms |
| コンパイル使用メモリ | 179,676 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-09-30 00:23:27 |
| 合計ジャッジ時間 | 2,975 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 13 |
ソースコード
/**
* author: t9unkubj
* created: 2024-03-15
*/
#include<bits/stdc++.h>
#ifdef t9unkubj
#define _GLIBCXX_DEBUG
#define dbg(x) cout<<__LINE__<<" "<<#x<<":="<<x<<endl;
#else
#define dbg(x) t9unkubj
#endif
using namespace std;
//#include<atcoder/all>
//using namespace atcoder;
int main(){
ios::sync_with_stdio(false);
std::cin.tie(nullptr);
string s="NUPC";
vector<string>se;
for(int i=0;i<16;i++){
string t;
for(int j=0;j<8;j++){
if(j&1){
if(i>>((j-1)/2)&1)t+=t;
}
else{
t+=s[j/2];
}
}
se.push_back(t);
}
sort(se.begin(),se.end(),[](string s,string t){
for(int i=0;i<min<int>(s.size(),t.size());i++){
if(s[i]!=t[i])return s[i]<t[i];
}
if((int)s.size()>(int)t.size())return false;
return true;
});
int k;
cin>>k;
k--;
cout<<se[k]<<endl;
}
t9unkubj