函数名。。变量名。。。看不下去了。。。
by schtonn @ 2019-09-01 12:58:31
尼这题不能用数组模拟,因为t_i<=10^9,而尼的数组实际上开的是t_i的值而不是数量
by schtonn @ 2019-09-01 13:06:07
@[眼镜犬](/space/show?uid=218545)
by schtonn @ 2019-09-01 13:06:15
~~总感觉这题好水~~
by schtonn @ 2019-09-01 13:08:57
@[”蒟蒻”](/space/show?uid=95027) 过了过了。
by 眼镜犬 @ 2019-09-01 16:33:14
我也R了,求救
```
#include<bits/stdc++.h>
using namespace std;
bool a[200000]={false};
int main() {
int n,p,t,st=0,ht=0;
cin>>n>>t;
for(int i=1; i<=n; ++i) {
cin>>p;
a[p]=true;
}
long long i=1;
while(ht||n) {
if(a[i]==true) {
ht=t;
}
if(ht) {
++st;
}
++i;
}
cout<<st;
return 0;
}
```
全R,比楼上还惨,请各位津津帮个忙。
by dmslhy @ 2020-02-28 16:34:31