結果
| 問題 | No.934 Explosive energy drink |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-01-25 12:08:01 |
| 言語 | Rust (1.94.0 + proconio + num + itertools) |
| 結果 |
AC
|
| 実行時間 | 210 ms / 2,000 ms |
| + 3µs | |
| コード長 | 694 bytes |
| 記録 | |
| コンパイル時間 | 603 ms |
| コンパイル使用メモリ | 197,112 KB |
| 実行使用メモリ | 9,472 KB |
| 平均クエリ数 | 709.58 |
| 最終ジャッジ日時 | 2026-08-14 13:02:14 |
| 合計ジャッジ時間 | 3,891 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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);
}