큐빙
www.acmicpc.net/problem/5373 5373번: 큐빙 각 테스트 케이스에 대해서 큐브를 모두 돌린 후의 윗 면의 색상을 출력한다. 첫 번째 줄에는 뒷 면과 접하는 칸의 색을 출력하고, 두 번째, 세 번째 줄은 순서대로 출력하면 된다. 흰색은 w, 노란 www.acmicpc.net #include #include #include #include using namespace std; enum FACE {U,D,F,B,L,R,SIZE}; // 위,아래,앞,뒤,왼,오 char arr[55]; int cube[SIZE][3][3]; char temp[3][3]; char init[7] = "wyrogb"; // 전개도 그리고 시작하기 /* U 0 1 2 3 4 5 6 7 8 L __________..
드래곤 커브
www.acmicpc.net/problem/15685 15685번: 드래곤 커브 첫째 줄에 드래곤 커브의 개수 N(1 ≤ N ≤ 20)이 주어진다. 둘째 줄부터 N개의 줄에는 드래곤 커브의 정보가 주어진다. 드래곤 커브의 정보는 네 정수 x, y, d, g로 이루어져 있다. x와 y는 드래곤 커 www.acmicpc.net #include #include #include #include using namespace std; int n; int dx[] = {0,-1,0,1}; int dy[] = {1,0,-1,0}; // 0,1,2,3 int sqx[] = {0,1,0,1}; int sqy[] = {0,0,1,1}; bool check[101][101]; int ex, ey; vectordragon; b..