Started on ABC 50

This commit is contained in:
2023-04-18 16:58:49 +02:00
parent ea301ea3cb
commit ff59a34ac1
6 changed files with 79 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
use proconio::input;
fn main() {
input! {
a: u32,
op: char,
b: u32,
}
let mut result = a as i32;
match op {
'+' => result += b as i32,
'-' => result -= b as i32,
_ => unreachable!(),
}
println!("{}", result);
}

View File

@@ -0,0 +1,17 @@
use proconio::input;
fn main() {
input! {
n: usize,
ts: [i32; n],
m: usize,
pxs: [(i32, i32); m],
};
let max_time: i32 = ts.iter().sum();
for (p, x) in pxs {
let time_saved = ts[p as usize - 1] - x;
println!("{}", max_time - time_saved);
}
}

View File

@@ -0,0 +1,3 @@
fn main() {
unimplemented!();
}

View File

@@ -0,0 +1,3 @@
fn main() {
unimplemented!();
}