Submission #7255251


Source Code Expand

Copy
<?php
fscanf(STDIN, '%d', $n);
$h = array_map('intval', explode(' ', trim(fgets(STDIN))));
$ans = 0;
$cnt = 0;
for ($i = 0; $i < $n - 1; $i++) {
    if ($h[$i + 1] <= $h[$i]) $cnt++;
    else $cnt = 0;
    $ans = max($cnt, $ans);
}
echo $ans . PHP_EOL;

Submission Info

Submission Time
Task C - Lower
User hideyuk1
Language PHP7 (7.0.15)
Score 300
Code Size 262 Byte
Status
Exec Time 34 ms
Memory 16884 KB

Test Cases

Set Name Score / Max Score Test Cases
All 300 / 300 sample_01, sample_02, sample_03, testcase_01, testcase_02, testcase_03, testcase_04, testcase_05, testcase_06, testcase_07, testcase_08, testcase_09, testcase_10, testcase_11, testcase_12, testcase_13, testcase_14, testcase_15
Sample 0 / 0 sample_01, sample_02, sample_03
Case Name Status Exec Time Memory
sample_01 11 ms 4728 KB
sample_02 9 ms 4604 KB
sample_03 9 ms 4604 KB
testcase_01 23 ms 10744 KB
testcase_02 32 ms 16884 KB
testcase_03 31 ms 16884 KB
testcase_04 9 ms 4604 KB
testcase_05 11 ms 6648 KB
testcase_06 22 ms 10744 KB
testcase_07 29 ms 16884 KB
testcase_08 34 ms 16884 KB
testcase_09 9 ms 4604 KB
testcase_10 32 ms 16884 KB
testcase_11 33 ms 16884 KB
testcase_12 30 ms 14836 KB
testcase_13 9 ms 4604 KB
testcase_14 30 ms 16884 KB
testcase_15 32 ms 16884 KB