-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
50 lines (45 loc) · 1.12 KB
/
Copy pathmain.cpp
File metadata and controls
50 lines (45 loc) · 1.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#include <iostream>
#include <vector>
using namespace std;
typedef struct _Point{
int r, c;
int dir; // 0 1 2 3
int type; // 1 2 3 4 5
}Point;
int N, M, map[8][8], cnt_zero, ans;
vector<Point> cctvs; // 각 cctv 의 위치와 방향 정보 담음
/*
1. As if I get maximum ranges from every single cams, I think it'd work;
2. 모든 cctv 상태를 param 넘김
*/
// 1. 번 방법
void solve_1() {
// 1-1. 맵 복사
int tmap[8][8];
for(int i=0; i<N; i++) {
for(int j=0; j<M; j++) {
tmap[i][j] = map[i][j];
}
}
for(int i=0; i<cctvs.size(); i++) {
if(cctvs[i].type != 5) {
for(int d=0; d<4; d++) {
// 각 방향 별, # 치는 갯수 최댓값 구함
}
}
}
}
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cin >> N >> M;
for(int i=0; i<N; i++) {
for(int j=0; j<M; j++) {
cin >> map[i][j];
if(map[i][j] != 0 && map[i][j] < 6){
cctvs.push_back({i,j,0,map[i][j]});
}
}
}
return 0;
}