結果
問題 | No.2671 NUPC Decompressor |
ユーザー |
![]() |
提出日時 | 2024-12-06 12:29:41 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 470 bytes |
コンパイル時間 | 3,647 ms |
コンパイル使用メモリ | 258,212 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-12-06 12:29:46 |
合計ジャッジ時間 | 4,623 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 13 |
ソースコード
#include <bits/stdc++.h> using namespace std; int main() { int N; cin >> N; vector<string> S; vector<char> NUPC = {'N', 'U', 'P', 'C'}; for (int bit = 0; bit < (1 << 4); bit++) { string s; for (int i = 0; i < 4; i++) { s += NUPC[i]; if (bit & (1 << i)) { s += s; } } S.push_back(s); } sort(S.begin(),S.end()); cout << S[N - 1]; }