Skip to content

Commit

Permalink
adt_easy_20240320_3
Browse files Browse the repository at this point in the history
  • Loading branch information
bouzuya committed Mar 22, 2024
1 parent 01033f4 commit 538ca73
Show file tree
Hide file tree
Showing 8 changed files with 256 additions and 0 deletions.
168 changes: 168 additions & 0 deletions 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.

15 changes: 15 additions & 0 deletions cargo-atcoder-1.70.0/contests/adt_easy_20240320_3/Cargo.toml
@@ -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'
@@ -0,0 +1 @@
1.70.0
18 changes: 18 additions & 0 deletions cargo-atcoder-1.70.0/contests/adt_easy_20240320_3/src/bin/a.rs
@@ -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 cargo-atcoder-1.70.0/contests/adt_easy_20240320_3/src/bin/b.rs
@@ -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 cargo-atcoder-1.70.0/contests/adt_easy_20240320_3/src/bin/c.rs
@@ -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 cargo-atcoder-1.70.0/contests/adt_easy_20240320_3/src/bin/d.rs
@@ -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 cargo-atcoder-1.70.0/contests/adt_easy_20240320_3/src/bin/e.rs
@@ -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>());
}

0 comments on commit 538ca73

Please sign in to comment.