# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
620055 |
2022-08-02T20:37:04 Z |
sword060 |
Vudu (COCI15_vudu) |
C++17 |
|
1000 ms |
60904 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>
int main(){
ios::sync_with_stdio(0);cin.tie(0);
int x,k;cin>>x;
int a[x],ans=0;
for(int i=0;i<x;i++)cin>>a[i];
cin>>k;
for(int i=0;i<x;i++)a[i]-=k;
ordered_set s;
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 |
4 ms |
716 KB |
Output is correct |
2 |
Correct |
3 ms |
592 KB |
Output is correct |
3 |
Correct |
3 ms |
596 KB |
Output is correct |
4 |
Execution timed out |
1016 ms |
58816 KB |
Time limit exceeded |
5 |
Incorrect |
476 ms |
33292 KB |
Output isn't correct |
6 |
Incorrect |
916 ms |
52152 KB |
Output isn't correct |
7 |
Incorrect |
928 ms |
54268 KB |
Output isn't correct |
8 |
Incorrect |
778 ms |
46908 KB |
Output isn't correct |
9 |
Execution timed out |
1067 ms |
60904 KB |
Time limit exceeded |
10 |
Incorrect |
904 ms |
52868 KB |
Output isn't correct |