제출 #1004957

#제출 시각아이디문제언어결과실행 시간메모리
1004957MardonbekhazratovDetecting Molecules (IOI16_molecules)C++17
0 / 100
1 ms348 KiB
#include "molecules.h" #include<bits/stdc++.h> using namespace std; int n; vector<int>ans; vector<int>sub1(int l,int u,vector<int>&w){ if((l+w[0])/w[0]*w[0]>u || (l+w[0])/w[0]>n) return vector<int>(0); return vector<int>(u/w[0],w[0]); } vector<int> find_subset(int l, int u, vector<int> w) { n=(int)w.size(); sort(w.begin(),w.end()); if(w[0]==w[n-1]) return sub1(l,u,w); }

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

molecules.cpp: In function 'std::vector<int> find_subset(int, int, std::vector<int>)':
molecules.cpp:18:1: warning: control reaches end of non-void function [-Wreturn-type]
   18 | }
      | ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...