ABC 046, wip on c and d
This commit is contained in:
25
atcoder/beginner_contests/abc046/Cargo.lock
generated
Normal file
25
atcoder/beginner_contests/abc046/Cargo.lock
generated
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
# This file is automatically @generated by Cargo.
|
||||||
|
# It is not intended for manual editing.
|
||||||
|
version = 3
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "abc046"
|
||||||
|
version = "0.1.0"
|
||||||
|
dependencies = [
|
||||||
|
"proconio",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "lazy_static"
|
||||||
|
version = "1.4.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "proconio"
|
||||||
|
version = "0.4.3"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "91c333be3af2936f8e810300bc74fe4d0cc168ebc04ab02a28c5b1060fa1bd59"
|
||||||
|
dependencies = [
|
||||||
|
"lazy_static",
|
||||||
|
]
|
||||||
12
atcoder/beginner_contests/abc046/Cargo.toml
Normal file
12
atcoder/beginner_contests/abc046/Cargo.toml
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
[package]
|
||||||
|
name = "abc046"
|
||||||
|
version = "0.1.0"
|
||||||
|
edition = "2021"
|
||||||
|
|
||||||
|
# dependencies added to new project
|
||||||
|
[dependencies]
|
||||||
|
proconio = "0.4.3"
|
||||||
|
|
||||||
|
[profile.release]
|
||||||
|
lto = true
|
||||||
|
panic = 'abort'
|
||||||
17
atcoder/beginner_contests/abc046/src/bin/a.rs
Normal file
17
atcoder/beginner_contests/abc046/src/bin/a.rs
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
use proconio::input;
|
||||||
|
|
||||||
|
fn main(){
|
||||||
|
input!{
|
||||||
|
a: u8,
|
||||||
|
b: u8,
|
||||||
|
c: u8,
|
||||||
|
};
|
||||||
|
|
||||||
|
if a == b && b == c {
|
||||||
|
println!("1");
|
||||||
|
} else if a == b || b == c || a == c {
|
||||||
|
println!("2");
|
||||||
|
} else {
|
||||||
|
println!("3");
|
||||||
|
}
|
||||||
|
}
|
||||||
12
atcoder/beginner_contests/abc046/src/bin/b.rs
Normal file
12
atcoder/beginner_contests/abc046/src/bin/b.rs
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
use proconio::input;
|
||||||
|
|
||||||
|
fn main(){
|
||||||
|
input!{
|
||||||
|
n: u32,
|
||||||
|
k: u32,
|
||||||
|
};
|
||||||
|
|
||||||
|
let result = k * u32::pow(k - 1, n - 1);
|
||||||
|
|
||||||
|
println!("{}", {result});
|
||||||
|
}
|
||||||
17
atcoder/beginner_contests/abc046/src/bin/c.rs
Normal file
17
atcoder/beginner_contests/abc046/src/bin/c.rs
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
use proconio::input;
|
||||||
|
use std::cmp::max;
|
||||||
|
|
||||||
|
fn main(){
|
||||||
|
input!{
|
||||||
|
n: u64,
|
||||||
|
ratios: [(u64, u64); n],
|
||||||
|
};
|
||||||
|
|
||||||
|
let mut a = 1;
|
||||||
|
let mut t = 1;
|
||||||
|
|
||||||
|
for (r_t, r_a) in ratios {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
15
atcoder/beginner_contests/abc046/src/bin/d.rs
Normal file
15
atcoder/beginner_contests/abc046/src/bin/d.rs
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
use proconio::input;
|
||||||
|
|
||||||
|
fn solve(tc: u32) {
|
||||||
|
todo!();
|
||||||
|
}
|
||||||
|
|
||||||
|
fn main(){
|
||||||
|
input!{
|
||||||
|
t: u32,
|
||||||
|
};
|
||||||
|
|
||||||
|
for tc in 1..=t {
|
||||||
|
solve(tc);
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user