# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
875826 | BbtT | Vudu (COCI15_vudu) | C++17 | 1064 ms | 17704 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include<bits/stdc++.h>
using namespace std;
long long int N,P,a[1000001];
int main(){
long long int C=0;
cin>>N;
for(int i=1;i<=N;i++){
int temp;
scanf("%d",&temp);
a[i]=a[i-1]+temp;
}
cin>>P;
for(int i=1;i<=N;i++){
for(int j=i;j<=N;j++){
if(a[j]-a[i-1]>=P*(j-i+1))C++;
}
}cout<<C<<endl;
return 0;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |