일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- STUDYENGLISH
- 코테 대비
- SQL
- 코테 준비
- 코딩테스트
- 원서
- the midnight library
- 쉬운 알고리즘 문제
- 알고리즘
- 완전탐색
- sw expert academy
- 백준
- swexpertacademy
- PyQt
- English
- 원서읽기
- BFS
- 알고리즘 문제
- D4
- MySQL
- 삼성
- dfs
- englishbook
- 직무면접
- 코테
- sw expert
- 프로그래머스
- nightroutine
- readingbook
- 원서읽자
- Today
- Total
목록알고리즘 (77)
시나브로
#include using namespace std; int map[110][110]; int main() { freopen("inp.inp", "r", stdin); freopen("out.out", "w", stdout); int n, l; cin >> n >> l; for (int i = 0; i > map[i][j]; } } int answer = 0; for (int i = 0; i < n; i++) { int high = map[i][0]; int sig = 1; int check[110] = { 0 }; for (int j = 1; j < n; j++) { if (high == map[i][j]) contin..
#include #include using namespace std; typedef struct y { int i; int j; }; int map[110][110] = { 0 }; int list[110][2]; int head[2] = {1,1}; int tail[2] = {1,1}; int d = 1; int dx[] = { -1,0,1,0 }; int dy[] = { 0,1,0,-1 }; int main() { freopen("inp.inp", "r", stdin); freopen("out.out", "w", stdout); int n = 0; cin >> n; int apple; cin >> apple; for (int i = 0; i > ..
#include using namespace std; int check[6] = { 0 }; //돌려야되는 것을 체크 int wheel[6][10] = { 0 }; void right(int i) { // 오른쪽에 돌려야 되는 것이 있는 지 확인한다. if (i ==5) return; if (wheel[i - 1][2] != wheel[i][6]) { if (check[i - 1] == -1) check[i] = 1; else check[i] = -1; right(i + 1); } } void left(int i) { // 왼쪽에 돌려야되는 것이 잇는 지 확인한다. if (i == 0) return; if (wheel[i + 1][6] != wheel[i][2]) { if (check[i + 1] == ..
전체탐색하면 쉽게 풀리는 문제였지만, 저는 10번정도 틀렸다는.... ㅠㅜ 논리상 문제는 없어보이는데 왜 이렇게 되나 찾아보니 max와 min값의 초기값이 10억과 -10억으로 setting을 해야됩니다. 2퍼 정도에서 계속 틀리다면 꼭!!! max와 min값의 초기값을 수정하시길!!!! #include #include #include #include #include #include #define MAX 100000000000000; using namespace std; vector number_list; long long maxs = -MAX; long long mins = MAX; void dfs(vector operate, int point, long long sum) { if (point == n..