249752026-02-17 10:43:11KevinZenelejátszó (35 pont)cpp17Wrong answer 2/3596ms3776 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() << '\n';
    ll curr=0;
    for (auto& [a, b]:m){
        curr+=b;
        cout << curr << ' ';
    }
}
SubtaskSumTestVerdictTimeMemory
base2/35
1Accepted0/01ms316 KiB
2Wrong answer0/04ms316 KiB
3Wrong answer0/21ms316 KiB
4Wrong answer0/21ms316 KiB
5Wrong answer0/21ms316 KiB
6Wrong answer0/21ms332 KiB
7Wrong answer0/21ms508 KiB
8Wrong answer0/21ms316 KiB
9Accepted2/216ms1756 KiB
10Wrong answer0/235ms2856 KiB
11Wrong answer0/29ms316 KiB
12Wrong answer0/232ms1588 KiB
13Wrong answer0/229ms1588 KiB
14Wrong answer0/143ms1964 KiB
15Wrong answer0/265ms2120 KiB
16Wrong answer0/294ms3636 KiB
17Wrong answer0/294ms3776 KiB
18Wrong answer0/296ms3756 KiB
19Wrong answer0/294ms3636 KiB
20Wrong answer0/257ms3124 KiB