# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
997606 |
2024-06-12T14:42:16 Z |
TitanicXDzz |
Pilot (NOI19_pilot) |
C++14 |
|
39 ms |
3412 KB |
#include<bits/stdc++.h>
using namespace std;
long long a[100010];
int main(){
ios_base::sync_with_stdio(0); cin.tie(0);
int n,q;
cin>>n>>q;
long long ans=0;
for(int i=0;i<n;i++){
cin>>a[i];
}
a[n]=LLONG_MAX;
for(int ii=0;ii<q;ii++){
long long h;
cin>>h;
long long j=upper_bound(a,a+n,h)-a;
ans=j*(j+1)/2;
cout<<ans<<"\n";
}
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
348 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
348 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
348 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
348 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
7 ms |
1116 KB |
Output is correct |
2 |
Correct |
6 ms |
1116 KB |
Output is correct |
3 |
Correct |
5 ms |
1116 KB |
Output is correct |
4 |
Correct |
5 ms |
1116 KB |
Output is correct |
5 |
Correct |
7 ms |
1116 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
29 ms |
2260 KB |
Output is correct |
2 |
Correct |
22 ms |
3164 KB |
Output is correct |
3 |
Correct |
30 ms |
3160 KB |
Output is correct |
4 |
Correct |
39 ms |
3156 KB |
Output is correct |
5 |
Correct |
23 ms |
3172 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
26 ms |
2388 KB |
Output is correct |
2 |
Correct |
29 ms |
3296 KB |
Output is correct |
3 |
Correct |
32 ms |
3400 KB |
Output is correct |
4 |
Correct |
27 ms |
3412 KB |
Output is correct |
5 |
Correct |
29 ms |
3340 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
348 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
348 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
348 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |