Skip to content

Commit 8848e83

Browse files
authored
Update CHANDF.cpp
1 parent d53ab06 commit 8848e83

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

MyOnlineSubmissions/Codechef/MAY20/CHANDF.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ class Bit{
5353
} bitX, bitY;
5454

5555
vector<ll> getValidZValues(ll &L, ll &R) {
56-
vector<ll> validZ = {L, R}; // L and R are always valid Z values we should handle
56+
vector<ll> Zcandidates = {L, R}; // L and R are always valid Z values we should handle
5757
Bit bitL(L);
5858
Bit bitR(R);
5959
int k = 0;
@@ -71,7 +71,7 @@ vector<ll> getValidZValues(ll &L, ll &R) {
7171
z.set(i, 1); // maximize F(X,Y,Z)
7272
}
7373
}
74-
validZ.push_back(z.toInt());
74+
Zcandidates.push_back(z.toInt());
7575
}
7676
for(int r = k+1; r < 40; r++) {
7777
if(bitR.get(r) != 1) continue;
@@ -85,11 +85,11 @@ vector<ll> getValidZValues(ll &L, ll &R) {
8585
z.set(i, 1);
8686
}
8787
}
88-
validZ.push_back(z.toInt());
88+
Zcandidates.push_back(z.toInt());
8989
}
9090

91-
sort(validZ.begin(), validZ.end());
92-
return validZ;
91+
sort(Zcandidates.begin(), Zcandidates.end());
92+
return Zcandidates;
9393
}
9494

9595
int main() {

0 commit comments

Comments
 (0)