Skip to content

Commit 35a8109

Browse files
committed
Solve A,B,C in abc215
1 parent dc51400 commit 35a8109

File tree

18 files changed

+1116
-0
lines changed

18 files changed

+1116
-0
lines changed

atcoder/rust/abc215/Cargo.lock

Lines changed: 638 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

atcoder/rust/abc215/Cargo.toml

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
[package]
2+
name = "abc215"
3+
version = "0.1.0"
4+
authors = ["k-yomo <kanji.yy@gmail.com>"]
5+
edition = "2018"
6+
7+
[package.metadata.cargo-compete]
8+
config = "../compete.toml"
9+
10+
[package.metadata.cargo-compete.bin]
11+
a = { name = "abc215-a", problem = { platform = "atcoder", contest = "abc215", index = "A", url = "https://atcoder.jp/contests/abc215/tasks/abc215_a" } }
12+
b = { name = "abc215-b", problem = { platform = "atcoder", contest = "abc215", index = "B", url = "https://atcoder.jp/contests/abc215/tasks/abc215_b" } }
13+
c = { name = "abc215-c", problem = { platform = "atcoder", contest = "abc215", index = "C", url = "https://atcoder.jp/contests/abc215/tasks/abc215_c" } }
14+
d = { name = "abc215-d", problem = { platform = "atcoder", contest = "abc215", index = "D", url = "https://atcoder.jp/contests/abc215/tasks/abc215_d" } }
15+
e = { name = "abc215-e", problem = { platform = "atcoder", contest = "abc215", index = "E", url = "https://atcoder.jp/contests/abc215/tasks/abc215_e" } }
16+
f = { name = "abc215-f", problem = { platform = "atcoder", contest = "abc215", index = "F", url = "https://atcoder.jp/contests/abc215/tasks/abc215_f" } }
17+
g = { name = "abc215-g", problem = { platform = "atcoder", contest = "abc215", index = "G", url = "https://atcoder.jp/contests/abc215/tasks/abc215_g" } }
18+
h = { name = "abc215-h", problem = { platform = "atcoder", contest = "abc215", index = "H", url = "https://atcoder.jp/contests/abc215/tasks/abc215_h" } }
19+
20+
[[bin]]
21+
name = "abc215-a"
22+
path = "src/bin/a.rs"
23+
24+
[[bin]]
25+
name = "abc215-b"
26+
path = "src/bin/b.rs"
27+
28+
[[bin]]
29+
name = "abc215-c"
30+
path = "src/bin/c.rs"
31+
32+
[[bin]]
33+
name = "abc215-d"
34+
path = "src/bin/d.rs"
35+
36+
[[bin]]
37+
name = "abc215-e"
38+
path = "src/bin/e.rs"
39+
40+
[[bin]]
41+
name = "abc215-f"
42+
path = "src/bin/f.rs"
43+
44+
[[bin]]
45+
name = "abc215-g"
46+
path = "src/bin/g.rs"
47+
48+
[[bin]]
49+
name = "abc215-h"
50+
path = "src/bin/h.rs"
51+
[dependencies]
52+
num = "=0.2.1"
53+
num-bigint = "=0.2.6"
54+
num-complex = "=0.2.4"
55+
num-integer = "=0.1.42"
56+
num-iter = "=0.1.40"
57+
num-rational = "=0.2.4"
58+
num-traits = "=0.2.11"
59+
num-derive = "=0.3.0"
60+
ndarray = "=0.13.0"
61+
nalgebra = "=0.20.0"
62+
alga = "=0.9.3"
63+
libm = "=0.2.1"
64+
rand = { version = "=0.7.3", features = ["small_rng"] }
65+
getrandom = "=0.1.14"
66+
rand_chacha = "=0.2.2"
67+
rand_core = "=0.5.1"
68+
rand_hc = "=0.2.0"
69+
rand_pcg = "=0.2.1"
70+
rand_distr = "=0.2.2"
71+
petgraph = "=0.5.0"
72+
indexmap = "=1.3.2"
73+
regex = "=1.3.6"
74+
lazy_static = "=1.4.0"
75+
ordered-float = "=1.0.2"
76+
ascii = "=1.0.0"
77+
permutohedron = "=0.2.4"
78+
superslice = "=1.0.0"
79+
itertools = "=0.9.0"
80+
itertools-num = "=0.1.3"
81+
maplit = "=1.0.2"
82+
either = "=1.5.3"
83+
im-rc = "=14.3.0"
84+
fixedbitset = "=0.2.0"
85+
bitset-fixed = "=0.1.0"
86+
proconio = { version = "=0.3.6", features = ["derive"] }
87+
text_io = "=0.1.8"
88+
whiteread = "=0.5.0"
89+
rustc-hash = "=1.1.0"
90+
smallvec = "=1.2.0"

atcoder/rust/abc215/src/bin/a.rs

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#![allow(unused_imports)]
2+
3+
use std::cmp::*;
4+
use std::collections::*;
5+
use std::io::Write;
6+
use std::ops::Bound::*;
7+
8+
use itertools::__std_iter::once;
9+
use itertools::*;
10+
use itertools_num::ItertoolsNum;
11+
use proconio::marker::*;
12+
use proconio::*;
13+
use superslice::*;
14+
15+
fn main() {
16+
input! {
17+
s: String,
18+
}
19+
println!("{}", if s == "Hello,World!" { "AC" } else { "WA" });
20+
}

atcoder/rust/abc215/src/bin/b.rs

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#![allow(unused_imports)]
2+
3+
use std::cmp::*;
4+
use std::collections::*;
5+
use std::io::Write;
6+
use std::ops::Bound::*;
7+
8+
use itertools::__std_iter::once;
9+
use itertools::*;
10+
use itertools_num::ItertoolsNum;
11+
use proconio::marker::*;
12+
use proconio::*;
13+
use superslice::*;
14+
15+
fn main() {
16+
input! {
17+
n: u128,
18+
}
19+
20+
let mut k = 0;
21+
while 2_u128.pow(k + 1) <= n {
22+
k += 1;
23+
}
24+
25+
println!("{}", k)
26+
}

atcoder/rust/abc215/src/bin/c.rs

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
#![allow(unused_imports)]
2+
3+
use std::cmp::*;
4+
use std::collections::*;
5+
use std::io::Write;
6+
use std::ops::Bound::*;
7+
8+
use itertools::__std_iter::once;
9+
use itertools::*;
10+
use itertools_num::ItertoolsNum;
11+
use proconio::marker::*;
12+
use proconio::*;
13+
use superslice::*;
14+
15+
fn main() {
16+
input! {
17+
mut s: Chars, k: usize,
18+
}
19+
20+
s.sort();
21+
22+
let combinations = (0..s.len()).permutations(s.len());
23+
let mut exist_map = HashMap::new();
24+
let mut count = 0;
25+
for comb in combinations {
26+
let x = comb.iter().map(|&i| s[i]).collect::<String>();
27+
if exist_map.contains_key(&(x.clone())) {
28+
continue;
29+
}
30+
count += 1;
31+
if count == k {
32+
return println!("{}", x);
33+
}
34+
exist_map.insert(x, true);
35+
}
36+
}

atcoder/rust/abc215/src/bin/d.rs

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#![allow(unused_imports)]
2+
3+
use std::cmp::*;
4+
use std::collections::*;
5+
use std::io::Write;
6+
use std::ops::Bound::*;
7+
8+
use itertools::__std_iter::once;
9+
use itertools::*;
10+
use itertools_num::ItertoolsNum;
11+
use proconio::marker::*;
12+
use proconio::*;
13+
use superslice::*;
14+
15+
fn main() {
16+
input! {
17+
n: usize, m: usize,
18+
a: [usize; n],
19+
}
20+
}

atcoder/rust/abc215/src/bin/e.rs

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#![allow(unused_imports)]
2+
3+
use std::cmp::*;
4+
use std::collections::*;
5+
use std::io::Write;
6+
use std::ops::Bound::*;
7+
8+
use itertools::*;
9+
use itertools::__std_iter::once;
10+
use itertools_num::ItertoolsNum;
11+
use proconio::*;
12+
use proconio::marker::*;
13+
use superslice::*;
14+
15+
fn main() {
16+
input! {
17+
18+
}
19+
}

atcoder/rust/abc215/src/bin/f.rs

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#![allow(unused_imports)]
2+
3+
use std::cmp::*;
4+
use std::collections::*;
5+
use std::io::Write;
6+
use std::ops::Bound::*;
7+
8+
use itertools::*;
9+
use itertools::__std_iter::once;
10+
use itertools_num::ItertoolsNum;
11+
use proconio::*;
12+
use proconio::marker::*;
13+
use superslice::*;
14+
15+
fn main() {
16+
input! {
17+
18+
}
19+
}

atcoder/rust/abc215/src/bin/g.rs

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#![allow(unused_imports)]
2+
3+
use std::cmp::*;
4+
use std::collections::*;
5+
use std::io::Write;
6+
use std::ops::Bound::*;
7+
8+
use itertools::*;
9+
use itertools::__std_iter::once;
10+
use itertools_num::ItertoolsNum;
11+
use proconio::*;
12+
use proconio::marker::*;
13+
use superslice::*;
14+
15+
fn main() {
16+
input! {
17+
18+
}
19+
}

atcoder/rust/abc215/src/bin/h.rs

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#![allow(unused_imports)]
2+
3+
use std::cmp::*;
4+
use std::collections::*;
5+
use std::io::Write;
6+
use std::ops::Bound::*;
7+
8+
use itertools::*;
9+
use itertools::__std_iter::once;
10+
use itertools_num::ItertoolsNum;
11+
use proconio::*;
12+
use proconio::marker::*;
13+
use superslice::*;
14+
15+
fn main() {
16+
input! {
17+
18+
}
19+
}

0 commit comments

Comments
 (0)