출처 : https://www.swexpertacademy.com/main/code/problem/problemDetail.do?contestProbId=AV14geLqABQCFAYD #include #include #include using namespace std; int N,result;int a[100], b[100]; void dfs(int now){if (a[now] == 99 || b[now] == 99) { result = 1; return; }else{if(a[now]!=-1)dfs(a[now]);if (b[now] != -1)dfs(b[now]);}} int main(){int T; int t;T = 10;while (T--){cin >> t >> N; result = 0; fill(a..
출처 : https://www.swexpertacademy.com/main/code/problem/problemDetail.do?contestProbId=AV14eWb6AAkCFAYD #include #include #include using namespace std; int N,result;int check[4]; int main(){int T; int t=1;T = 10;while (T--){cin >> N; result = 1;fill(check, check + 4, 0);for (int i = 0; i > c;if (c == '(') check[0] += 1;else if (c == ')') check[0] -= 1;else if (c == '[') che..
출처 : https://www.swexpertacademy.com/main/code/problem/problemDetail.do?contestProbId=AV14dUIaAAUCFAYD& #include #include #include using namespace std; int a, b; int cal(int now){if (now == 1)return a;return (a * cal(now - 1));} int main(){int T; int t;T = 10;while (T--){cin >> t;cin >> a >> b; cout
출처 : https://www.swexpertacademy.com/main/code/problem/problemDetail.do?contestProbId=AV14Rq5aABUCFAYi #include #include #include using namespace std; int result, N;char arr[100][100]; void cal(int i, int sj, int ej, int l){int zz = 1; int ll = l;if (arr[i][sj] == arr[i][ej]){while (1){if (arr[i][sj + zz] != arr[i][ej - zz]) break; if (ll < 4){result = max(result,l); break;}ll -= 2; zz++;}}int z..
출처 : https://www.swexpertacademy.com/main/code/problem/problemDetail.do?contestProbId=AV14QpAaAAwCFAYi #include #include #include using namespace std; int result, N;char arr[8][8]; int main(){int T; int t=1;T = 10;while (T--){cin >> N; result = 0;for (int i = 0; i > arr[i][j];}} for (int i = 0; i < 8; i++){for (int j = 0; j < 8; j++){if (i == 1 && j == ..
출처 : https://www.swexpertacademy.com/main/code/problem/problemDetail.do?contestProbId=AV14P0c6AAUCFAYi #include #include #include #include using namespace std; int result;string a, b; int main(){int T; int t;T = 10;while (T--){cin >> t; result = 0;cin >> b >> a;for (int i = 0; i < a.length()-(b.length()-1); i++){if (a.at(i) == b.at(0)){int nexta = i + 1; int nextb = 1;for (int k = 1; k < b.lengt..
출처 : https://www.swexpertacademy.com/main/code/problem/problemDetail.do?contestProbId=AV14BgD6AEECFAYh #include #include #include using namespace std; int result,r;int arr[100][102], a, b;bool visited[100][102]; void cal(int ii, int jj,int cnt){if (ii == 0){if (result >= cnt) { result = cnt; r = jj - 1; }return;}visited[ii][jj] = true; cnt++;if (arr[ii][jj + 1] && !visited[ii][jj+1]) cal(ii, jj ..
출처 : https://www.swexpertacademy.com/main/code/problem/problemDetail.do?contestProbId=AV14ABYKADACFAYh #include #include #include using namespace std; int result;int arr[100][102], a, b;bool visited[100][102]; void cal(int ii, int jj){if (ii == 0){result = jj - 1;return;}visited[ii][jj] = true;if (arr[ii][jj + 1] && !visited[ii][jj+1]) cal(ii, jj + 1);else if (arr[ii][jj - 1] && !visited[ii][jj ..
출처 : https://www.swexpertacademy.com/main/code/problem/problemDetail.do?contestProbId=AV13_BWKACUCFAYh #include #include #include using namespace std; int result;int arr[101][101], a, b; int main(){int T; int t;T = 10;while (T--){cin >> t; result = 0; memset(arr, 0, sizeof(arr)); a = 0; b = 0;for (int i = 0; i > arr[i][j];if (i == j) a += arr[i][j];..
출처 : https://www.swexpertacademy.com/main/code/problem/problemDetail.do?contestProbId=AV13zo1KAAACFAYh #include #include #include using namespace std; int result, a, z;int arr[101]; int main(){int T; int t;cin >> T;while (T--){cin >> t; result = 0; memset(arr, 0, sizeof(arr)); int n = 1000; z = -1;while (n--){cin >> a;arr[a]++;if (result
- Total
- Today
- Yesterday
- 팁
- 트렌드
- scanf
- 17837
- 시간 복잡도
- 백준
- STL
- 17140
- string
- DFS
- 17779
- 역량 테스트
- SWEA
- 17143
- 미세먼지 안녕!
- boj
- 삼성
- 2018 카카오 블라인드 채용
- hackerrank
- 입출력
- DP
- 이차원 배열과 연산
- 17144
- 17142
- 2018 KAKAO BLIND RECRUITMENT
- 게리맨더링 2
- 연구소 3
- SW Expert Academy
- 새로운 게임 2
- 알고리즘
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |