42372023-03-17 08:05:301478Zenelejátszó (35 pont)cpp17Accepted 35/35112ms5964 KiB
#include <bits/stdc++.h>

using namespace std;

int main()
{
    int n;
    cin>>n;
    vector<int> a(n+1);
    int x=0;
    for(int i=1; i<=n; i++){
        int y;
        cin>>y;
        a[i] = y-x;
        x = y;
    }
    sort(a.begin(), a.end());
   // for(int x:a) cout<<x<<" ";
    queue<int> sol;
    for(int i=1; i<=n+1; i++)
    {
        if(a[i]!=a[i-1]){
            sol.push(i);
        }
    }
    cout<<sol.size()<<endl;
    while(!sol.empty()){
        cout<<sol.front()<<" ";
        sol.pop();
    }

    return 0;
}
SubtaskSumTestVerdictTimeMemory
base35/35
1Accepted0/03ms1808 KiB
2Accepted0/09ms2264 KiB
3Accepted2/23ms2276 KiB
4Accepted2/23ms2488 KiB
5Accepted2/24ms2712 KiB
6Accepted2/24ms2920 KiB
7Accepted2/23ms3004 KiB
8Accepted2/24ms3076 KiB
9Accepted2/214ms3556 KiB
10Accepted2/232ms4000 KiB
11Accepted2/221ms3752 KiB
12Accepted2/279ms4920 KiB
13Accepted2/279ms5200 KiB
14Accepted1/192ms5268 KiB
15Accepted2/2100ms5540 KiB
16Accepted2/2111ms5748 KiB
17Accepted2/2112ms5836 KiB
18Accepted2/2111ms5964 KiB
19Accepted2/2112ms5704 KiB
20Accepted2/261ms5188 KiB