結果
| 問題 |
No.2671 NUPC Decompressor
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-03-15 21:35:13 |
| 言語 | Rust (1.83.0 + proconio) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 2,000 ms |
| コード長 | 1,281 bytes |
| コンパイル時間 | 11,675 ms |
| コンパイル使用メモリ | 399,152 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-09-30 00:29:38 |
| 合計ジャッジ時間 | 12,493 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 13 |
ソースコード
fn main() {
let k;
{
let mut s = String::new();
std::io::stdin().read_line(&mut s).unwrap();
let mut ws = s.split_whitespace();
k = ws.next().unwrap().parse::<usize>().unwrap();
}
let mut nupcs = Vec::new();
{
for i1 in 1..=2 {
let mut s = Vec::new();
s.push('N');
if i1 == 2 {
s.append(&mut s.clone());
}
for i2 in 1..=2 {
let mut s = s.clone();
s.push('U');
if i2 == 2 {
s.append(&mut s.clone());
}
for i3 in 1..=2 {
let mut s = s.clone();
s.push('P');
if i3 == 2 {
s.append(&mut s.clone());
}
for i4 in 1..=2 {
let mut s = s.clone();
s.push('C');
if i4 == 2 {
s.append(&mut s.clone());
}
nupcs.push(s.clone().into_iter().collect::<String>());
}
}
}
}
}
nupcs.sort();
println!("{}", nupcs[k - 1]);
}