일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- PyQt
- 프로그래머스
- 코테
- 원서읽자
- sw expert
- 원서
- 쉬운 알고리즘 문제
- D4
- 원서읽기
- 코테 준비
- MySQL
- SQL
- 알고리즘
- swexpertacademy
- nightroutine
- STUDYENGLISH
- 직무면접
- English
- 코테 대비
- 백준
- BFS
- 삼성
- 완전탐색
- sw expert academy
- englishbook
- 코딩테스트
- readingbook
- 알고리즘 문제
- dfs
- the midnight library
- Today
- Total
목록알고리즘 문제 (57)
시나브로
#include #include using namespace std; vector solution(vector progresses, vector speeds) { vector answer; int list[110]={0}; for(int i=0;ii){ i++; count++; } answer.push_back(count); } return answer; } https://programmers.co.kr/learn/courses/30/lessons/42586 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr
#include #include #include using namespace std; int solution(int bridge_length, int weight, vector truck_weights) { int answer = 0; int time=0; int pass_point=0; int in_point=0; int box=truck_weights.size(); vectorlist; int rest_time=weight; while(1){ if(truck_weights.size()
#include #include using namespace std; vector solution(vector heights) { int box=heights.size(); vector answer(box, 0); vector list; for (int i = heights.size()-1; i >= 0; i--) { if (list.size() != 0) { while (1) { if (list.size() != 0) { if (heights[i] > heights[list.back()]) { answer[list.back()] = i + 1; list.pop_back(); } else break; } else break; } } list.push_back(i); } return answer; } ht..
정렬을 한 이후, 최소값(start_point)과 m보다 작은 최댓값(end_point) 2개를 가지고 두개의 합이 m보다 클 경우, end_point를 옮겨서 두 개의 합을 줄이도록 하였다. 두개의 합이 m보다 작을 경우, start_point를 옮겨서 두개의 합을 크게하도록하엿다. #include #include #include using namespace std; int main(void) { freopen("inp.inp", "r", stdin); freopen("out.out", "w", stdout); int tc = 0; cin >> tc; for (int q = 0; q > n >> m; int start_point =..