Submission #474753

#TimeUsernameProblemLanguageResultExecution timeMemory
474753AnasBenMoussaDetecting Molecules (IOI16_molecules)C++14
Compilation error
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()){ return 0; } else{ for(int i=0;i<df/w[0];i++){ v[i]=i; } } return v; }

Compilation message (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()){
      |        ~~~~~~~^~~~~~~~~
molecules.cpp:18:16: error: could not convert '0' from 'int' to 'std::vector<long long int>'
   18 |         return 0;
      |                ^
      |                |
      |                int