# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
1274430 | hccoder | Permutation Game (APIO25_permgame) | C++20 | 12 ms | 460 KiB |
#include <bits/stdc++.h>
using namespace std;
int Bob(std::vector<int> t);
int Alice(int m, int e, std::vector<int> u, std::vector<int> v, int n, std::vector<int> p){
if (m==2){
map<int, int> mp;
for (int i = 0; i<n; i++) mp[p[i]] = i;
for (int i = 0; i<n; i++){
if (p[i]!=i){
int x = mp[i];
Bob({i, x});
mp[p[i]] = x;
mp[i] = i;
swap(p[i], p[x]);
}
}
return n;
}
else if (m==3 && e==3){
int res = 0;
for (int i = 0; i<n; i++){
if (p[i]==i) res++;
}
vector<int> P = p;
for (int x = 0; x<n; x++){
for (int y = x+1; y<n; y++){
for (int z = y+1; z<n; z++){
if (min({p[x], p[y],p[z]})>-1 && (p[x]==y || p[x]==z) && (p[y]==x || p[y]==z) && (p[z]==x || p[z]==y)){
res++;
Bob({x, y, z});
p[x]=p[y]=p[z]=-1;
}
}
}
}
return res;
}
}
컴파일 시 표준 에러 (stderr) 메시지
# | 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... |