Spring Boot 프로젝트에 OkHttpClient로 동기와 비동기 방식으로 post요청하는 방법 1. Maven에 Dependency추가 com.squareup.okhttp3 okhttp 3.4.2 2. 동기 요청방법 package com.example.demo; import java.io.File; import java.io.IOException; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import org.junit.jupiter.api.Test; import okhttp3.Call; import okhttp3.Callback; import okhttp3.Dispatcher; import..
가장 높은탑쌓기 #include using namespace std; struct Edge{ int s, h, v; Edge(int a, int b, int c){ s=a; h=b; v=c; } bool operator e.s; } }; int main() { ios_base::sync_with_stdio(false); //freopen("input.txt", "rt", stdin); int n, j, res, v1, v2, v3; cin >> n; vector a; vector dy(n, 0); for(int i=0; i> v1 >> v2 >> v3; a.push_back(Edge(v1, v2, v3)); } sort(a.begin(), a...
최대부분 증가수열 #include using namespace std; //int dy[1001], a[1001]; int main() { ios_base::sync_with_stdio(false); //freopen("input.txt", "rt", stdin); int n, j, res=-2147000000; cin >> n; vector dy(n+1), a(n+1); for(int i=1; i> a[i]; } dy[1]=1; for(int i=2; i
c++에서 map을 사용해 key와 value를 저장해서 key와 value를 출력하는 프로그램을 통해 map사용법을 설명하고자 한다. 알파벳을 key값으로 입력받아 입력된 알파벳 각각의 개수를 구하기 입력값: abcbbbcccaaabd 결과 코드 #include #include #include /* run this program using the console pauser or add your own getch, system("pause") or input loop */ using namespace std; int main() { ios_base::sync_with_stdio(false); ifstream cin; cin.open("input.txt"); map ch; map::iterator it; ..
네임스페이스(namespace)란? 네임스페이스는 소속을 알리는 역할을 한다. 네임스페이스는 변수이름이나 함수이름과 같이 명칭을 사용하는 공간으로 네임스페이스를 통해 소속을 할 수 있다. 아래와 같이 namespace a와 b가 있다고 가정하면 namespace a { void Print(){ } } namespace b { void Print(){ } } a::Print(); 이면 namespace a에 있는 Print가 호출되며 b::Print(); 이면 namespace b에 있는 Print가 호출된다. using namespace std란? 표준 네임스페이스를 사용하겠다는 의미이다. std는 standard의 약자로 c++에서 많이사용되는 cout, cin, endl과 같은 표준입출력함수들이 na..
#include #include #include #include /* run this program using the console pauser or add your own getch, system("pause") or input loop */ using namespace std; int dx[4] = {0, 1, 0, -1}; int dy[4] = {-1, 0, 1, 0}; int k, m, n, res=0, map[1010][1010], ch[1010][1010]; struct Loc { int x, y, dis; Loc(int a, int b, int c){ x = a; y = b; dis = c; } bool operatorbb.y; else return x>bb.x; } else return d..
토마토(BFS) #include #include #include #include /* run this program using the console pauser or add your own getch, system("pause") or input loop */ using namespace std; int dx[4] = {0, 1, 0, -1}; int dy[4] = {-1, 0, 1, 0}; int k, m, n, res=-2147000000, map[1010][1010], dis[1010][1010]; struct Loc { int x; int y; Loc(int a, int b){ x = a; y = b; } }; queue Q; int main() { //freopen("input.txt", "rt..
- Total
- Today
- Yesterday
- 세마포어
- C++
- 소프트웨어
- client side rendering
- C
- 동적프로그래밍
- 이진탐색
- 최단경로
- 운영체제
- 알고리즘
- 배열
- server side rendering
- javascript
- Stack
- 구조체
- react
- 자료구조
- 인접행렬
- 인접리스트
- 입출력장치
- 재귀함수
- 퀵정렬
- 병행프로세스
- 교착상태
- Java
- 스텍
- BFS
- dfs
- 클래스
- stackframe
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |