結果
問題 |
No.365 ジェンガソート
|
ユーザー |
|
提出日時 | 2019-04-24 05:24:28 |
言語 | Rust (1.83.0 + proconio) |
結果 |
WA
|
実行時間 | - |
コード長 | 444 bytes |
コンパイル時間 | 16,386 ms |
コンパイル使用メモリ | 378,480 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-06 23:10:04 |
合計ジャッジ時間 | 16,877 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 18 WA * 23 |
ソースコード
use std::io::{self, BufRead}; fn get_lines() -> Vec<String> { let stdin = io::stdin(); let lines: Vec<String> = stdin.lock().lines().map(|l| l.unwrap()).collect(); return lines; } fn main(){ let s = &get_lines(); let mut c = 1; for x in s[1].split(' ').map(|x| x.parse::<i32>().unwrap()) { if x != c { println!("{}", x - 1); return; } c += 1; } println!("0"); }