Submission #28554773


Source Code Expand

#include <iostream>
#include <vector>

int main()
{
    int n;
    std::cin >> n;
    std::vector<int> h = std::vector<int>(n);
    for (auto& i: h)
    {
        std::cin >> i;
    }
    int ans = 0;
    for (int i = 0; i < n; ++i)
    {
        if (h[i] > ans)
        {
            ans = h[i];
        }
        else
        {
            break;
        }
    }
    std::cout << ans << std::endl;
}

Submission Info

Submission Time
Task B - Climbing Takahashi
User PineG
Language C++ (Clang 10.0.0)
Score 200
Code Size 426 Byte
Status AC
Exec Time 80 ms
Memory 3244 KiB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 200 / 200
Status
AC × 3
AC × 20
Set Name Test Cases
Sample sample_01.txt, sample_02.txt, sample_03.txt
All random_01.txt, random_02.txt, random_03.txt, random_04.txt, random_05.txt, random_06.txt, random_07.txt, random_08.txt, random_09.txt, random_10.txt, random_11.txt, random_12.txt, random_13.txt, random_14.txt, random_15.txt, random_16.txt, random_17.txt, sample_01.txt, sample_02.txt, sample_03.txt
Case Name Status Exec Time Memory
random_01.txt AC 60 ms 3156 KiB
random_02.txt AC 43 ms 3056 KiB
random_03.txt AC 42 ms 2992 KiB
random_04.txt AC 53 ms 2992 KiB
random_05.txt AC 27 ms 3244 KiB
random_06.txt AC 55 ms 3068 KiB
random_07.txt AC 20 ms 3076 KiB
random_08.txt AC 65 ms 2996 KiB
random_09.txt AC 74 ms 3124 KiB
random_10.txt AC 80 ms 3020 KiB
random_11.txt AC 66 ms 3060 KiB
random_12.txt AC 35 ms 3060 KiB
random_13.txt AC 59 ms 3068 KiB
random_14.txt AC 7 ms 3116 KiB
random_15.txt AC 80 ms 3184 KiB
random_16.txt AC 76 ms 3124 KiB
random_17.txt AC 2 ms 3064 KiB
sample_01.txt AC 2 ms 3064 KiB
sample_02.txt AC 1 ms 3000 KiB
sample_03.txt AC 2 ms 3180 KiB