complete 1024.rs 1063.rs 1108.rs 1111.rs 3086.rs 7695.rs 17256.rs 17371.rs 27634.rs 31846.rs

This commit is contained in:
2026-03-06 16:01:01 +09:00
parent 381b9ef968
commit 12445715dd
10 changed files with 619 additions and 0 deletions

View File

@@ -0,0 +1,37 @@
use std::io::stdin;
fn main() {
let mut line = String::new();
stdin().read_line(&mut line).unwrap();
let mut iter = line.split_whitespace();
let k: i64 = iter.next().unwrap().parse().unwrap();
let s: i64 = iter.next().unwrap().parse().unwrap();
let n: i64 = iter.next().unwrap().parse().unwrap();
if n < s * k {
println!("NO");
return;
}
if k == 2 {
if n % 2 == 0 {
println!("YES");
} else {
println!("NO");
}
} else {
if s == 1 {
if n <= 2 * k - 2 {
println!("YES");
} else if n % 2 == 0 {
println!("YES");
} else {
println!("NO");
}
} else {
println!("YES");
}
}
}