Сan anybody explain what does array into another array means, C++ ?

Revision ru4, by dnazirzhanov05, 2020-09-16 09:10:46

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

Tags #programming language, #c++

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
ru4 Russian dnazirzhanov05 2020-09-16 09:10:46 37
ru3 Russian dnazirzhanov05 2020-09-16 06:11:47 82
ru2 Russian dnazirzhanov05 2020-09-15 18:41:44 5
ru1 Russian dnazirzhanov05 2020-09-15 16:49:26 947 Первая редакция (опубликовано)