제출 #1252629

#제출 시각아이디문제언어결과실행 시간메모리
1252629bzzzzzzzzzzTriple Peaks (IOI25_triples)C++20
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h> #include "triples.h" using namespace std; using ll = long long; std::vector<int> construct_range(int M, int K) { for (int i = 0; i < M; i++) { v.push_back(1); v.push_back(1); v.push_back(2); v.push_back(2); v.push_back(3); } v.resize(M); return v; } long long count_triples(vector<int> H) { return 0; }

컴파일 시 표준 에러 (stderr) 메시지

triples.cpp: In function 'std::vector<int> construct_range(int, int)':
triples.cpp:8:9: error: 'v' was not declared in this scope
    8 |         v.push_back(1);
      |         ^
triples.cpp:14:5: error: 'v' was not declared in this scope
   14 |     v.resize(M);
      |     ^