結果
| 問題 |
No.2671 NUPC Decompressor
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-03-13 20:52:17 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 546 bytes |
| コンパイル時間 | 2,420 ms |
| コンパイル使用メモリ | 205,448 KB |
| 最終ジャッジ日時 | 2025-02-20 04:13:01 |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 13 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main() {
int K;
cin >> K;
const int size = 4;
vector<string> decompressed;
string nupc = "NUPC";
for (int bit = 0; bit < (1 << size); bit++) {
string tmp = "";
for (int i = 0; i < size; i++) {
tmp.push_back(nupc[i]);
if (bit & (1 << i)) {
tmp += tmp;
}
}
decompressed.push_back(tmp);
}
sort(decompressed.begin(), decompressed.end());
cout << decompressed[K - 1] << endl;
}