제출 #1257046

#제출 시각아이디문제언어결과실행 시간메모리
1257046mkkkkkkkkTriple Peaks (IOI25_triples)C++20
컴파일 에러
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; }

컴파일 시 표준 에러 (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;
      |          ^~~