ABC 046, wip on c and d
This commit is contained in:
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