Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
256 additions
and
0 deletions.
There are no files selected for viewing
168 changes: 168 additions & 0 deletions
168
cargo-atcoder-1.70.0/contests/adt_easy_20240320_3/Cargo.lock
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
15 changes: 15 additions & 0 deletions
15
cargo-atcoder-1.70.0/contests/adt_easy_20240320_3/Cargo.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
[package] | ||
name = "adt_easy_20240320_3" | ||
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' |
1 change: 1 addition & 0 deletions
1
cargo-atcoder-1.70.0/contests/adt_easy_20240320_3/rust-toolchain
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
1.70.0 |
18 changes: 18 additions & 0 deletions
18
cargo-atcoder-1.70.0/contests/adt_easy_20240320_3/src/bin/a.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
use proconio::input; | ||
|
||
fn main() { | ||
input! { | ||
capital_m: usize, | ||
capital_d: usize, | ||
y: usize, | ||
m: usize, | ||
d: usize, | ||
}; | ||
if d != capital_d { | ||
println!("{} {} {}", y, m, d + 1); | ||
} else if m != capital_m { | ||
println!("{} {} {}", y, m + 1, 1); | ||
} else { | ||
println!("{} {} {}", y + 1, 1, 1); | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
cargo-atcoder-1.70.0/contests/adt_easy_20240320_3/src/bin/b.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
use proconio::input; | ||
|
||
fn main() { | ||
input! { | ||
n: usize, | ||
x: usize, | ||
}; | ||
let index = (x - 1) / n; | ||
let ans = (b'A' + index as u8) as char; | ||
println!("{}", ans); | ||
} |
17 changes: 17 additions & 0 deletions
17
cargo-atcoder-1.70.0/contests/adt_easy_20240320_3/src/bin/c.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
use proconio::input; | ||
|
||
fn main() { | ||
input! { | ||
a: usize, | ||
b: usize, | ||
k: usize, | ||
}; | ||
let mut sum = a; | ||
for i in 0.. { | ||
if sum >= b { | ||
println!("{}", i); | ||
return; | ||
} | ||
sum *= k; | ||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
cargo-atcoder-1.70.0/contests/adt_easy_20240320_3/src/bin/d.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
use std::collections::HashSet; | ||
|
||
use proconio::input; | ||
|
||
fn main() { | ||
input! { | ||
n: usize, | ||
st: [(String, String); n], | ||
}; | ||
let set = st.into_iter().collect::<HashSet<(String, String)>>(); | ||
let ans = set.len() != n; | ||
println!("{}", if ans { "Yes" } else { "No" }); | ||
} |
13 changes: 13 additions & 0 deletions
13
cargo-atcoder-1.70.0/contests/adt_easy_20240320_3/src/bin/e.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
use proconio::input; | ||
|
||
fn main() { | ||
input! { | ||
mut k: usize, | ||
}; | ||
let mut ans = vec![]; | ||
while k != 0 { | ||
ans.push(if k % 2 == 0 { '0' } else { '2' }); | ||
k /= 2; | ||
} | ||
println!("{}", ans.into_iter().rev().collect::<String>()); | ||
} |