Submission #1294601

#TimeUsernameProblemLanguageResultExecution timeMemory
1294601theiuliusWorld Map (IOI25_worldmap)C++17
Compilation error
0 ms0 KiB
#include "worldmap.h" #include <bits/stdc++.h> #define pb push_back using namespace std; std::vector<std::vector<int>> create_map(int N, int M, std::vector<int> A, std::vector<int> B) { std::vector<std::vector<int>> ans(N, std::vector<int>); for (int i = 0; i < N; i++){ for (int j = 0; j < N; j++){ ans[i].pb((i + j) % n + 1); } } return ans; }

Compilation message (stderr)

worldmap.cpp: In function 'std::vector<std::vector<int> > create_map(int, int, std::vector<int>, std::vector<int>)':
worldmap.cpp:8:56: error: expected primary-expression before ')' token
    8 |   std::vector<std::vector<int>> ans(N, std::vector<int>);
      |                                                        ^
worldmap.cpp:12:31: error: 'n' was not declared in this scope
   12 |           ans[i].pb((i + j) % n + 1);
      |                               ^