# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
968352 | vjudge1 | Vudu (COCI15_vudu) | C++17 | 1059 ms | 17748 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;
#define ll long long
long long qs[1000001];
int main()
{
cin.tie(0)->sync_with_stdio(false);
cout.tie(0);
int n;
cin >> n;
for (int i = 1;i <= n;i++) {
cin >> qs[i];
qs[i]+=qs[i-1];
}
int p;
cin >> p;
ll cnt=0;
for (int i=1;i<=n;i++) {
for (int j=i;j<=n;j++) {
if ((qs[j]-qs[i-1])/(j-i+1) >= p) {
cnt++;
}
}
}
cout << cnt;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |