結果
| 問題 |
No.514 宝探し3
|
| コンテスト | |
| ユーザー |
uenoku
|
| 提出日時 | 2017-08-28 09:06:44 |
| 言語 | Rust (1.83.0 + proconio) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 520 bytes |
| コンパイル時間 | 14,423 ms |
| コンパイル使用メモリ | 391,040 KB |
| 実行使用メモリ | 25,348 KB |
| 平均クエリ数 | 2.92 |
| 最終ジャッジ日時 | 2024-07-16 14:04:15 |
| 合計ジャッジ時間 | 15,073 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 11 RE * 1 |
コンパイルメッセージ
warning: variable does not need to be mutable --> src/main.rs:5:9 | 5 | let mut x:i32 = read(); | ----^ | | | help: remove this `mut` | = note: `#[warn(unused_mut)]` on by default warning: variable does not need to be mutable --> src/main.rs:7:9 | 7 | let mut y:i32 = read(); | ----^ | | | help: remove this `mut`
ソースコード
use std::io::*;
use std::str::*;
fn main() {
println!("{} {}",0,0);
let mut x:i32 = read();
println!("{} {}",0,x);
let mut y:i32 = read();
println!("{} {}",y/2,x-y/2);
}
fn read<T: FromStr>() -> T {
let stdin = stdin();
let stdin = stdin.lock();
let s = stdin.bytes().map(|c| c.unwrap() as char)
.skip_while(|c| c.is_whitespace())
.take_while(|c| !c.is_whitespace())
.collect::<String>();
s.parse::<T>().unwrap_or_else(|_| panic!("Faild to parse {}", s))
}
uenoku