Started on abc257
This commit is contained in:
15
atcoder/beginner_contests/abc257/src/bin/a.rs
Normal file
15
atcoder/beginner_contests/abc257/src/bin/a.rs
Normal file
@@ -0,0 +1,15 @@
|
||||
use proconio::input;
|
||||
|
||||
fn main() {
|
||||
input!{
|
||||
n: f32,
|
||||
x: f32,
|
||||
};
|
||||
|
||||
let l = x / n;
|
||||
let c = l.ceil() - 1.;
|
||||
|
||||
let chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
|
||||
|
||||
println!("{}", chars.chars().nth(c as usize).unwrap());
|
||||
}
|
||||
34
atcoder/beginner_contests/abc257/src/bin/b.rs
Normal file
34
atcoder/beginner_contests/abc257/src/bin/b.rs
Normal file
@@ -0,0 +1,34 @@
|
||||
use proconio::input;
|
||||
|
||||
fn main() {
|
||||
input!{
|
||||
n: usize,
|
||||
k: usize,
|
||||
q: usize,
|
||||
a: [usize; k],
|
||||
l: [usize; q],
|
||||
};
|
||||
|
||||
let mut board = vec![false; n];
|
||||
let mut positions = vec![0; k];
|
||||
let mut p = 0;
|
||||
|
||||
for pos in a {
|
||||
board[pos - 1] = true;
|
||||
positions[p] = pos - 1;
|
||||
p += 1;
|
||||
}
|
||||
|
||||
for turn in l {
|
||||
let pos = positions[turn - 1];
|
||||
if pos != n - 1 && !board[pos + 1] {
|
||||
board[pos] = false;
|
||||
board[pos + 1] = true;
|
||||
positions[turn - 1] = pos + 1;
|
||||
}
|
||||
}
|
||||
|
||||
for pos in positions {
|
||||
print!("{} ", pos + 1);
|
||||
} print!("\n");
|
||||
}
|
||||
11
atcoder/beginner_contests/abc257/src/bin/c.rs
Normal file
11
atcoder/beginner_contests/abc257/src/bin/c.rs
Normal file
@@ -0,0 +1,11 @@
|
||||
use proconio::input;
|
||||
|
||||
fn main() {
|
||||
input!{
|
||||
n: usize,
|
||||
s: String,
|
||||
w: [u64; n],
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
5
atcoder/beginner_contests/abc257/src/bin/d.rs
Normal file
5
atcoder/beginner_contests/abc257/src/bin/d.rs
Normal file
@@ -0,0 +1,5 @@
|
||||
use proconio::input;
|
||||
|
||||
fn main() {
|
||||
todo!();
|
||||
}
|
||||
5
atcoder/beginner_contests/abc257/src/bin/e.rs
Normal file
5
atcoder/beginner_contests/abc257/src/bin/e.rs
Normal file
@@ -0,0 +1,5 @@
|
||||
use proconio::input;
|
||||
|
||||
fn main() {
|
||||
todo!();
|
||||
}
|
||||
5
atcoder/beginner_contests/abc257/src/bin/ex.rs
Normal file
5
atcoder/beginner_contests/abc257/src/bin/ex.rs
Normal file
@@ -0,0 +1,5 @@
|
||||
use proconio::input;
|
||||
|
||||
fn main() {
|
||||
todo!();
|
||||
}
|
||||
5
atcoder/beginner_contests/abc257/src/bin/f.rs
Normal file
5
atcoder/beginner_contests/abc257/src/bin/f.rs
Normal file
@@ -0,0 +1,5 @@
|
||||
use proconio::input;
|
||||
|
||||
fn main() {
|
||||
todo!();
|
||||
}
|
||||
5
atcoder/beginner_contests/abc257/src/bin/g.rs
Normal file
5
atcoder/beginner_contests/abc257/src/bin/g.rs
Normal file
@@ -0,0 +1,5 @@
|
||||
use proconio::input;
|
||||
|
||||
fn main() {
|
||||
todo!();
|
||||
}
|
||||
Reference in New Issue
Block a user