Skip to content

Commit

Permalink
dwango2016-prelims
Browse files Browse the repository at this point in the history
  • Loading branch information
bouzuya committed Jan 22, 2021
1 parent c869128 commit 6de2158
Show file tree
Hide file tree
Showing 8 changed files with 152 additions and 0 deletions.
77 changes: 77 additions & 0 deletions dwango2016-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 dwango2016-prelims/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[package]
name = "dwango2016-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 dwango2016-prelims/rust-toolchain
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1.42.0
9 changes: 9 additions & 0 deletions dwango2016-prelims/src/bin/a.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
use proconio::input;

fn main() {
input! {
n: usize,
};
let ans = n / 25;
println!("{}", ans);
}
18 changes: 18 additions & 0 deletions dwango2016-prelims/src/bin/b.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
use proconio::input;
use std::cmp::min;

fn main() {
input! {
n: usize,
k: [i64; n - 1],
};
let mut l = vec![0; n];
l[0] = k[0];
l[n - 1] = k[n - 2];
for i in 0..n - 2 {
l[i + 1] = min(k[i], k[i + 1]);
}
for (i, l_i) in l.iter().enumerate() {
print!("{}{}", l_i, if i == n - 1 { "\n" } else { " " });
}
}
11 changes: 11 additions & 0 deletions dwango2016-prelims/src/bin/c.rs
Original file line number Diff line number Diff line change
@@ -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 dwango2016-prelims/src/bin/d.rs
Original file line number Diff line number Diff line change
@@ -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 dwango2016-prelims/src/bin/e.rs
Original file line number Diff line number Diff line change
@@ -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 6de2158

Please sign in to comment.