Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
79513 雷瀚迪 导弹拦截问题 C++ Wrong Answer 1 MS 268 KB 311 2024-07-07 11:28:00

Tests(0/10):


Code:

#include<bits/stdc++.h> using namespace std; int b[1001]; int main() { int n=0,x=0; int l=0; while(cin>>b[++l]) { n++; } int min0=b[1]; int i=1,j=1; while(i<=n) { j=i; while(b[j]>=b[j+1]) { min0=min(min0,b[j+1]); j++; } x++; i+=j; } cout<<x; return 0; }


Run Info:

------Input------
123 256 369 213 456 956 23 698 1236 321 500 666
------Answer-----
6
------Your output-----
4