일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- BFS
- 기술면접
- msSQL
- Docker
- 매개변수탐색
- 백준
- compose
- boj #19237 #어른 상어
- 연결요소
- 이분탐색
- dfs
- OFFSET
- @P0
- 소프티어
- 백트래킹
- 처우협의
- upper_bound
- 경력
- 처우산정
- 6987
- softeer
- 성적평가
- 13908
- 파라메트릭
- incr
- 퇴사통보
- BOJ
- Kafka
- 오퍼레터
- 물채우기
- Today
- Total
목록전체 글 (633)
기술 블로그
https://www.acmicpc.net/problem/17218 41, 42, 43, 45, 46, 47번 째 줄 순서 중요하다. 41 ~ 43 : 41, 42 두 경우 모두 아닌 경우에만 43이 실행되어야 한다. 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465#include using namespace std; int lcs[44][44] = { 0, }; string str1, str2; int main(void){ string input1, input2; cin >> input1 >> input2; str1 = '0' + inp..
https://www.acmicpc.net/problem/9251 41, 42, 43, 45, 46, 47번 째 줄 순서 중요하다. 41 ~ 43 : 41, 42 두 경우 모두 아닌 경우에만 43이 실행되어야 한다. 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354#include using namespace std; int lcs[1010][1010] = { 0, }; string str1, str2; int main(void){ string input1, input2; cin >> input1 >> input2; str1 = '0' + input1; str2 = '0' + i..
http://www.cplusplus.com/reference/algorithm/search/ a 벡터와 b 벡터가 있으면, a 벡터 안에서 b 벡터가 있는지의 확인할 수 있다. (시작 인덱스 반환 가능) a 벡터에 없는 원소가 b 벡터에 있으면 실패. 따라서, a 벡터가 더 길어야 한다. 123456789101112131415161718192021#include using namespace std; int main(void){ vector v = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 }; vector c = { 12, 23, 43, 5, 6, 7, 12 }; vector d = { 7, 8, 9 }; auto itr1 = search(v.begin(), v.end(), c.begin..
http://www.cplusplus.com/reference/algorithm/count/ count() : 배열, 벡터 등 원하는 값(원소)의 개수를 찾아줌. string, char, int 모두 가능하다. count_if() : 조건에 맞는 배열, 벡터 등 원하는 값(원소)의 개수를 찾아줌. string, char, int 모두 가능하다. count(시작점, 끝점, 찾을 값); count_if(시작점, 끝점, bool 함수); 1234567891011121314151617181920212223#include using namespace std; bool isEven(int i){ return (i % 2 == 0 );} int main(void){ vector v = { 1, 2, 3, 4, 5, ..
http://www.cplusplus.com/reference/algorithm/equal/ equal(a 시작점, a 끝점, b 시작점) 참고로, b의 길이가 더 짧은 경우 오류난다. a의 원소들이 b에 모두 포함되어 있어도, true 반환.(즉, b가 더 길어도 true일 수도 있다.) 배열 같은 경우에는equal(arr1, arr1 + 5, arr2) 이런 식으로 사용하면 된다 1234567891011121314151617181920212223242526272829303132#include using namespace std; int main(void){ vector v = { 1, 2, 3, 4, 5 }; vector c = { 1, 2, 3, 4, 5 }; vector n = { 1, 2, 3,..
https://www.acmicpc.net/problem/16932 지난 번 코드 : https://hsdevelopment.tistory.com/265 다시 풀어보았다. 이번에는 map으로 풀어보았다. 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384#include using namespace std; bool visit[1001][1001] = { false, }; int N = 0, M = 0, g[1001 * 1001] = { 0, }, Map[1001][1001]..
https://programmers.co.kr/learn/courses/30/lessons/49994 단순 구현 문제이다. 방문 여부 배열(visit)이 4차원 배열인 것만 확인하면 된다. 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152#include using namespace std; bool visit[12][12][12][12] = { false, }; int solution(string dirs){ int answer = 0, sy = 5, sx = 5, ey = 5, ex = 5; for (auto i : dirs) { sy = ey; sx = ex; if (i == 'U..
https://programmers.co.kr/learn/courses/30/lessons/49993 C++ STL인 find()와 is_sorted()의 개념만 알고있으면, 매우 쉽게 풀 수 있다. 12345678910111213141516171819#include using namespace std; int solution(string skill, vector skill_trees){ int answer = 0; for (auto i : skill_trees) { vector v; for (auto j : skill) v.push_back(find(i.begin(), i.end(), j) - i.begin()); if (is_sorted(v.begin(), v.end())) ++answer; } re..