본문 바로가기

분류 전체보기

(698)
OSRM Backend build for debugging. (Win visual studio 2017) 1. Boost 라이브러리 설치 osrm 설치 시 제공되는 boost 라이브러리는 Debug용이 아니므로, 디버그 모드로 빌드 할 수 없다. 따라서 버전에 맞는 boost라이브러리를 설치해야 한다. 설치는 소스를 다운받아 빌드해도 되지만 아래 사이트에서 실행파일을 다운받아 설치하는 것이 편하다. https://sourceforge.net/projects/boost/files/boost-binaries/1.73.0/ 여기서 중요한 점은 64비트 용 설치 파일을 받아야 하고 msvc 버전은 아래를 참고하길 바란다. Visual studio 2019 14.2 Visual studio 2017 14.1 Visual studio 2015 14.0 그래서 본 글에서는 boost_1_73_0-msvc-14.1-64 ..
OSRM Backend Build. (Win visual studio 2019) Windows OS에서 최신 OSRM-Backend 빌드 방법에 대해서 정리한 글이며, Visual Studio 2019가 필요하다. 다른 버전의 Visual Studio 에서 빌드를 하기 위해 몇가지 설정이 더 필요한데, 이는 추후에 다시 정리할 생각이다. 1. 소스코드 다운 git clone github.com/Project-OSRM/osrm-backend 2. build-local.bat 수정 원래는 SET LOCAL_DEV=1 이 주석처리되어 있을 것이다. 따로 건드릴 필요가 없긴한데, 이 주석을 해제해주면 빌드 후 다시 빌드를 할때 불필요한 작업을 줄여줄 수 있다. 3. appveyor-build.bat 수정 본인 PC에 Visual Studio 2019 와 맞는 MSBuild 실행파일이 있는 ..
5648. 원자 소멸 시뮬레이션 typedef struct { int y, x, dir, k; }info; static int N; static int board[4096][4096]; static int visit[4096][4096]; static int collision[4096][4096]; static int d[4][2] = { 1, 0, -1, 0, 0, -1, 0, 1 }; static vector vec; static int solution() { int x, y, dir, K, ret = 0; scanf("%d", &N); for (int cnt = 0; cnt < N; cnt++) { scanf("%d %d %d %d", &x, &y, &dir, &K); x += 1000; y += 1000; x *= 2; y *=..
1953. 탈주범 검거 static int N, M, R, C, L; static int board[50][50]; static bool visit[50][50]; static queue q; static int d[4][2] = { -1, 0, //up 1, 0, //down 0, -1, //left 0, 1 //right }; static int types[4][4] = { 1, 2, 4, 7, //위로갈 수 있는 type 1, 2, 5, 6, //아래로 갈 수 있는 type 1, 3, 6, 7, //좌로 갈 수 있는 type 1, 3, 4, 5 //우로 갈 수 있는 type }; static int avail[4][4] = { 1, 2, 5, 6, //위로 갈 때 필요한 type 1, 2, 4, 7, //아래로 갈 때 필..
2112. 보호 필름 static int D, W, K; static int board[13][20]; static int injection[13]; static int cpy[13][20]; static bool check() { memcpy(cpy, board, sizeof(board)); for (int y = 0; y < D; y++) { if (injection[y] == 2) continue; //주입 하려는 성분으로 해당 row를 변경 for (int x = 0; x < W; x++) cpy[y][x] = injection[y]; } for (int x = 0; x < W; x++) { int priv = cpy[0][x], cnt = 1; for (int y = 1; y < D; y++) { if (priv =..
2105. 디저트 카페 static int N; static int board[20][20]; static int d[4][2] = { 1, 1, 1, -1, -1, -1, -1, 1 }; static bool out_of_bound(int y, int x) { if (y = N) return true; if (x = N) return true; return false; } static int travel(int y, int x, int j, int k) { int visit[101], ret = 0; int lens[] = { j, k, j, k }; //d의 방향 순서와 동일하게 memset(visit, 0, sizeof(visit)); for (int dir = 0; dir < 4; d..
2382. 미생물 격리 static int N, M, K; static int board[2][100][100]; //현재, 다음, 방향 static int direction[2][100][100]; static int d[5][2] = { 0, 0, //X -1, 0, //상 1, 0, //하 0, -1, //좌 0, 1 //우 }; static int changed[] = { 0, 2, 1, 4, 3 }; static bool out_of_bound(int y, int x) { if (y = N - 1) return true; if (x = N - 1) return true; return false; } static int solution() { int y, x, n, dir, turn ..
2383. 점심 식사시간 static int N; static int board[10][10]; static int choice[10]; static vector people; static vector stairs; static int ans; static int simulation() { int timer[10], total = people.size(), t; queue q, qq[2]; int state[10]; for (int i = 0; i < people.size(); i++) { int which = choice[i]; int dy = people[i].first - stairs[which].first; int dx = people[i].second - stairs[which].second; timer[i] = abs..
1949. 등산로 조성 //2차원 배열 문제 풀이 시 //항상 d[4][2], visit, out_of_bound()는 정의하고 시작할 것. //out_of_bound -> visit -> ... static int N, K; static int board[8][8]; static int ans; static bool visit[8][8]; static int d[4][2] = { -1, 0, 1, 0, 0, -1, 0, 1 }; static bool out_of_bound(int y, int x) { if (y = N) return true; if (x = N) return true; return false; } static void __solution(int y, int x, int le..
2115. 벌꿀 채취 static int N, M, C; static int board[10][10]; static pair maximum[10]; //row, value static int table[10][10]; static int cmp(const void * p1, const void * p2) { int n1 = (*(pair *)p1).second; int n2 = (*(pair *)p2).second; return n2 - n1; } static void __solution(int * ary, int s, int v, int t, int y, int x) { if (s >= M) { if (t > table[y][x]) table[y][x] = t; if (t > maximum[y].second) maximum..