[백준]/C++

· [백준]/C++
#include #include using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); string a, b; cin >> a >> b; //모두 5로 바꾼게 최솟값 모두 6으로 바꾼게 최대값 for (int i = 0; i < a.length(); i++) { if (a[i] == '6') { a[i] = '5'; } } for (int i = 0; i < a.length(); i++) { if (b[i] == '6') { b[i] = '5'; } } cout
· [백준]/C++
#include #include #include using namespace std; int a[30][30]; int group[30][30]; int dx[] = {0,0,1,-1}; int dy[] = {1,-1,0,0}; int n; int ans[25*25]; void bfs(int x, int y, int cnt) { queue q; q.push(make_pair(x,y)); group[x][y] = cnt; while (!q.empty()) { x = q.front().first; y = q.front().second; q.pop(); for (int k=0; k
경우42
'[백준]/C++' 카테고리의 글 목록 (15 Page)