Submission #1257046

#TimeUsernameProblemLanguageResultExecution timeMemory
1257046mkkkkkkkkTriple Peaks (IOI25_triples)C++20
Compilation error
0 ms0 KiB
#include "triples.h" #include <bits/stdc++.h> using namespace std; long long count_triples(vector<int> H) { return 0ll; } vector<int> construct_range(int M, int K) { vector<int> res; for(int i=0;i<M;i++) { if((i+1)%3==0) vec.push_back(2); else vec.push_back(1); } return vec; }

Compilation message (stderr)

triples.cpp: In function 'std::vector<int> construct_range(int, int)':
triples.cpp:16:9: error: 'vec' was not declared in this scope
   16 |         vec.push_back(2);
      |         ^~~
triples.cpp:18:9: error: 'vec' was not declared in this scope
   18 |         vec.push_back(1);
      |         ^~~
triples.cpp:20:10: error: 'vec' was not declared in this scope
   20 |   return vec;
      |          ^~~