일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- 운영체제
- C#
- OS
- 에러핸들링
- Spring
- 제프리리처
- Operating System.
- Operating System
- 스프링 입문
- 열혈 TCP/IP 소켓 프로그래밍
- 우아한 테크 세미나
- 스프링 핵심 원리
- 토마토
- Window-Via-c/c++
- C++
- HTTP
- 우아한레디스
- 윤성우 저자
- 이펙티브코틀린
- 열혈 tcp/ip 프로그래밍
- FIFO paging
- 10026번
- redis
- n타일링2
- inflearn
- Four Squares
- BOJ
- 2475번
- TCP/IP
- 김영한
- Today
- Total
목록알고리즘 (112)
나의 브을로오그으

https://www.acmicpc.net/problem/10026 10026번: 적록색약 적록색약은 빨간색과 초록색의 차이를 거의 느끼지 못한다. 따라서, 적록색약인 사람이 보는 그림은 아닌 사람이 보는 그림과는 좀 다를 수 있다. 크기가 N×N인 그리드의 각 칸에 R(빨강), G(초록) www.acmicpc.net #include #include #include using namespace std; #define MAX_SIZE100 bool IsValidate(char ch, char picture, bool isNormal) { if (isNormal == true || picture == 'B') { return ch == picture; } else { return ch == 'R' || ch..

https://www.acmicpc.net/problem/9019 9019번: DSLR 네 개의 명령어 D, S, L, R 을 이용하는 간단한 계산기가 있다. 이 계산기에는 레지스터가 하나 있는데, 이 레지스터에는 0 이상 10,000 미만의 십진수를 저장할 수 있다. 각 명령어는 이 레지스터에 www.acmicpc.net #include #include #include using namespace std; string Progress(int n, int ans) { bool visited[10000] = { false, }; queue q; q.emplace(n, ""); visited[n] = true; while (q.empty() == false) { int cur = q.front().first..

https://www.acmicpc.net/problem/7662 7662번: 이중 우선순위 큐 입력 데이터는 표준입력을 사용한다. 입력은 T개의 테스트 데이터로 구성된다. 입력의 첫 번째 줄에는 입력 데이터의 수를 나타내는 정수 T가 주어진다. 각 테스트 데이터의 첫째 줄에는 Q에 적 www.acmicpc.net #include #include #include using namespace std; #define MAX_SIZE1'000'000 #define DELETE_MIN_INSTRUCTION-1 #define DELETE_MAX_INSTRUCTION1 void SyncPriorityMinQ( bool* invalid, priority_queue& minQ ) { while (minQ.empty()..

https://www.acmicpc.net/problem/7576 7576번: 토마토 첫 줄에는 상자의 크기를 나타내는 두 정수 M,N이 주어진다. M은 상자의 가로 칸의 수, N은 상자의 세로 칸의 수를 나타낸다. 단, 2 ≤ M,N ≤ 1,000 이다. 둘째 줄부터는 하나의 상자에 저장된 토마토 www.acmicpc.net #include #include #include using namespace std; #define RIPE1 #define NOT_RIPE0 #define NOTHING-1 struct Point { int m; int n; }; void RipeTomato(vector& tomatoBox, queue& ripeQ, int M, int N) { Point pt = ripeQ.fr..

https://www.acmicpc.net/problem/7569 7569번: 토마토 첫 줄에는 상자의 크기를 나타내는 두 정수 M,N과 쌓아올려지는 상자의 수를 나타내는 H가 주어진다. M은 상자의 가로 칸의 수, N은 상자의 세로 칸의 수를 나타낸다. 단, 2 ≤ M ≤ 100, 2 ≤ N ≤ 100, www.acmicpc.net #include #include using namespace std; #define RIPE1 #define NOT_RIPE0 #define NEVER_RIPE-1 int tomatoBox[101][101][101] = { 0, }; int M, N, H; struct Point3 { int m; int n; int h; }; bool IsNotRipeTomato() { f..

https://www.acmicpc.net/problem/18870 18870번: 좌표 압축 수직선 위에 N개의 좌표 X1, X2, ..., XN이 있다. 이 좌표에 좌표 압축을 적용하려고 한다. Xi를 좌표 압축한 결과 X'i의 값은 Xi > Xj를 만족하는 서로 다른 좌표의 개수와 같아야 한다. X1, X2, ..., XN에 좌 www.acmicpc.net #include #include #include using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(NULL); vector v, back; int N, input; cin >> N; v.reserve(1'000'000); back.reserve(1'000'000); for..

https://www.acmicpc.net/problem/17626 17626번: Four Squares 라그랑주는 1770년에 모든 자연수는 넷 혹은 그 이하의 제곱수의 합으로 표현할 수 있다고 증명하였다. 어떤 자연수는 복수의 방법으로 표현된다. 예를 들면, 26은 52과 12의 합이다; 또한 42 + 32 + 1 www.acmicpc.net #include using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(NULL); int dp[50001] = { 0, }; int n, j, cnt = 0; cin >> n; dp[0] = 0; dp[1] = 1; for (int i = 2; i

https://www.acmicpc.net/problem/11727 11727번: 2×n 타일링 2 2×n 직사각형을 1×2, 2×1과 2×2 타일로 채우는 방법의 수를 구하는 프로그램을 작성하시오. 아래 그림은 2×17 직사각형을 채운 한가지 예이다. www.acmicpc.net #include using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(NULL); int arrTile[1001] = { 0, }; arrTile[1] = 1; int n = 0; cin >> n; for (int i = 2; i

https://www.acmicpc.net/problem/11726 11726번: 2×n 타일링 2×n 크기의 직사각형을 1×2, 2×1 타일로 채우는 방법의 수를 구하는 프로그램을 작성하시오. 아래 그림은 2×5 크기의 직사각형을 채운 한 가지 방법의 예이다. www.acmicpc.net #include using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(NULL); int tiles[1001] = { 0, }; int N = 0; tiles[1] = 1; tiles[2] = 2; cin >> N; for (int i = 3; i

https://www.acmicpc.net/problem/11724 11724번: 연결 요소의 개수 첫째 줄에 정점의 개수 N과 간선의 개수 M이 주어진다. (1 ≤ N ≤ 1,000, 0 ≤ M ≤ N×(N-1)/2) 둘째 줄부터 M개의 줄에 간선의 양 끝점 u와 v가 주어진다. (1 ≤ u, v ≤ N, u ≠ v) 같은 간선은 한 번만 주 www.acmicpc.net #include #include using namespace std; void PassComponents(int from, int N, bool vertex[1001], bool edge[][1001]); int main() { ios::sync_with_stdio(false); cin.tie(NULL); bool edge[1001][..