Skip to content

Commit 7ac2bb4

Browse files
committed
Solve A in arc073
1 parent d28a64a commit 7ac2bb4

File tree

10 files changed

+939
-0
lines changed

10 files changed

+939
-0
lines changed

atcoder/rust/arc073/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/arc073/Cargo.toml

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
[package]
2+
name = "arc073"
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+
c = { name = "arc073-c", problem = { platform = "atcoder", contest = "arc073", index = "C", url = "https://atcoder.jp/contests/arc073/tasks/arc073_a" } }
12+
d = { name = "arc073-d", problem = { platform = "atcoder", contest = "arc073", index = "D", url = "https://atcoder.jp/contests/arc073/tasks/arc073_b" } }
13+
e = { name = "arc073-e", problem = { platform = "atcoder", contest = "arc073", index = "E", url = "https://atcoder.jp/contests/arc073/tasks/arc073_c" } }
14+
f = { name = "arc073-f", problem = { platform = "atcoder", contest = "arc073", index = "F", url = "https://atcoder.jp/contests/arc073/tasks/arc073_d" } }
15+
16+
[[bin]]
17+
name = "arc073-c"
18+
path = "src/bin/c.rs"
19+
20+
[[bin]]
21+
name = "arc073-d"
22+
path = "src/bin/d.rs"
23+
24+
[[bin]]
25+
name = "arc073-e"
26+
path = "src/bin/e.rs"
27+
28+
[[bin]]
29+
name = "arc073-f"
30+
path = "src/bin/f.rs"
31+
[dependencies]
32+
num = "=0.2.1"
33+
num-bigint = "=0.2.6"
34+
num-complex = "=0.2.4"
35+
num-integer = "=0.1.42"
36+
num-iter = "=0.1.40"
37+
num-rational = "=0.2.4"
38+
num-traits = "=0.2.11"
39+
num-derive = "=0.3.0"
40+
ndarray = "=0.13.0"
41+
nalgebra = "=0.20.0"
42+
alga = "=0.9.3"
43+
libm = "=0.2.1"
44+
rand = { version = "=0.7.3", features = ["small_rng"] }
45+
getrandom = "=0.1.14"
46+
rand_chacha = "=0.2.2"
47+
rand_core = "=0.5.1"
48+
rand_hc = "=0.2.0"
49+
rand_pcg = "=0.2.1"
50+
rand_distr = "=0.2.2"
51+
petgraph = "=0.5.0"
52+
indexmap = "=1.3.2"
53+
regex = "=1.3.6"
54+
lazy_static = "=1.4.0"
55+
ordered-float = "=1.0.2"
56+
ascii = "=1.0.0"
57+
permutohedron = "=0.2.4"
58+
superslice = "=1.0.0"
59+
itertools = "=0.9.0"
60+
itertools-num = "=0.1.3"
61+
maplit = "=1.0.2"
62+
either = "=1.5.3"
63+
im-rc = "=14.3.0"
64+
fixedbitset = "=0.2.0"
65+
bitset-fixed = "=0.1.0"
66+
proconio = { version = "=0.3.6", features = ["derive"] }
67+
text_io = "=0.1.8"
68+
whiteread = "=0.5.0"
69+
rustc-hash = "=1.1.0"
70+
smallvec = "=1.2.0"

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

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
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+
n: usize, T: u128,
18+
t: [u128; n],
19+
}
20+
21+
let mut cur_time = t[0] + T;
22+
let mut total = T;
23+
for &i in t[1..].iter() {
24+
total += if cur_time >= i { (T - (cur_time - i)) } else { T };
25+
cur_time = i + T;
26+
}
27+
28+
println!("{}", total)
29+
}

atcoder/rust/arc073/src/bin/d.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/arc073/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/arc073/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+
}
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
type: Batch
3+
timelimit: 2s
4+
match: Lines
5+
6+
cases:
7+
- name: sample1
8+
in: |
9+
2 4
10+
0 3
11+
out: |
12+
7
13+
- name: sample2
14+
in: |
15+
2 4
16+
0 5
17+
out: |
18+
8
19+
- name: sample3
20+
in: |
21+
4 1000000000
22+
0 1000 1000000 1000000000
23+
out: |
24+
2000000000
25+
- name: sample4
26+
in: |
27+
1 1
28+
0
29+
out: |
30+
1
31+
- name: sample5
32+
in: |
33+
9 10
34+
0 3 5 7 100 110 200 300 311
35+
out: |
36+
67
37+
38+
extend: []
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
---
2+
type: Batch
3+
timelimit: 2s
4+
match: Lines
5+
6+
cases:
7+
- name: sample1
8+
in: |
9+
4 6
10+
2 1
11+
3 4
12+
4 10
13+
3 4
14+
out: |
15+
11
16+
- name: sample2
17+
in: |
18+
4 6
19+
2 1
20+
3 7
21+
4 10
22+
3 6
23+
out: |
24+
13
25+
- name: sample3
26+
in: |
27+
4 10
28+
1 100
29+
1 100
30+
1 100
31+
1 100
32+
out: |
33+
400
34+
- name: sample4
35+
in: |
36+
4 1
37+
10 100
38+
10 100
39+
10 100
40+
10 100
41+
out: |
42+
0
43+
44+
extend: []
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
---
2+
type: Batch
3+
timelimit: 2s
4+
match: Lines
5+
6+
cases:
7+
- name: sample1
8+
in: |
9+
3
10+
1 2
11+
3 4
12+
5 6
13+
out: |
14+
15
15+
- name: sample2
16+
in: |
17+
3
18+
1010 10
19+
1000 1
20+
20 1020
21+
out: |
22+
380
23+
- name: sample3
24+
in: |
25+
2
26+
1 1
27+
1000000000 1000000000
28+
out: |
29+
999999998000000001
30+
31+
extend: []
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
type: Batch
3+
timelimit: 2s
4+
match: Lines
5+
6+
cases:
7+
- name: sample1
8+
in: |
9+
8 3 1 8
10+
3 5 1
11+
out: |
12+
7
13+
- name: sample2
14+
in: |
15+
9 2 1 9
16+
5 1
17+
out: |
18+
4
19+
- name: sample3
20+
in: |
21+
9 2 1 9
22+
5 9
23+
out: |
24+
4
25+
- name: sample4
26+
in: |
27+
11 16 8 1
28+
1 1 5 1 11 4 5 2 5 3 3 3 5 5 6 7
29+
out: |
30+
21
31+
32+
extend: []

0 commit comments

Comments
 (0)