Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main(){
- int n,x,aux,count=0,div = 0; cin >> n;
- for(int i = 0; i < n; i++){
- cin >> x; int v[x]; count = 0;
- for(int j = 0; j < x; j++){
- cin >> aux;
- for(int k = 0; k < x; k++){
- /* if(k != j){
- cout << aux << " = " << v[k] << " ?"<< endl;
- }*/
- if(aux == v[k] && k != j){
- break;
- }
- else{
- v[j] = aux;
- count++;
- }
- }
- }
- cout << count / x<< endl;
- }
- return 0;
- } //n*x² = 10² * 10^4 = 10^6
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement