백준
-
백준 17070번 C++ 풀이백준 2019. 8. 30. 13:55
https://www.acmicpc.net/problem/17070 // // main.cpp // ps // // Created by MOZZET PC on 22/07/2019. // Copyright © 2019 Noondate. All rights reserved. // #include #include #include #include #include #include #include #include using namespace std; int n; int buffer[17][17]; int answer = 0; bool is_range(int x, int y) { return (0 n; for (auto x = 0; x < n; x++) { for (auto y = 0; y> buffer[x][y];..
-
백준 11559번 C++ 코드백준 2019. 8. 29. 22:43
#include #include #include #include #include #include #include #include #include #include #include using namespace std; char buffer[6][12]; bool is_visited[6][12]; int xxxx[4] = {0 , 0, -1, 1}; int yyyy[4] = {1, -1, 0, 0}; bool is_chain(int x, int y) { if (is_visited[x][y]) { return false; } if (buffer[x][y] == '.') { return false; } is_visited[x][y] = true; int chain = 1; auto color = buffer[x]..
-
백준 2799번 C++ 풀이백준 2019. 1. 4. 08:16
#include #include #include #include using namespace std; char buffer[501][501]; int blind[5]; int main(){ cin.tie(NULL); ios::sync_with_stdio(false); int m, n; cin >> m >> n; for (auto y=0; y< 5*m + 1 ; y++){ for (auto x=0; x< 5*n+1; x++){ cin >> buffer[x][y]; } } for (auto y=0; y
-
백준 2468번 C++ 풀이백준 2018. 11. 25. 23:29
#include #include #include using namespace std; int delta[4][2] = {{1, 0}, {-1, 0}, {0, 1}, {0, -1}}; bool isVisited[101][101]; int buffer[101][101]; int main() { cin.tie(NULL); ios::sync_with_stdio(false); int n; cin >> n; for (auto i=0; i buffer[i][j]; } } int answer = 0; for (auto height = 0; height
-
백준 1707번 C++ 풀이백준 2018. 11. 25. 18:29
#include #include #include using namespace std; int isVisited[20001]; vector buffer[20001]; int main() { cin.tie(NULL); ios::sync_with_stdio(false); int t; cin >> t; for (auto z=0; z> v >> e; for (auto i = 1; i to >> from; buffer[to].push_back(from); buffer[from].push_back(to); } bool isBipartite = true; for (auto i=1; i
-
백준 14502번 C++ 풀이백준 2018. 11. 20. 20:38
문제가 요상하게 틀려서 브레이크포인트 고치면서 디버깅했습니다.하지만 브레이크포인트로는 힙의 밸류를 찍어주지 않더군요. LLDB에서 직접 확인해서 디버깅했습니다. #include #include #include #include #include #include using namespace std; int n, m; int buffer[9][9]; int temp[9][9]; int delta[4][2] = {{1, 0}, {-1, 0}, {0, 1}, {0, -1}}; int maxVirus; int findVirus(){ for (auto y=0; y