제출 #1029379

#제출 시각아이디문제언어결과실행 시간메모리
1029379OspleiDetecting Molecules (IOI16_molecules)C++17
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h> #include "molecules.h" using namespace std; typedef pair<int,int> ii; typedef long long ll; typedef vector<int> vi; typedef vector<vi> vvi; typedef vector<ii> vii; typedef vector<vii> wgraf; typedef pair<int,ii> edge; typedef vector <ll> vl; typedef pair <ll, ll> LL; typedef vector <LL> vll; #define UNVISITED 0 #define VISITED 1 #define pb push_back #define F first #define S second int[] find_subset(int l, int u, vi w){ ll suma = 0, n = w.size(); vi ans; for (ll i = 0; i < n; i++) { suma += w[i]; ans.pb(i); if (suma >= l && suma <= u) return ans; } vi nada; return nada; }

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

molecules.cpp:23:4: error: structured binding declaration cannot have type 'int'
   23 | int[] find_subset(int l, int u, vi w){
      |    ^~
molecules.cpp:23:4: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
molecules.cpp:23:4: error: empty structured binding declaration
molecules.cpp:23:7: error: expected initializer before 'find_subset'
   23 | int[] find_subset(int l, int u, vi w){
      |       ^~~~~~~~~~~