| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1362026 | kalkaper | Permutation Game (APIO25_permgame) | C++20 | 1 ms | 344 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) {
assert(m==2||e>m);
vector<int> t(m);
if(m==2){
for(int i=0;i<n;i++){
if(p[i]==i)continue;
for(int j=i+1;j<n;j++){
if(p[j]==i){
t[0]=i;
t[1]=j;
int idx=Bob(t);
swap(p[t[u[idx]]],p[t[v[idx]]]);
}
}
}
return n;
}
else if(e>m){
int ans=0;
for(int i=0;i<n;i++){
if(p[i]==i)ans++;
}
return ans;
}
else{
return 100;
}
}
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
