Submission #31642897


Source Code Expand

use proconio::input;

fn main() {
    input! {
        n: usize,
        a: [usize; 2_usize.pow(n as u32)],
    };
    let n2 = 2_usize.pow(n as u32);
    let v0 = *a[0..n2 / 2].iter().max().unwrap();
    let v1 = *a[n2 / 2..n2].iter().max().unwrap();
    let v = v0.min(v1);
    let ans = a.iter().copied().position(|a_i| a_i == v).unwrap() + 1;
    println!("{}", ans);
}

Submission Info

Submission Time
Task C - ABC Tournament
User bouzuya
Language Rust (1.42.0)
Score 300
Code Size 374 Byte
Status AC
Exec Time 9 ms
Memory 3036 KiB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 300 / 300
Status
AC × 3
AC × 12
Set Name Test Cases
Sample sample_01.txt, sample_02.txt, sample_03.txt
All extreme_00.txt, handmade_00.txt, handmade_01.txt, random_00.txt, random_01.txt, random_02.txt, random_03.txt, random_04.txt, random_05.txt, sample_01.txt, sample_02.txt, sample_03.txt
Case Name Status Exec Time Memory
extreme_00.txt AC 9 ms 2724 KiB
handmade_00.txt AC 2 ms 2012 KiB
handmade_01.txt AC 6 ms 2040 KiB
random_00.txt AC 5 ms 2924 KiB
random_01.txt AC 8 ms 2984 KiB
random_02.txt AC 7 ms 3036 KiB
random_03.txt AC 2 ms 2064 KiB
random_04.txt AC 1 ms 2172 KiB
random_05.txt AC 1 ms 1976 KiB
sample_01.txt AC 1 ms 2096 KiB
sample_02.txt AC 1 ms 2092 KiB
sample_03.txt AC 1 ms 1988 KiB