# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
625302 | MinaRagy06 | Vudu (COCI15_vudu) | C++17 | 1077 ms | 17740 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 lesgooo ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0)
#define endl '\n'
#define int long long
signed main()
{
lesgooo;
int n;
cin >> n;
int a[n];
for (int i = 0; i < n; i++) cin >> a[i];
int p;
cin >> p;
int ctr = 0;
for (int i =0; i < n; i++)
{
int sum = 0;
for (int j = i; j < n; j++)
{
sum+=a[j];
ctr+=sum/(j-i+1)>=p;
}
}
cout << ctr;
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |