-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwcsa.cpp
More file actions
41 lines (34 loc) · 714 Bytes
/
Copy pathwcsa.cpp
File metadata and controls
41 lines (34 loc) · 714 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#include <iostream>
#include <vector>
using namespace std;
/*
int main()
{
vector<unsigned short int>result;
unsigned short int t;
cin>>t;
for (unsigned short int i=0; i<t; i++)
{
unsigned short int n,count=0;
cin>>n;
unsigned short int arr[n];
for (unsigned int i=1; i<=n; i++)
{
cin>>arr[i];
}
for (unsigned int i=1; i<=n; i++)
{
if (arr[arr[i]]==i)
{
count++;
}
}
result.push_back(n-count);
}
for (unsigned int i=0; i<t; i++)
{
cout<<result[i]<<"\n";
}
return 0;
}
*/