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