좌표 개수가 얼마 안되서 재귀돌려서 모든 경우의 수 다 해보고 비교해서 최단거리 찾는데
이걸 DP로는 어떻게 구현해야할까... 어렵네
#include<opencv2>#include <iostream>#include <random>#include <time>#include <stack>#define nonMouse "Non MouseEvent"#define useMouse "Mouse Event"using namespace std;using namespace cv;struct temp { int x, y; }pt+, temp2;stack<temp>S, MIN_D;int visit+;temp Min_pt+;int Min_dis = 2147438646;int dot;int temp_distance;void draw_line(int s, int n) { //n은 그려야할
비트 DP
되게 유명한 DP 문제이니 찾아보면 됨. TSP 비트 DP로
으오 ㄳㄳ
#include<opencv2>#include <iostream>#include <random>#include <time>#include <stack>#define nonMouse "Non MouseEvent"#define useMouse "Mouse Event"using namespace std;using namespace cv;struct temp { int x, y; }pt+, temp2;stack<temp>S, MIN_D;int visit+;temp Min_pt+;int Min_dis = 2147438646;int dot;int temp_distance;void draw_line(int s, int n) { //n은 그려야할
비트 DP
되게 유명한 DP 문제이니 찾아보면 됨. TSP 비트 DP로
으오 ㄳㄳ