Skip to content

Commit

Permalink
dwacon6th-prelims a
Browse files Browse the repository at this point in the history
  • Loading branch information
bouzuya committed Mar 12, 2021
1 parent 1858c24 commit 65023ff
Show file tree
Hide file tree
Showing 8 changed files with 158 additions and 0 deletions.
77 changes: 77 additions & 0 deletions dwacon6th-prelims/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 14 additions & 0 deletions dwacon6th-prelims/Cargo.toml
@@ -0,0 +1,14 @@
[package]
name = "dwacon6th-prelims"
version = "0.1.0"
authors = ["bouzuya <m@bouzuya.net>"]
edition = "2018"

# dependencies added to new project
[dependencies]
proconio = { version = "=0.3.6", features = ["derive"] }
superslice = "=1.0.0"

[profile.release]
lto = true
panic = 'abort'
1 change: 1 addition & 0 deletions dwacon6th-prelims/rust-toolchain
@@ -0,0 +1 @@
1.42.0
22 changes: 22 additions & 0 deletions dwacon6th-prelims/src/bin/a.rs
@@ -0,0 +1,22 @@
use proconio::input;

fn main() {
input! {
n: usize,
st: [(String, i64); n],
x: String,
};
let mut sleep = false;
let mut sum = 0;
for (s_i, t_i) in st.iter() {
if s_i == &x {
sleep = true;
continue;
}
if sleep {
sum += t_i;
}
}
let ans = sum;
println!("{}", ans);
}
11 changes: 11 additions & 0 deletions dwacon6th-prelims/src/bin/b.rs
@@ -0,0 +1,11 @@
use proconio::input;
use proconio::marker::Usize1;

fn main() {
input! {
n: usize,
a: [Usize1; n],
};
let ans = n - a.len();
println!("{}", ans);
}
11 changes: 11 additions & 0 deletions dwacon6th-prelims/src/bin/c.rs
@@ -0,0 +1,11 @@
use proconio::input;
use proconio::marker::Usize1;

fn main() {
input! {
n: usize,
a: [Usize1; n],
};
let ans = n - a.len();
println!("{}", ans);
}
11 changes: 11 additions & 0 deletions dwacon6th-prelims/src/bin/d.rs
@@ -0,0 +1,11 @@
use proconio::input;
use proconio::marker::Usize1;

fn main() {
input! {
n: usize,
a: [Usize1; n],
};
let ans = n - a.len();
println!("{}", ans);
}
11 changes: 11 additions & 0 deletions dwacon6th-prelims/src/bin/e.rs
@@ -0,0 +1,11 @@
use proconio::input;
use proconio::marker::Usize1;

fn main() {
input! {
n: usize,
a: [Usize1; n],
};
let ans = n - a.len();
println!("{}", ans);
}

0 comments on commit 65023ff

Please sign in to comment.