| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 309677 | lukameladze | Lottery (CEOI18_lot) | C++14 | 574 ms | 888 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
# include <bits/stdc++.h>
using namespace std;
long long n,l,k,a[300005],cnt[300005],pr[300005],ans[300005],q;
int main()
{
cin>>n>>l;
for (int i=1; i<=n; i++)
{
cin>>a[i];
}
cin>>q;
cin>>k;
k=(l-k);
for (int d=1; d<=n-1; d++)
{
for (int j=1; j<=n-d; j++)
{
if(a[j]==a[j+d]) cnt[j]++;
}
for (int j=1; j<=n-d; j++)
{
pr[j]=pr[j-1]+cnt[j];
cnt[j]=0;
}
for (int j=l; j<=n-d; j++)
{
if (pr[j]-pr[j-l]>=k) ans[j-l+1]++, ans[j-l+1+d]++;
}
}
for (int i=1; i<=n-l+1; i++)
{
cout<<ans[i]<<" ";
}
cout<<endl;
}| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
