Skip to content

[연로그] 8주차 과제 제출 #245

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

yeon-06
Copy link
Member

@yeon-06 yeon-06 commented Aug 20, 2022

고생하셨습니다!

@yeon-06 yeon-06 added the 자바 label Aug 20, 2022
Copy link
Member

@kth990303 kth990303 left a comment

Choose a reason for hiding this comment

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

연로그 잘 풀어주셨습니다! 간단하게 코멘트 남겨드렸어요~

Comment on lines +26 to +33
int min = Integer.MAX_VALUE;
for (int a : as) {
for (int b : bs) {
for (int c : cs) {
min = Math.min(calculate(a, b, c), min);
}
}
}
Copy link
Member

Choose a reason for hiding this comment

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

원래대로라면 이 풀이는 시간초과가 나야 하는 게 맞습니다!
사진에서 볼 수 있듯이 정해는 JAVA에서 100~300ms 정도가 돼야 해요.
image

반드시 세 사람의 점수를 모두 살펴봐야 할까요? 점수의 최댓값과 최솟값이 각각 특정 사람에게 나타날 것이라 고정해놓고 풀면 O(N^2logN)에 풀 수 있을 것 같아요~

Comment on lines +31 to +34
if (string.startsWith("AH")) {
return isSlump(string.substring(2));
}
return false;
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
if (string.startsWith("AH")) {
return isSlump(string.substring(2));
}
return false;
return string(startsWith("AH") && isSlump(string.substring(2));

java에서 lastIndexOf, startsWith 문법 새롭게 알고 갑니다 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants