Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fix smells
  • Loading branch information
ThanhNIT committed May 16, 2022
commit b6456614d86483d7a6039c9b556b3a6800b02830
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ public int[] maxGeneticDifference(int[] parents, int[][] queries) {
}
int[] ret = new int[queries.length];
for (int q = 0; q < queries.length; q++) {
int cur = queries[q][0], value = queries[q][1];
int cur = queries[q][0];
int value = queries[q][1];
for (int p = 30; p >= 0; p--) {
int msk = 1 << p;
if ((value & msk) != (cur & msk)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ public List<List<Long>> splitPainting(int[][] segments) {
}

long mixedColor = 0;
for (int end = 1, start = 1; end < n; end++) {
int start = 1;
for (int end = 1; end < n; end++) {
if (endpoint[end]) {
if (mixedColor > 0) {
result.add(Arrays.asList((long) start, (long) end, mixedColor));
Expand Down