Skip to content
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

[ADD] week_74 #221

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

[ADD] week_74 #221

wants to merge 1 commit into from

Conversation

jsl1113
Copy link
Owner

@jsl1113 jsl1113 commented Mar 20, 2025

No description provided.

@jsl1113 jsl1113 added the ➕ ADD 문제 풀이 파일이나 부수적인 코드 추가 label Mar 20, 2025
@jsl1113 jsl1113 self-assigned this Mar 20, 2025
}

static boolean isValid(int x, int y) {
return x >= 0 && x < 19 && y >= 0 && y < 19;
Copy link
Collaborator

Choose a reason for hiding this comment

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

나도 항상 이걸 따로 뺄까 고민하는데

(!isValid(nextX, nextY) || arr[nextX][nextY] != color)) {
return true;
}
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

방식이 거의 같군

for (int d = 0; d < 4; d++) {
if (check(i, j, dx[d], dy[d], color)) {
int finalX = (d == 3) ? i + 4 : i;
int finalY = (d == 3) ? j - 4 : j;
Copy link
Collaborator

Choose a reason for hiding this comment

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

3항연산자의 달인이시네요

}

static void dfs(int x, int y, int cnt) {
if (k < cnt) return;
Copy link
Collaborator

Choose a reason for hiding this comment

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

아래에 cnt ==k가 있는데 이게 있어야 하는 이유가 뭘까?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
➕ ADD 문제 풀이 파일이나 부수적인 코드 추가
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants