#include "permgame.h"
#include <bits/stdc++.h>
using namespace std;
int Alice(int m, int e, vector<int> u, vector<int> v, int n, vector<int> p) {
if (m==2){
vector<int> pos(n);
for(int i=0; i<n; i++){
pos[p[i]]=i;
}
for(int i=0; i<n-1; i++){
if(pos[i]==i) continue;
Bob({i, pos[i]});
int tm=pos[i];
pos[p[i]]=tm;
pos[i]=i;
swap(p[i], p[tm]);
}
return n;
}
int sm=0;
for(int i=0; i<n; i++){
if (p[i]==i){sm++;}
}
return sm;
}
| # | Verdict | Execution time | Memory | Grader output |
|---|
| Fetching results... |
| # | Verdict | Execution time | Memory | Grader output |
|---|
| Fetching results... |
| # | Verdict | Execution time | Memory | Grader output |
|---|
| Fetching results... |
| # | Verdict | Execution time | Memory | Grader output |
|---|
| Fetching results... |
| # | Verdict | Execution time | Memory | Grader output |
|---|
| Fetching results... |
| # | Verdict | Execution time | Memory | Grader output |
|---|
| Fetching results... |
| # | Verdict | Execution time | Memory | Grader output |
|---|
| Fetching results... |