42382023-03-17 08:08:01gittyZenelejátszó (35 pont)cpp17Wrong answer 0/35115ms5920 KiB
#include <bits/stdc++.h>

using namespace std;

int main()
{
//    ifstream cin("in.txt");

    long long int n;
    cin>>n;
    vector <int> interv;
    queue <int> meg;
    int db=0;
    db++;
    meg.push(1);
    int x,y;
    cin>>x;
    interv.push_back(x);
    for(int i=2;i<=n;i++)
    {
        cin>>y;
        interv.push_back(y-x);
        x=y;
    }
//    for(int i=0;i<n;i++)
//    {
//        cout<<interv[i];
//    }
    sort(interv.begin(),interv.end());
//     for(int i=0;i<n;i++)
//    {
//        cout<<interv[i]<<" ";
//    }
//    cout<<endl;
    for(int i=0;i<n;i++)
    {
        while(interv[i]==interv[i+1]){
          i++;
        }
        meg.push(i+1);
        db++;
    }
    meg.push(n+1);
    cout<<db<<endl;
    while(!meg.empty())
    {
        cout<<meg.front()<<" ";
        meg.pop();
    }
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base0/35
1Wrong answer0/03ms1808 KiB
2Wrong answer0/09ms2476 KiB
3Wrong answer0/23ms2492 KiB
4Wrong answer0/23ms2288 KiB
5Wrong answer0/24ms2544 KiB
6Wrong answer0/24ms2880 KiB
7Wrong answer0/24ms2888 KiB
8Wrong answer0/24ms2888 KiB
9Wrong answer0/216ms3364 KiB
10Wrong answer0/234ms3768 KiB
11Wrong answer0/223ms3884 KiB
12Wrong answer0/282ms5360 KiB
13Wrong answer0/281ms5292 KiB
14Wrong answer0/193ms5492 KiB
15Wrong answer0/2103ms5500 KiB
16Wrong answer0/2115ms5504 KiB
17Wrong answer0/2115ms5628 KiB
18Wrong answer0/2115ms5836 KiB
19Wrong answer0/2115ms5920 KiB
20Wrong answer0/261ms5032 KiB