ログインしてください。
提出 #41936702
ソースコード 拡げる
#[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);
}
提出情報
| 提出日時 | |
|---|---|
| 問題 | A - First Player |
| ユーザ | sou31415 |
| 言語 | Rust (1.42.0) |
| 得点 | 100 |
| コード長 | 829 Byte |
| 結果 | AC |
| 実行時間 | 6 ms |
| メモリ | 2192 KiB |
ジャッジ結果
| セット名 | Sample | All | ||||
|---|---|---|---|---|---|---|
| 得点 / 配点 | 0 / 0 | 100 / 100 | ||||
| 結果 |
|
|
| セット名 | テストケース |
|---|---|
| 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 |
| ケース名 | 結果 | 実行時間 | メモリ |
|---|---|---|---|
| 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 |