Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public int NumberOfWeakCharacters(int[][] properties)
- {
- var count = 0;
- for (var i = 0; i < properties.Length - 1; i++)
- {
- for (var j = i + 1; j < properties.Length; j++)
- {
- if ((properties[i][0] < properties[j][0] &&
- properties[i][1] < properties[j][1]) ||
- (properties[i][0] > properties[j][0] &&
- properties[i][1] > properties[j][1]))
- {
- count++;
- }
- }
- }
- return count;
- }
Add Comment
Please, Sign In to add comment