제출 #474755

#제출 시각아이디문제언어결과실행 시간메모리
474755AnasBenMoussaDetecting Molecules (IOI16_molecules)C++14
컴파일 에러
0 ms0 KiB
#include "molecules.h" #include <bits/stdc++.h> typedef double db ; using namespace std; #define all(x) begin(x), end(x) #define pb push_back #define int long long #define doub(k) printf("%.1lf\n", k) // setprecision(5) typedef pair<int ,int > pll;typedef map<int , int > mll;typedef vector<int > vll;typedef vector<pll>vpll; typedef set<int > sll; const int nx[4] = {0, 0, 1, -1}, ny[4] = {1, -1, 0, 0}; const int dr[8] = {1,1,0,-1,-1,-1, 0, 1}, dc[8] = {0,1,1, 1, 0,-1,-1,-1}; std::vector<int> find_subset(int l, int u, std::vector<int> w) { int df=u-l; vector<int>v(df/w[0]); if(df/w[0]>w.size()){ v.pb(0); return v; } else{ for(int i=0;i<df/w[0];i++){ v[i]=i; } } return v; }

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

molecules.cpp: In function 'std::vector<long long int> find_subset(long long int, long long int, std::vector<long long int>)':
molecules.cpp:17:15: warning: comparison of integer expressions of different signedness: 'long long int' and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   17 |     if(df/w[0]>w.size()){
      |        ~~~~~~~^~~~~~~~~
/usr/bin/ld: /tmp/cc0uEEHY.o: in function `main':
grader.cpp:(.text.startup+0x18d): undefined reference to `find_subset(int, int, std::vector<int, std::allocator<int> >)'
collect2: error: ld returned 1 exit status