| Problem | harddisk |
|---|---|
| User | MDXCI |
| Submission Time | 2026-02-22 23:56:04 |
| Score | 0 |
| Max Time | N/A |
| Max Memory | N/A |
Owl Get a Life
harddisk.cpp: In function ‘long int rar(int, int, std::vector<int>&, std::vector<int>&, int&)’:
harddisk.cpp:24:42: error: no match for ‘operator&&’ (operand types are ‘std::pair<int, int>’ and ‘bool’)
24 | if (memo.find(make_pair(ind, weight) && weight != 0) != memo.end()) return memo[make_pair(ind,weight)];
| ~~~~~~~~~~~~~~~~~~~~~~ ^~ ~~~~~~~~~~~
| | |
| std::pair<int, int> bool
harddisk.cpp:24:42: note: candidate: ‘operator&&(bool, bool)’ <built-in>
24 | if (memo.find(make_pair(ind, weight) && weight != 0) != memo.end()) return memo[make_pair(ind,weight)];
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
harddisk.cpp:24:42: note: no known conversion for argument 1 from ‘std::pair<int, int>’ to ‘bool’
In file included from /usr/include/c++/9/valarray:603,