# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
959182 | Ariadna | Vudu (COCI15_vudu) | C++14 | 1084 ms | 13940 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 ll long long
using namespace std;
int main() {
int n;
ll p;
cin >> n;
vector<int> a(n);
for (int i = 0; i < n; ++i) cin >> a[i];
cin >> p;
ll sum, ans = 0;
for (int i = 0; i < n; ++i) {
sum = 0;
for (int j = i; j < n; ++j) {
sum += a[j];
if (sum >= p * (ll)(j-i+1)) ++ans;
}
}
cout << ans << '\n';
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |