# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1205083 | hackstar | Permutation Game (APIO25_permgame) | C++20 | 0 ms | 0 KiB |
#include "permgame.h"
#include <vector>
#include <utility>
#include<bits/stdc++.h>
using namespace std;
int Alice(int m, int e, std::vector<int> u, std::vector<int> v, int n, std::vector<int> p) {
for(int i=0;i<n;i++){
if(p[i]!=i){
for(int j=i+1;j<n;j++){
if(p[j]==i){
t[0]=i;
t[1]=j;
int j=Bob(t);
swap(p[t[u[j]]], p[t[v[j]]]);
break;
}
}
}
}
}