C++ 7576 토마토
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 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 #include #include #include #include #include using namespace std; int g[502][502] = {}; int chess[502][502] = {}; bool visit[502][502] = {}; int n, m,k; int a, b, c, d; // 오 아 왼 위 int dx[8] = { 2,1,2,1,-2,-1,-2,-..
2023. 2. 18.
C++ 7652 나이트의 이동
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 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 #include #include #include #include #include using namespace std; int g[502][502] = {}; int chess[502][502] = {}; bool visit[502][502] = {}; int n, m,k; int a, b, c, d; // 오 아 왼 위 int dx[8] = { 2,1,2,1,-2,-1,-2,-..
2023. 2. 18.