How can I understand array into another array ?

Правка ru1, от dnazirzhanov05, 2020-09-15 16:49:26

Hello , Codeforces Community !!!

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

int t;

cin>>t;

while(t--)

{

    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 t;

cin >> t;

while(t--){

    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

Теги #programming language, #c++

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
ru4 Русский dnazirzhanov05 2020-09-16 09:10:46 37
ru3 Русский dnazirzhanov05 2020-09-16 06:11:47 82
ru2 Русский dnazirzhanov05 2020-09-15 18:41:44 5
ru1 Русский dnazirzhanov05 2020-09-15 16:49:26 947 Первая редакция (опубликовано)