//https://www.acmicpc.net/problem/15685 #include #include using namespace std; #define right 0#define up 1#define left 2#define down 3 int dy[4]={0,-1, 0, 1};int dx[4]={1, 0,-1, 0}; bool map[101][101]; int main(){ int N; cin >> N; int cnt=0; for(int i=0; i> x >> y >> d >>g; map[y][x]=1; map[y+dy[d]][x+dx[d]]=1; vector st; st.push_back(d); st.push_back(d); int tmpy=y+dy[d]; int tmpx=x+dx[d]; int ..
//https://www.acmicpc.net/problem/2098 #include #define MAX 17000000using namespace std; int w[16][16];int dp[1N; for(int i=0; iw[i][j]; int ans = solve(0,0); cout
#include #include using namespace std; #define MAXN 11#define MAXT 144 struct pos{ int y, x; pos() {} pos(int y, int x) : y(y), x(x) {}}; int N, M, S;int map[11][11];int match[11];int ans; pos man[11];pos stair[2]; int dist(int man_idx, int stair_idx){ int dx=abs(man[man_idx].x-stair[stair_idx].x); int dy=abs(man[man_idx].y-stair[stair_idx].y); return dx + dy;} void dfs(int idx);void update(); i..