結果
| 問題 | No.185 和風 |
| コンテスト | |
| ユーザー |
rustGanbaruman
|
| 提出日時 | 2026-02-05 20:50:47 |
| 言語 | Rust (1.92.0 + proconio + num + itertools) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 400 bytes |
| 記録 | |
| コンパイル時間 | 2,103 ms |
| コンパイル使用メモリ | 203,976 KB |
| 実行使用メモリ | 7,972 KB |
| 最終ジャッジ日時 | 2026-02-05 20:50:51 |
| 合計ジャッジ時間 | 3,403 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 5 WA * 2 |
ソースコード
use proconio::input;
fn main() {
input! {
n:usize,
xy: [(i64, i64);n],
}
let (x, y): (Vec<_>, Vec<_>) = xy.into_iter().unzip();
let answer:i64 = y[0] - x[0];
let mut equal = true;
for i in 1..n{
if answer != y[i] - x[i]{
equal = false;
}
}
if equal{
println!("{}",answer)
}else{
println!("-1")
}
}
rustGanbaruman