제출 #1313163

#제출 시각아이디문제언어결과실행 시간메모리
1313163eri16Permutation Game (APIO25_permgame)C++20
컴파일 에러
0 ms0 KiB
#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++;} } retrun sm; }

컴파일 시 표준 에러 (stderr) 메시지

permgame.cpp: In function 'int Alice(int, int, std::vector<int>, std::vector<int>, int, std::vector<int>)':
permgame.cpp:29:5: error: 'retrun' was not declared in this scope
   29 |     retrun sm;
      |     ^~~~~~
permgame.cpp:30:1: warning: control reaches end of non-void function [-Wreturn-type]
   30 | }
      | ^