제출 #672650

#제출 시각아이디문제언어결과실행 시간메모리
672650mseebacherDetecting Molecules (IOI16_molecules)C++17
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h> #include "molecules.h" using namespace std; vector<int> find_subset(int l, int u, vector<int> w) { int n = w.size(); vector<int> erg; ll sum = 0; for(int i = 0;i<n;i++){ if(sum >= l && sum <= u){ return erg; } sum += w[i]; erg.push_back(i); } return erg; }

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

molecules.cpp: In function 'std::vector<int> find_subset(int, int, std::vector<int>)':
molecules.cpp:8:2: error: 'll' was not declared in this scope; did you mean 'l'?
    8 |  ll sum = 0;
      |  ^~
      |  l
molecules.cpp:10:6: error: 'sum' was not declared in this scope
   10 |   if(sum >= l && sum <= u){
      |      ^~~
molecules.cpp:13:3: error: 'sum' was not declared in this scope
   13 |   sum += w[i];
      |   ^~~