249782026-02-17 10:44:34KevinZenelejátszó (35 pont)cpp17Wrong answer 0/3596ms2360 KiB
#include <bits/stdc++.h>
using namespace std;
using ll=long long;
using pll=pair<ll, ll>;

int main() {
    ios::sync_with_stdio(false); cin.tie(0); cout.tie(0);
    ll n; cin >> n;
    map<ll, ll> m;
    //m[1]=1;
    ll a=0, b;
    for (ll i=0; i<n; i++){
        cin >> b;
        if (m.find(b-a)==m.end()) m[b-a]=0;
        m[b-a]++;
        a=b;
    }
    cout << m.size()+1 << '\n' << 1 << ' ';
    ll curr=0;
    for (auto& [a, b]:m){
        curr+=b;
        cout << curr << ' ';
    }
}
SubtaskSumTestVerdictTimeMemory
base0/35
1Wrong answer0/01ms316 KiB
2Wrong answer0/03ms500 KiB
3Wrong answer0/21ms316 KiB
4Wrong answer0/21ms316 KiB
5Wrong answer0/21ms420 KiB
6Wrong answer0/21ms316 KiB
7Wrong answer0/21ms316 KiB
8Wrong answer0/21ms316 KiB
9Wrong answer0/216ms1592 KiB
10Wrong answer0/237ms2360 KiB
11Wrong answer0/29ms428 KiB
12Wrong answer0/230ms424 KiB
13Wrong answer0/228ms508 KiB
14Wrong answer0/141ms444 KiB
15Wrong answer0/265ms640 KiB
16Wrong answer0/296ms1868 KiB
17Wrong answer0/294ms1832 KiB
18Wrong answer0/294ms1876 KiB
19Wrong answer0/294ms1796 KiB
20Wrong answer0/257ms2356 KiB