42402023-03-17 08:15:49gittyZenelejátszó (35 pont)cpp17Wrong answer 0/35112ms5884 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;
    int x,y;
    db++;
    cin>>x;
    interv.push_back(0);
    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
1Accepted0/03ms1812 KiB
2Wrong answer0/08ms2472 KiB
3Wrong answer0/23ms2272 KiB
4Wrong answer0/23ms2436 KiB
5Wrong answer0/23ms2700 KiB
6Wrong answer0/23ms2884 KiB
7Wrong answer0/23ms3092 KiB
8Wrong answer0/24ms3312 KiB
9Wrong answer0/216ms3660 KiB
10Wrong answer0/232ms3988 KiB
11Wrong answer0/223ms4016 KiB
12Wrong answer0/279ms5504 KiB
13Wrong answer0/278ms5564 KiB
14Wrong answer0/189ms5564 KiB
15Wrong answer0/298ms5560 KiB
16Wrong answer0/2112ms5564 KiB
17Wrong answer0/2112ms5836 KiB
18Wrong answer0/2112ms5792 KiB
19Wrong answer0/2112ms5884 KiB
20Wrong answer0/259ms4992 KiB