Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 6a0d910

Browse files
committed
update 1267.count-servers-that-communicate.cpp
1 parent 9886283 commit 6a0d910

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

‎1267.count-servers-that-communicate.cpp‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,7 @@ class Solution {
8181
int cnt = 0;
8282
for(int i=0; i<n; i++)
8383
for(int j=0; j<m; j++)
84-
if(grid[i][j] && (row[i]+col[j]-2))
85-
cnt += 1;
84+
cnt += (grid[i][j] && row[i]+col[j]-2);
8685

8786
return cnt;
8887
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /