제출 #1205083

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

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

permgame.cpp: In function 'int Alice(int, int, std::vector<int>, std::vector<int>, int, std::vector<int>)':
permgame.cpp:13:41: error: 't' was not declared in this scope
   13 |                                         t[0]=i;
      |                                         ^
permgame.cpp:22:1: warning: no return statement in function returning non-void [-Wreturn-type]
   22 | }
      | ^