삼성

알고리즘 문제 풀이/1DP_과제(~180615)

180418_15683_감시

//https://www.acmicpc.net/problem/15683 #include using namespace std; int n, m, tv, mn;int map[8][8];int tvpos[8][3];void input();void dfs(int idx);void update();int main(){ input(); int num=4; if(map[tvpos[0][0]][tvpos[0][1]]==2) num=2; else if(map[tvpos[0][0]][tvpos[0][1]]==5) num=1; mn=64; for(int i=0; i n >> m; for(int i=0; i map[i][j]; if(0

알고리즘 문제 풀이/1DP_과제(~180615)

180417_15685_드래곤커브

//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 ..

알고리즘 문제 풀이/1DP_과제(~180615)

171127_14891_톱니바퀴

//https://www.acmicpc.net/problem/14891 #include using namespace std; int main(){ char gear_input[4][8]; bool gear[4][8]; for(int i=0; i> gear_input[i]; for(int i=0; i> K; while(K-->0) { int rot_gear, dir; cin >> rot_gear >> dir; bool rot_chk[4][2]; for(int i=0; i

bong sue
'삼성' 태그의 글 목록