Created
December 9, 2014 19:54
-
-
Save ik11235/97b40779c09194570179 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ChristmasTreeDecorationDiv2 { | |
public: | |
int solve(vector<int> col, vector<int> x, vector<int> y) { | |
int cnt=0; | |
for(int i=0;i<x.size();i++) | |
{ | |
if(col[x[i]-1]!=col[y[i]-1]) | |
cnt++; | |
} | |
return cnt; | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment