Run ID 作者 问题 语言 测评结果 分数 时间 内存 代码长度 提交时间
441304 徐嘉豪 [ 2020年绍兴市第十八届少儿信息学竞赛复赛 ] - 好朋友friend C++ 编译错误 0 0 MS 0 KB 329 2026-05-19 17:55:29

Tests(0/0):


#include<bits/stdc++.h> using namespace std; int main(){ int n,x,m,d=1; int s[105]; cin>>n>>x>>m; for(int i=1;i<=n;i++){ cin>>s[i]; } while(1){ if(x-d>=1&&p[x-d]!=0&&p[x-d]<=m){ cout<<d*10; return 0; } if(x+d<=n&&p[x+d]!=0&&p[x+d]<=m){ cout<<d*10; return 0; }d++; } return 0; }


测评信息: