結果
| 問題 |
No.2671 NUPC Decompressor
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-03-15 22:59:24 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 586 bytes |
| コンパイル時間 | 3,515 ms |
| コンパイル使用メモリ | 257,180 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-09-30 02:34:11 |
| 合計ジャッジ時間 | 4,214 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 13 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main()
{
ios::sync_with_stdio(false);
cin.tie(nullptr);
string nupc = "NUPC";
vector<string> ans;
int k;
cin >> k;
for (int i = 0; i < 16; i++){
string s = "";
for (int j = 0; j < 8; j++){
if (j%2 == 0){
s += nupc[j/2];
} else{
if (i >> (j/2) & 1){
s += s;
}
}
}
ans.push_back(s);
}
sort(ans.begin(),ans.end());
cout << ans[k-1] << endl;
return 0;
}