Submission #880140

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
8801402023-11-28 20:07:13boris_7Bank (IZhO14_bank)C++17
19 / 100
74 ms6992 KiB
#include<bits/stdc++.h>
using namespace std;
using ll = long long;
void solve(){
int n,m;
cin>>n>>m;
vector<int>a(n);
vector<int>b(m);
for(int &i:a){
cin>>i;
}
for(int &i:b){
cin>>i;
}
vector<vector<int>>sum(1001);
for(int i = 0;i<(1<<m);i++){
int gumar = 0;
for(int j = 0;j<m;j++){
if(i&(1<<j)){
gumar+=b[j];
}
}
if(gumar<=1000){
sum[gumar].push_back(i);
}
}
vector<bool>last((1<<m)+1),cur((1<<m)+1);
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

bank.cpp: In function 'void solve()':
bank.cpp:44:18: warning: variable 'c' set but not used [-Wunused-but-set-variable]
   44 |         for(bool c:cur) c = 0;
      |                  ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...