Skip to content

[2주차] 이혜원 #20

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Sep 21, 2024
Merged

Conversation

icegosimperson
Copy link
Contributor

@icegosimperson icegosimperson commented Sep 16, 2024

📗 월요일

[CT] 예술성 : 구현

📗 화요일

[BOJ] 1647_도시 분할 계획 : MST

[PG] 흉부외과 또는 일반외과 의사 목록 출력하기

📗 수요일

[BOJ] 2613_줄세우기 : LIS

📗 목요일(_240919)

[PG] 42584 주식가격

[PG] 42626 더 맵게

[SQL]

📗 금요일(_240920)

[PG] 12913 땅따먹기_240920 : DP

[PG] 43163 단어 변환_240920 : BFS

if(queue.size() ==1 ) return -1;
queue.add(queue.poll() + queue.poll() *2);
answer++;
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

while문에서 큐 사이즈에 대한 조건문 제어로 더 깔끔한 풀인 것 같습니다 👍


visited = new boolean[n][n];
group = new int[n][n];
groupCnt = new int[n * n + 1];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

배열로 미리 만들어질 수 있는 그룹에 대해 초기화해서 깔끔한 것 같아요!!

}

public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

엇 위의 HW_1647풀이 처럼, 입력받을때 BufferedReader와 StringTokenizer를 사용하면 더 효율적으로 입력받을 수 있을것 같습니다!

max = Math.max(max, land[i-1][k]);
}
}
land[i][j] += max;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

최댓값을 미리 계산해놓고 더하는 방식이 직관적이라 보기 좋은 것 같아요👍🏻

Comment on lines +4 to +9
for(int i=0; i<prices.length; i++){
for(int j=i+1; j<prices.length; j++){
answer[i]++;
if(prices[i] > prices[j]) break;
}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

완전 탐색으로도.. 풀리는 문제였군요...🫥

@icegosimperson icegosimperson merged commit 6736852 into GreatAlgorithm-Study:main Sep 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants