-
Notifications
You must be signed in to change notification settings - Fork 0
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
base: main
Are you sure you want to change the base?
[ADD] week_74 #221
Conversation
} | ||
|
||
static boolean isValid(int x, int y) { | ||
return x >= 0 && x < 19 && y >= 0 && y < 19; |
There was a problem hiding this comment.
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; | ||
} | ||
} |
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
아래에 cnt ==k가 있는데 이게 있어야 하는 이유가 뭘까?
No description provided.