백준 알고리즘/시뮬레이션43 백준 14499번 C++ #include#include using namespace std; const int MAX = 21;int n, m, x, y, k;int arr[MAX][MAX];int cmd[1001]; int dicenum[6];int dicecopy[6]; void dicemove(int i) {for (int i = 0; i < 6; i++) {dicecopy[i] = dicenum[i];}switch (cmd[i]) {case 1:dicenum[1] = dicecopy[5];dicenum[2] = dicecopy[1];dicenum[3] = dicecopy[2];dicenum[5] = dicecopy[3]; break;case 2:dicenum[1] = dicecopy[2];dicenum[2] = dicec.. 2019. 1. 27. 백준 14503번 C++ #includeusing namespace std; const int MAX = 51;int n, m;pair currentpos;int way[MAX][MAX]; typedef struct {int x, y;}Move;Move mv[4] = { {-1,0}, {0,1}, {1,0}, {0,-1} }; int calclean() {int ans = 0; while (true) {if (way[currentpos.first.first][currentpos.first.second] == 0) {ans++;way[currentpos.first.first][currentpos.first.second] = 2;} int flag = 0;for (int i = 0; i < 4; i++) {currentpos.sec.. 2019. 1. 26. 백준 1547 파이썬 location=[0,1,0,0]num = int(input())for i in range(num): a,b = map(int, input().split(" ")) if location[a] == 1 or location[b] == 1: temp = location[a] location[a] = location[b] location[b] = tempprint(location.index(1)) 2018. 11. 13. 백준 10219 파이썬 count = int(input())for j in range(count): h,w = map(int, input().split()) for i in range(h): a = input() b=w-1 while b>=0: print(a[b],end="") b=b-1 print() 2018. 11. 12. 이전 1 ··· 5 6 7 8 9 10 11 다음