結果
| 問題 | No.3499 I Love DAG |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-04-18 14:21:05 |
| 言語 | Rust (1.94.0 + proconio + num + itertools) |
| 結果 |
AC
|
| 実行時間 | 518 ms / 2,000 ms |
| コード長 | 807 bytes |
| 記録 | |
| コンパイル時間 | 3,977 ms |
| コンパイル使用メモリ | 181,828 KB |
| 実行使用メモリ | 30,064 KB |
| 平均クエリ数 | 18782.41 |
| 最終ジャッジ日時 | 2026-04-18 14:21:32 |
| 合計ジャッジ時間 | 14,351 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 40 |
ソースコード
use std::io::{self, BufRead, Write};
fn main() {
let stdin = io::stdin();
let mut it = stdin.lock().lines();
let first = it.next().unwrap().unwrap();
let mut sp = first.split_whitespace();
let _n: usize = sp.next().unwrap().parse().unwrap();
let m: usize = sp.next().unwrap().parse().unwrap();
let stdout = io::stdout();
let mut out = io::BufWriter::new(stdout.lock());
for _ in 0..m {
let line = it.next().unwrap().unwrap();
let mut sp = line.split_whitespace();
let a: usize = sp.next().unwrap().parse().unwrap();
let b: usize = sp.next().unwrap().parse().unwrap();
if a < b {
writeln!(out, "0").unwrap();
} else {
writeln!(out, "1").unwrap();
}
out.flush().unwrap();
}
}