일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- terminal
- gitflow-shFlags
- VARCHAR (1)
- PytestPluginManager
- 코루틴 빌더
- python
- 개성국밥
- git flow init
- vfr video
- JanusWebRTCGateway
- RouteLocator
- 겨울 부산
- 코루틴 컨텍스트
- addhooks
- pytest
- Spring Batch
- Spring Cloud Gateway
- table not found
- ErrorResponse
- git flow feature start
- JanusWebRTCServer
- kotlin
- PersistenceContext
- Value too long for column
- 깡돼후
- JanusGateway
- JanusWebRTC
- 수제 밀크티
- 달인막창
- mp4fpsmod
목록Algorithm (189)
너와 나의 스토리
문제: https://programmers.co.kr/learn/courses/30/lessons/17676?language=java = 시작 시간[j] i+1
문제: https://programmers.co.kr/learn/courses/30/lessons/60057?language=java 문제 풀이: 변수 len: S의 길이 subLen: 압축 단위(길이) count: 현재 문자열이 중복된 개수 (앞의 substring과 얼마나 중복되었는가) subLen은 최대 len/2이다. 1부터 len/2까지 1씩 늘려가며 최적의 압축 단위를 찾는다. 1. 현재 위치에서 직전 subString(pre)과 현재 subString(cur)을 비교한다. 즉, 현재 위치를 idx라고 할 때 다음과 같다. String pre = s.substring(idx - subLen * 2 + 1, idx - subLen + 1); // 직전 sub string String cur = ..
문제: https://programmers.co.kr/learn/courses/30/lessons/72410 문제 풀이: 그냥 시키는 대로 하면 끝.. 소스 코드: import java.util.Locale; class Solution { public String solution(String new_id) { String answer = ""; answer = step1(new_id); answer = step2(answer); answer = step3(answer); answer = step4(answer); answer = step5(answer); answer = step6(answer); answer = step7(answer); return answer; } public String step1..
문제: https://programmers.co.kr/learn/courses/30/lessons/92334?language=java 문제 풀이: report는 쌍이 리스트로 존재하는 형태이다 이를 for 문으로 돌면서 각각 reporter와, respondent로 파싱하고 신고자가 전에 이 피신고자를 신고한 적 있는지 확인하고, 아직 신고한 적 없으면 다음 과정을 수행한다. reports()에 피신고자를 삽입한다. reports[신고자].put(피신고자) 피신고자가 현재 몇 번 신고 당했는지 count한다. count[피신고자]++ 사용자를 for 문으로 돌면서 사용자가 신고한 사람 리스트를 본다. 피신고자의 카운트가 k 이상이면 answer[신고자 index]++ 해준다. 소스 코드: import j..
문제: www.acmicpc.net/problem/20310 문제 풀이: 0은 문자열 뒤부터 지워주고 1은 문자열 앞부터 지워준다 끝! 소스 코드: #include #include #include #include #include #include #include #include using namespace std; string input, answer; int zero, one, removeZero, removeOne; bool removeNum[502]; int main() { ios::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); cin >> input; int len = input.size(); for (int i = 0; i < len; i++) ..
문제: www.acmicpc.net/problem/20309 문제 풀이: 세 개씩 뒤집다 보니 양끝 값만 swap 된다. 이때, 양 끝 값은 둘 다 짝수 자리 or 둘 다 홀수 자리가 된다. 즉, 짝수 위치에 짝수가 있고, 홀수 위치에 홀수가 있다면 오름차순으로 정렬할 수 있다. 소스 코드: #include #include #include #include #include #include #include using namespace std; int n; int main() { ios::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); cin >> n; bool flag = true; for (int i = 1; i > a; if (i % 2) { if (a ..
문제: www.acmicpc.net/problem/11758 문제 풀이: 외적을 이용하자 이렇게 구해지는 cross product(외적) 값이 [양수 or 음수 or 0]인지에 따라 두 벡터의 상대적인 방향을 확인할 수 있다. 다음과 같이 시계 방향인 것을 CW, 반 시계 방향인 것을 CCW라고 한다. 외적 값이 음수인 경우 CW, 양수인 경우 CCW, 0인 경우 일직선(두 선분이 겹쳐서 일직선을 그림)임을 알 수 있다. 소스 코드: #include #include #include #include #include #include using namespace std; typedef pair P; vector points; int op(int a, int b){ return points[a].first*po..
문제: www.acmicpc.net/problem/20205 소스 코드: #include #include #include #include #include #include using namespace std; int n,k; bool arr[11][11],answer[101][101]; void checkPixel(int curX, int curY, bool pixel){ for(int i=curX;ik; for(int i=0;iarr[i][j]; } } extendPixel(); for(int i=0;i