Submission #41936702
Source Code Expand
#[allow(unused_imports)]
use itertools::Itertools;
#[allow(unused_imports)]
use petgraph::unionfind::UnionFind;
#[allow(unused_imports)]
use proconio::{fastout, input, marker::Chars, marker::Usize1};
#[allow(unused_imports)]
use std::cmp::{max, min};
#[allow(unused_imports)]
use std::collections::{BTreeSet, HashSet, VecDeque};
#[fastout]
fn main() {
input! {
n:usize,a:[(String,usize);n],
}
let mut idx: usize = 0;
let mut c: usize = std::usize::MAX;
for i in 0..n {
if a[i].1 < c {
idx = i;
c = a[i].1;
}
}
for i in idx..(idx + n) {
if i > n - 1 {
println!("{}", a[i - n].0);
} else {
println!("{}", a[i].0);
}
}
}
pub fn ziparam(a: usize, b: usize) -> usize {
return max(a, b) - min(a, b);
}
Submission Info
| Submission Time | |
|---|---|
| Task | A - First Player |
| User | sou31415 |
| Language | Rust (1.42.0) |
| Score | 100 |
| Code Size | 829 Byte |
| Status | AC |
| Exec Time | 6 ms |
| Memory | 2192 KiB |
Judge Result
| Set Name | Sample | All | ||||
|---|---|---|---|---|---|---|
| Score / Max Score | 0 / 0 | 100 / 100 | ||||
| Status |
|
|
| Set Name | Test Cases |
|---|---|
| Sample | example0.txt, example1.txt |
| All | 000.txt, 001.txt, 002.txt, 003.txt, 004.txt, 005.txt, 006.txt, 007.txt, 008.txt, 009.txt, 010.txt, 011.txt, example0.txt, example1.txt |
| Case Name | Status | Exec Time | Memory |
|---|---|---|---|
| 000.txt | AC | 6 ms | 1988 KiB |
| 001.txt | AC | 1 ms | 2056 KiB |
| 002.txt | AC | 2 ms | 2080 KiB |
| 003.txt | AC | 1 ms | 2052 KiB |
| 004.txt | AC | 1 ms | 2040 KiB |
| 005.txt | AC | 1 ms | 1940 KiB |
| 006.txt | AC | 1 ms | 2056 KiB |
| 007.txt | AC | 1 ms | 2116 KiB |
| 008.txt | AC | 1 ms | 2092 KiB |
| 009.txt | AC | 2 ms | 2140 KiB |
| 010.txt | AC | 1 ms | 2192 KiB |
| 011.txt | AC | 1 ms | 2096 KiB |
| example0.txt | AC | 2 ms | 2036 KiB |
| example1.txt | AC | 3 ms | 2040 KiB |