Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
80796 张黄源 18患病人数占总患病人数的比例 C++ Wrong Answer 1 MS 264 KB 365 2024-07-11 16:25:15

Tests(0/10):


Code:

#include<iostream> using namespace std; int a[1000001]; int main() { int n,k; int first=0,end=0; cin>>n; for(int i=1;i<=n;i++){ cin>>a[i]; } cin>>k; for(int i=1;i<=n;i++){ if(a[i]==k){ if(first==0){ first = i; //666,ZheGeShiGua. } end = i; } } if(first==0){ cout<<-1; } cout<<first<<' '<<end; return 0; }


Run Info:

------Input------
14 49 93 26 7 7 90 95 66 43 17 89 75 35 86
------Answer-----
21.43% 14.29% 14.29% 50.00%
------Your output-----
-10 0