>
>
[BOJ] 14503번 로봇 청소기
#include #define FASTIO ios::sync_with_stdio(0), cin.tie(0), cout.tie(0)using namespace std;const int MAXN = 55;int n, m, r, c, d, res;int arr[MAXN][MAXN];int dx[] = {-1, 0, 1, 0};int dy[] = {0, 1, 0, -1};bool boundary(int x, int y){ return x >= 0 && x = 0 && y > n >> m >> r >> c >> d; for (int i = 0; i > arr[i][j]; } } while(true){ if(!arr[r][c]){ arr[r]..
[BOJ] 15683번 감시
#include #define FASTIO ios::sync_with_stdio(0), cin.tie(0), cout.tie(0)using namespace std;const int MAXN = 10;int n, m, sz, res = 1e6;int arr[MAXN][MAXN];bool visited[MAXN][MAXN];vector> cctv;int dx[] = {-1, 0, 1, 0}; // int dy[] = {0, 1, 0, -1};void solved(int x, int y, int i){ i %= 4; while(true){ x += dx[i]; y += dy[i]; if (!(x >= 0 && x = 0 && y > n >> m; for (int i = 0..