Submission #1205083

#TimeUsernameProblemLanguageResultExecution timeMemory
1205083hackstarPermutation Game (APIO25_permgame)C++20
Compilation error
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;
				}
			}
		}
	}
}

Compilation message (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 | }
      | ^