-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy path24problem2.cpp
More file actions
33 lines (26 loc) · 811 Bytes
/
24problem2.cpp
File metadata and controls
33 lines (26 loc) · 811 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#include <iostream>
#include <vector>
#include <limits>
using namespace std;
bool search(vector<int> nums, vector<bool> used, int count, int pathnow, int target){
if(nums.size() == 1){
}
return false;
}
int main(void){
vector<vector<int>> nums = {{11, 11, 5, 1},
{8, 6, 2, 2},
{1000, 100, 10, 1}};
for(int i = 0; i < nums.size(); i++){
for(int j = 0; j < nums[i].size(); j++){
cout<<nums[i][j]<<" ";
}
if(search(nums[i], 24)){
cout<<": possible = true" <<endl;
}
else{
cout<<": possible = false" <<endl;
}
}
return 0;
}