제출 #859553

#제출 시각UTC-0아이디문제언어결과실행 시간메모리
8595532023-10-10 10:10:00overwatch9은행 (IZhO14_bank)C++17
100 / 100
798 ms34224 KiB
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
const int maxn = 20;
const int maxm = 20;
const int maxmask = (1 << maxm) + 1;
vector <int> works[maxn];
vector <int> notes;
int n, m;
void solve(int sum, int mask, int id) {
vector <int> nums(__builtin_popcount(mask));
int s = 0;
for (int i = 0; i < m; i++) {
if (mask & (1 << i))
s += notes[i];
if (s > sum)
break;
}
if (sum == s)
works[id].push_back(mask);
}
bool dp[maxn][maxmask];
bool ready[maxn][maxmask];
bool solve2(int i, int mask) {
if (i == n)
return true;
if (ready[i][mask])
return dp[i][mask];
bool ans = false;
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...