Skip to content

Commit

Permalink
past202209-open a, b, c
Browse files Browse the repository at this point in the history
  • Loading branch information
bouzuya committed Nov 17, 2023
1 parent 4fc7be1 commit b1d1309
Show file tree
Hide file tree
Showing 18 changed files with 353 additions and 0 deletions.
169 changes: 169 additions & 0 deletions cargo-atcoder-1.70.0/contests/past202209-open/Cargo.lock

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

15 changes: 15 additions & 0 deletions cargo-atcoder-1.70.0/contests/past202209-open/Cargo.toml
@@ -0,0 +1,15 @@
[package]
name = "past202209-open"
version = "0.1.0"
edition = "2021"

# dependencies added to new project
[dependencies]
ac-library-rs = "=0.1.1"
num = "=0.4.0"
proconio = { version = "=0.4.3", features = ["derive"] }
superslice = "=1.0.0"

[profile.release]
lto = true
panic = 'abort'
@@ -0,0 +1 @@
1.70.0
11 changes: 11 additions & 0 deletions cargo-atcoder-1.70.0/contests/past202209-open/src/bin/a.rs
@@ -0,0 +1,11 @@
use proconio::input;

fn main() {
input! {
x: usize,
y: usize,
z: usize,
};
let ans = (x + z).max(y);
println!("{}", ans);
}
13 changes: 13 additions & 0 deletions cargo-atcoder-1.70.0/contests/past202209-open/src/bin/b.rs
@@ -0,0 +1,13 @@
use proconio::{input, marker::Chars};

fn main() {
input! {
n: Chars,
};
let len = n.len();
let ans = n
.into_iter()
.take(len.saturating_sub(2))
.collect::<String>();
println!("{}", if ans.is_empty() { "0".to_owned() } else { ans });
}
24 changes: 24 additions & 0 deletions cargo-atcoder-1.70.0/contests/past202209-open/src/bin/c.rs
@@ -0,0 +1,24 @@
use std::collections::HashMap;

use proconio::input;

fn main() {
input! {
p: [[f64; 6]; 3],
};
let mut map = HashMap::new();
map.insert(0, 1_f64);
for i in 0..3 {
let mut next = HashMap::new();
for j in 0..6 {
for (k, v) in &map {
*next.entry(k + j + 1).or_insert(0_f64) += v * p[i][j] / 100_f64;
}
}
map = next;
}
for k in 1..=18 {
let ans = *map.get(&k).unwrap_or(&0_f64);
println!("{}", ans);
}
}
10 changes: 10 additions & 0 deletions cargo-atcoder-1.70.0/contests/past202209-open/src/bin/d.rs
@@ -0,0 +1,10 @@
use proconio::{input, marker::Usize1};

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

fn main() {
input! {
n: usize,
a: [Usize1; n],
};
let ans = n - a.len();
println!("{}", ans);
}
10 changes: 10 additions & 0 deletions cargo-atcoder-1.70.0/contests/past202209-open/src/bin/f.rs
@@ -0,0 +1,10 @@
use proconio::{input, marker::Usize1};

fn main() {
input! {
n: usize,
a: [Usize1; n],
};
let ans = n - a.len();
println!("{}", ans);
}
10 changes: 10 additions & 0 deletions cargo-atcoder-1.70.0/contests/past202209-open/src/bin/g.rs
@@ -0,0 +1,10 @@
use proconio::{input, marker::Usize1};

fn main() {
input! {
n: usize,
a: [Usize1; n],
};
let ans = n - a.len();
println!("{}", ans);
}
10 changes: 10 additions & 0 deletions cargo-atcoder-1.70.0/contests/past202209-open/src/bin/h.rs
@@ -0,0 +1,10 @@
use proconio::{input, marker::Usize1};

fn main() {
input! {
n: usize,
a: [Usize1; n],
};
let ans = n - a.len();
println!("{}", ans);
}
10 changes: 10 additions & 0 deletions cargo-atcoder-1.70.0/contests/past202209-open/src/bin/i.rs
@@ -0,0 +1,10 @@
use proconio::{input, marker::Usize1};

fn main() {
input! {
n: usize,
a: [Usize1; n],
};
let ans = n - a.len();
println!("{}", ans);
}
10 changes: 10 additions & 0 deletions cargo-atcoder-1.70.0/contests/past202209-open/src/bin/j.rs
@@ -0,0 +1,10 @@
use proconio::{input, marker::Usize1};

fn main() {
input! {
n: usize,
a: [Usize1; n],
};
let ans = n - a.len();
println!("{}", ans);
}
10 changes: 10 additions & 0 deletions cargo-atcoder-1.70.0/contests/past202209-open/src/bin/k.rs
@@ -0,0 +1,10 @@
use proconio::{input, marker::Usize1};

fn main() {
input! {
n: usize,
a: [Usize1; n],
};
let ans = n - a.len();
println!("{}", ans);
}
10 changes: 10 additions & 0 deletions cargo-atcoder-1.70.0/contests/past202209-open/src/bin/l.rs
@@ -0,0 +1,10 @@
use proconio::{input, marker::Usize1};

fn main() {
input! {
n: usize,
a: [Usize1; n],
};
let ans = n - a.len();
println!("{}", ans);
}
10 changes: 10 additions & 0 deletions cargo-atcoder-1.70.0/contests/past202209-open/src/bin/m.rs
@@ -0,0 +1,10 @@
use proconio::{input, marker::Usize1};

fn main() {
input! {
n: usize,
a: [Usize1; n],
};
let ans = n - a.len();
println!("{}", ans);
}
10 changes: 10 additions & 0 deletions cargo-atcoder-1.70.0/contests/past202209-open/src/bin/n.rs
@@ -0,0 +1,10 @@
use proconio::{input, marker::Usize1};

fn main() {
input! {
n: usize,
a: [Usize1; n],
};
let ans = n - a.len();
println!("{}", ans);
}
10 changes: 10 additions & 0 deletions cargo-atcoder-1.70.0/contests/past202209-open/src/bin/o.rs
@@ -0,0 +1,10 @@
use proconio::{input, marker::Usize1};

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

0 comments on commit b1d1309

Please sign in to comment.