# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
620067 |
2022-08-02T21:07:14 Z |
sword060 |
Vudu (COCI15_vudu) |
C++17 |
|
1000 ms |
55560 KB |
#include <bits/stdc++.h>
using namespace std;
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
#define ordered_set tree<int, null_type,less_equal<int>, rb_tree_tag,tree_order_statistics_node_update>
ordered_set s;
int main(){
ios::sync_with_stdio(0);cin.tie(0);
long long x,k;cin>>x;
long long a[x+3],ans=0;
for(int i=0;i<x;i++)cin>>a[i];
cin>>k;
for(int i=0;i<x;i++)a[i]-=k;
s.insert(0);
long long xd=0;
for(int i=0;i<x;i++){
xd+=a[i];
ans+=s.order_of_key(xd+1);
s.insert(xd);
}
cout<<ans;
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
3 ms |
724 KB |
Output is correct |
2 |
Correct |
2 ms |
596 KB |
Output is correct |
3 |
Correct |
3 ms |
596 KB |
Output is correct |
4 |
Execution timed out |
1024 ms |
53732 KB |
Time limit exceeded |
5 |
Incorrect |
518 ms |
30188 KB |
Output isn't correct |
6 |
Incorrect |
871 ms |
47872 KB |
Output isn't correct |
7 |
Incorrect |
919 ms |
49756 KB |
Output isn't correct |
8 |
Incorrect |
799 ms |
43340 KB |
Output isn't correct |
9 |
Execution timed out |
1064 ms |
55560 KB |
Time limit exceeded |
10 |
Incorrect |
886 ms |
48580 KB |
Output isn't correct |