58682023-10-04 17:27:50mmatedUtazásszervezés (75 pont)cpp17Wrong answer 0/754ms3988 KiB
#include <bits/stdc++.h>
using namespace std;
#define f(i,k,n) for(int i=k; i<n; i++)
#define ll long long
const int inf = INT_MAX;

void solve()
{
    int n,k,m,c;
    cin>>n>>k>>m>>c;
    int a[k+m]={0};
    int x;
    f(i,0,c)
    {
        cin>>x;
        f(j,x,x+m+1)    a[j]++;
    } 
    f(i,1,k+m)    cout<<a[i];
    int maxi=0;
    f(i,0,k+m)  if(maxi<a[i])   maxi=a[i];
    cout<<maxi;
}

int main()
{
    ios::sync_with_stdio(0);
    cin.tie(0);
    int t=1;
    //cin>>t;
    while(t--)  solve();
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base0/75
1Wrong answer0/03ms1892 KiB
2Wrong answer0/04ms2184 KiB
3Wrong answer0/33ms2200 KiB
4Wrong answer0/43ms2424 KiB
5Wrong answer0/43ms2660 KiB
6Wrong answer0/43ms2720 KiB
7Wrong answer0/43ms2940 KiB
8Wrong answer0/43ms3304 KiB
9Wrong answer0/53ms3268 KiB
10Wrong answer0/54ms3320 KiB
11Wrong answer0/64ms3316 KiB
12Wrong answer0/64ms3296 KiB
13Wrong answer0/64ms3548 KiB
14Wrong answer0/64ms3768 KiB
15Wrong answer0/64ms3724 KiB
16Wrong answer0/64ms3976 KiB
17Wrong answer0/64ms3988 KiB