prog.cpp:3:31: error: ‘vector’ has not been declared
int minimizeTheDifference(vector<vector<int>>& mat, int target) {
^~~~~~
prog.cpp:3:37: error: expected ‘,’ or ‘...’ before ‘<’ token
int minimizeTheDifference(vector<vector<int>>& mat, int target) {
^
prog.cpp: In member function ‘int Solution::minimizeTheDifference(int)’:
prog.cpp:4:9: error: ‘bitset’ was not declared in this scope
bitset<4901>p(1);
^~~~~~
prog.cpp:4:21: error: ‘p’ was not declared in this scope
bitset<4901>p(1);
^
prog.cpp:5:25: error: ‘mat’ was not declared in this scope
for (auto row : mat) {
^~~
prog.cpp:6:25: error: ‘pp’ was not declared in this scope
bitset<4901>pp;
^~
prog.cpp:7:24: error: unable to deduce ‘auto&&’ from ‘row’
for(auto i:row){
^~~
prog.cpp:10:13: error: ‘swap’ was not declared in this scope
swap(p,pp);
^~~~
prog.cpp:14:19: error: ‘INT_MAX’ was not declared in this scope
int res = INT_MAX;
^~~~~~~
prog.cpp:14:19: note: ‘INT_MAX’ is defined in header ‘<climits>’; did you forget to ‘#include <climits>’?
prog.cpp:1:1:
+#include <climits>
class Solution {
prog.cpp:14:19:
int res = INT_MAX;
^~~~~~~
prog.cpp:16:43: error: ‘target’ was not declared in this scope
if (p[i])res=min(res, abs(i - target));
^~~~~~
prog.cpp:16:35: error: ‘abs’ was not declared in this scope
if (p[i])res=min(res, abs(i - target));
^~~
prog.cpp:16:26: error: ‘min’ was not declared in this scope
if (p[i])res=min(res, abs(i - target));
^~~