Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
39676 刁泓烨 导弹拦截问题 C++ Accepted 1 MS 280 KB 415 2022-10-03 11:34:09

Tests(10/10):


Code:

#include<iostream> using namespace std; int a[1005],b[1005],ans; int main(){ int i=0,t=0; while(cin>>a[i]){ i++; } while(t!=i+1){ ans++; int Max=60000; for(int j=0;j<=i;j++){ if(!b[j]&&a[j]<=Max){ Max=a[j]; b[j]=1; t++; } } } cout<<ans<<endl; return 0; }