Submission #397623

#TimeUsernameProblemLanguageResultExecution timeMemory
397623victoriadKisik (COCI19_kisik)C++14
0 / 90
2088 ms67008 KiB
#include <cmath> #include <cstdio> #include <vector> #include <iostream> #include <algorithm> #include <utility> #include <queue> #include <map> #include <iomanip> #include <fstream> using namespace std; int k; void min(int &n,vector<int>&h,vector<int>&w,int x,int y,int nodo,int z){ if(z==k){ if(x*y<n&& z==k){ n=x*y; } return; } if(nodo<h.size()){ min(n,h,w,x,y,nodo+1,z); x+=w[nodo]; y=max(y,h[nodo]); min(n,h,w,x,y,nodo+1,z+1); } } int main(){ ios::sync_with_stdio(false); cin.tie(NULL); int n; cin>>n>>k; vector<int>w(n); vector<int>h(n); for(int i=0;i<n;i++){ cin>>w[i]>>h[i]; } int r=1e9; vector<int>a; min(r,h,w,0,0,0,0); cout<<r; return 0; }

Compilation message (stderr)

kisik.cpp: In function 'void min(int&, std::vector<int>&, std::vector<int>&, int, int, int, int)':
kisik.cpp:20:10: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   20 |   if(nodo<h.size()){
      |      ~~~~^~~~~~~~~
#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...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...