'알고리즘 모음집/알고리즘 (Algorithm)' 카테고리의 글 목록 (2 Page)
1258 행렬찾기
#include #include #include #include #include using namespace std; #define NS 102 int map[NS][NS]; int chk[NS][NS]; int N; int ret; int dy[] = { 0,1,0,-1 }; int dx[] = { 1,0,-1,0 }; struct Data { int size, y, x; }; bool cmp(Data a, Data b) { if (a.size == b.size)return a.y < b.y; else return a.size < b.size; } vectorv; struct Matrix { Matrix() { int T; scanf("%d", &T); for (int t = 1; t
2020. 2. 27.
[모의 SW 역량테스트] 원자 소멸 시뮬레이션
#include #include #include #include using namespace std; int ret; int dy[] = { 1,-1,0,0 }; int dx[] = { 0,0,-1,1 }; struct Data { int y, x, dir, k; }; bool cmp(Data a, Data b) { if (a.y == b.y)return a.x 2000 || v[idx].x 2000)return true; else return false; } void move() { for (int ..
2019. 12. 20.