Guest User

Untitled

a guest
Mar 28th, 2022
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.18 KB | None | 0 0
  1. int coppie(int N, int C[])
  2. {
  3. int ans = 0;
  4. for(int i = 0; i < N; i++)
  5. {
  6. for(int j = C[i]; j != -1; j = C[j])
  7. ans++;
  8. }
  9.  
  10. return ans;
  11. }
Advertisement
Add Comment
Please, Sign In to add comment