|
|
back to boardShow all messages Hide all messagesYou can solve this problem quickly by using the multiset and set data structures. To find the answer, use the set iterator. My solution is similar: map x to x - 600 and use array to count its frequency. Then accumulate all the freq[x] / 4 and just print the sum. As the diameter is constrained in [600,700], there will be at most 101 different values. |
|
|