Skip to content

난 쓰레기야 - #97

Open
protectHeo wants to merge 3 commits into
Study-Till-Death:protectHeofrom
protectHeo:protectHeoFeat
Open

protectHeo wants to merge 3 commits into
Study-Till-Death:protectHeofrom
protectHeo:protectHeoFeat

Conversation

@protectHeo

Copy link
Copy Markdown
Collaborator

No description provided.

@DGJSKIM
DGJSKIM requested review from DGJSKIM and anjungin April 27, 2025 23:14
@github-actions

Copy link
Copy Markdown

@anjungin 님, @DGJSKIM 님 숭고한 랜덤 리뷰어로 당첨되셨습니다! 리뷰를 부탁드립니다. 🙏

@DGJSKIM DGJSKIM left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

잘보감✨

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

저도 일케 풀었는데
낄끔합니다

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

이 친구도 저랑 풀이가 비슷해서 크게 어쩌구는 없습니다

Comment on lines +50 to +56
@Override
public int compareTo(Location o) {
return o.moved - moved;
}
}

public static void main(String[] args){

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

뭐 답이 안나온다 하셨지 않았나요 몇번인지 적어주시면 감사🐱‍🚀

Comment on lines +50 to +53
@Override
public int compareTo(Location o) {
return o.moved - moved;
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

move 기준으로 우선순위 박으신 이유가 있나요? 전 그냥 큰 의미 없는 거 같아서 뺐었는데

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

ㅡ

@anjungin anjungin left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

잘봤습니다

Comment on lines +25 to +48
if(location.x == board.length - 1 && location.y == board[0].length - 1) {
answer = Math.min(answer, location.changed);
continue;
}

for(int i = 0 ; i < direction.length ; i++) {
int x = location.x + direction[i][0];
int y = location.y + direction[i][1];

//범위내인지 체크
if(x >= 0 && x < board.length &&
y >= 0 && y < board[0].length) {
Location nextLocation = new Location(x, y, location.changed);
//방향 바꿨는지 체크
if(board[location.x][location.y] != i+1) {
nextLocation.changed++;
}

if(cost[x][y] > nextLocation.changed) {
cost[x][y] = nextLocation.changed;
queue.add(nextLocation);
}
}
}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

잘봤습니다
갈금하고 좋앗어요

@anjungin

Copy link
Copy Markdown
Collaborator

잘보감

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.

3 participants