58692023-10-04 17:28:21mmatedUtazásszervezés (75 pont)cpp17Wrong answer 4/754ms3812 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]++;
    } 
    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
base4/75
1Accepted0/03ms1892 KiB
2Wrong answer0/04ms2324 KiB
3Wrong answer0/32ms2204 KiB
4Accepted4/43ms2196 KiB
5Wrong answer0/43ms2400 KiB
6Wrong answer0/43ms2628 KiB
7Wrong answer0/42ms2692 KiB
8Wrong answer0/43ms3008 KiB
9Wrong answer0/53ms2888 KiB
10Wrong answer0/53ms3156 KiB
11Wrong answer0/63ms3188 KiB
12Wrong answer0/63ms3396 KiB
13Wrong answer0/63ms3340 KiB
14Wrong answer0/64ms3624 KiB
15Wrong answer0/64ms3580 KiB
16Wrong answer0/64ms3548 KiB
17Wrong answer0/64ms3812 KiB