# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
967735 | vjudge1 | Vudu (COCI15_vudu) | C++17 | 1100 ms | 13172 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>
#define int long long
using namespace std;
int n,k,arr[1000100], ans;
signed main(){
cin.tie(nullptr)->sync_with_stdio(false);
cin >> n;
for(int i = 1; i<=n; ++i) cin >> arr[i];
cin >> k;
for(int i = 1; i<=n; ++i){
int sum = 0;
for(int j = i; j<=n; ++j){
sum+=arr[j];
if(sum >= k*(j - i + 1)) ans++;
}
}
cout << ans;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |