일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- iles dHyeres
- Replit
- 백준으로 C++ 공부
- 알고리즘
- 대학생
- 프랑스 남부 섬
- C++ 공부하기
- 시뮬레이션
- porquerolles
- 오리스프
- 그린델발트 캠핑장
- 군대
- 피르스트 자전거
- C++
- openai api
- 백준 C++
- 24524
- auto code review
- 백준으로 c++ 공부하기
- 로이커바트
- 융프라우 스위스 패스
- 1654
- 군인
- C++ 공부
- 그린델발트 자전거
- 로이커바트 숙소
- 백준
- 16236 c++
- 군대코딩
- 코딩
- Today
- Total
목록C++ (18)
기억보다는 기록을 해볼까

하.. 한문제 골치 아프게 계속 안풀렸다. 오늘 공부한 백준 : 5430 AC #include #include #include using namespace std; int main() { int T; cin >> T; while(T--) { deque dq; string str; cin >> str; int n; cin >> n; string arr; cin >> arr; bool right = true; bool end = false; for(int i = 0 ; i < arr.size(); i++) { if(arr[i] == '[' || arr[i] == ',' || arr[i] == ']') continue; int num = arr[i] - '0'; while(arr[i + 1] != ',' &&..

오늘 공부한 백준 (1697, 1992, 2178) 2178 미로 탐색 #include #include using namespace std; string map[101]; bool vst[101][101]; int dx[4] = {1, -1, 0, 0}; int dy[4] = {0, 0, 1, -1}; int cnt = 0; void bfs(int n, int m) { queue que; que.push(make_pair(make_pair(0, 0), cnt)); vst[0][0] = true; while (!que.empty()) { int cx = que.front().first.first; int cy = que.front().first.second; cnt = que.front().second; ..

오늘 공부한 백준 18870 미완성, 1260 18870 좌표압출 어렵네 1260 DFS, BFS void dfs(int num) { vst[num] = true; cout

1주일 간의 휴가를 끝내고 다시 공부 모드로 돌입해야겠다 오늘 공부한 백준 (11047, 11279, 11724) 11724 연결요소의 개수 DFS, BFS를 제대로 구현할 줄 알면 간단한 문제이다 문제는 내가 제대로 할 줄을 모르는 것이다. 두고두고 잘 봐야하는 기본 문제이다. #include #include using namespace std; const int MAXN = 1001; bool map[MAXN][MAXN] = {0, }; bool vst[MAXN]; int n, m; int cnt = 0; void dfs(int num) { vst[num] = true; for(int i = 1; i > n >> m; for(int i = 0; i > ..

오늘 공부한 백준 5525 IOIOI #include #include using namespace std; int main() { int n, m; string str; cin >> n >> m; cin >> str; int ans = 0; for(int i = 0; i < m; i++){ int Onum = 0; if(str[i] == 'I'){ while(str[i + 1] == 'O' && str[i + 2] == 'I') { Onum++; if(Onum == n){ Onum--; ans++; } i += 2; } if(Onum != 0){ v.push_back(Onum); } } } cout

오늘 공부한 백준 1012, 1541, 5525 (미완성) 1012 DFS!!!! for(int i = 1; i m) continue; if(vst[ny][nx] == 0 && map[ny][nx] == 1){ vst[ny][nx] = 1; q.push({ny, nx}); } } } } } } 1541 문자열 파싱 for(int i = 0; i < str.size(); i++){ if(str[i] == '-' || str[i] == '+'){ if(minus == true){ sum -= tmp; tmp = 0; } else { sum += tmp; tmp = 0; } if(str[i] == '-'){ minus = true; } } else { tmp *= 10; //previous number tmp..

오늘 공부한 백준 9461, 11399, 11659, 11726, 11727 ㄹㅇ 내가 맞는것 같은데 이게 왜 틀림? 이러면 범위가 더 넓은 자료형으로 바꿔보자

오늘 공부한 백준 2606, 2630, 9095, 9375 2606 바이러스 DFS로 풀었다. 방문 했는지도 확인 해야함 int dfs(int num) { if(arr[num] == UNVISITED){ arr[num] = VISITED; cnt++; for(int i = 0; i < v[num].size(); i++){ int c = v[num][i]; dfs(c); } } return cnt; } 2630 색종이 만들기 void check(int stCol, int stRow, int n) { flag = 0; int stcolor = map[stCol][stRow]; for(int i = stCol; i < stCol + n; i++){ for(int j = stRow; j < stRow + n; ..

오늘 공부한 백준 11723, 1003, 1463, 17626, 2579 다이내믹 프로그래밍 과거에 구한 해를 활용하는 알고리즘 구하는 경로가 고정되어 있는 해를 구할 때 유용 1003 (피보나치 함수) int fibonacci(int n) { dp[n][0] = dp[n-1][0]+dp[n-2][0]; dp[n][1] = dp[n-1][1]+dp[n-2][1]; return 0; } 1463 (1 만들기) //미리 만들어 놓는다 dp[1] = 0; for(int i = 2; i