結果
| 問題 |
No.934 Explosive energy drink
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-01-25 12:08:01 |
| 言語 | Rust (1.83.0 + proconio) |
| 結果 |
AC
|
| 実行時間 | 315 ms / 2,000 ms |
| コード長 | 694 bytes |
| コンパイル時間 | 15,689 ms |
| コンパイル使用メモリ | 387,948 KB |
| 実行使用メモリ | 25,220 KB |
| 平均クエリ数 | 709.58 |
| 最終ジャッジ日時 | 2024-07-16 19:19:47 |
| 合計ジャッジ時間 | 20,197 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 24 |
ソースコード
fn main() {
let mut n = String::new();
std::io::stdin().read_line(&mut n).ok();
let n: usize = n.trim().parse::<usize>().unwrap();
let mut result: Vec<usize> = vec![];
for i in 1..=n {
println!("? {}", n - 1);
println!("{}", (1..=n).filter(|j| j != &i).map(|j| j.to_string()).collect::<Vec<String>>().join(" "));
let mut a = String::new();
std::io::stdin().read_line(&mut a).ok();
match a.trim() {
"0" => { result.push(i); },
_ => { },
};
}
println!("! {}", result.len());
println!("{}", result.iter().map(|i| i.to_string()).collect::<Vec<String>>().join(" "));
std::process::exit(0);
}