結果

問題 No.2671 NUPC Decompressor
ユーザー mint
提出日時 2024-03-16 12:31:02
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 3 ms / 2,000 ms
コード長 469 bytes
コンパイル時間 2,481 ms
コンパイル使用メモリ 205,616 KB
最終ジャッジ日時 2025-02-20 06:47:45
ジャッジサーバーID
(参考情報)
judge1 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 13
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

int main() {
    ios::sync_with_stdio(false);
    cin.tie(0);
    int k; cin >> k;
    k--;
    string s = "NUPC";
    int y = 4;
    vector<string> t;
    for(int i = 0; i < (1 << y); i++){
        string tt;
        for(int j = 0; j < y; j++){
            tt += s[j];
            if(i&(1 << j)) tt += tt;
        }
        t.emplace_back(tt);
    }
    sort(t.begin(), t.end());
    cout << t[k] << '\n';
    return 0;
}
0