dnazirzhanov05's blog

By dnazirzhanov05, history, 4 years ago, In Russian

Hello , Codeforces Community !!!

I can't understand array into another array , for example , like this :

    int n;cin>>n;

    vector<int> v(n);

    vector<int> cnt(101,0);

    for(int i=0;i<n;i++)

    {
       cin>>v[i];

       cnt[v[i]]++;  ---> I don't understand cases like this

    }

--------------------------------------OR----------------------------------------------

    int n;

    cin >> n;

    int cnt[101];

    for(int i = 0; i <= 100; i++){

       cnt[i] = 0;

    }

    for(int i = 0; i < n; i++){

       int x;

       cin >> x;

       cnt[x]++; ---> I don't understand cases like this

    }

Can you explain what does this mean ?

Thank you for your advice

  • Vote: I like it
  • -7
  • Vote: I do not like it