Submission #1291362

#TimeUsernameProblemLanguageResultExecution timeMemory
1291362LolkasMeepPermutation Game (APIO25_permgame)C++20
Compilation error
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) { ll score = 0; for(ll i = 0; i < m; i++){ if(i == p[i]) score++; } return score; vector<int> t(m); for (int i = 0; i < m; i++){ t[i] = i; } int j = Bob(t); swap(p[t[u[j]]], p[t[v[j]]]); return 42; }

Compilation message (stderr)

permgame.cpp: In function 'int Alice(int, int, std::vector<int>, std::vector<int>, int, std::vector<int>)':
permgame.cpp:6:5: error: 'll' was not declared in this scope
    6 |     ll score = 0;
      |     ^~
permgame.cpp:7:11: error: expected ';' before 'i'
    7 |     for(ll i = 0; i < m; i++){
      |           ^~
      |           ;
permgame.cpp:7:19: error: 'i' was not declared in this scope
    7 |     for(ll i = 0; i < m; i++){
      |                   ^
permgame.cpp:8:23: error: 'score' was not declared in this scope
    8 |         if(i == p[i]) score++;
      |                       ^~~~~
permgame.cpp:11:12: error: 'score' was not declared in this scope
   11 |     return score;
      |            ^~~~~