Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int p = 0;
- REP(testx, 100){
- REP(testy, 100){
- int c = 0;
- for (int i = 0, j = n-1; i < n; j = i++) {
- if ( ((point[i][1]>testy) != (point[j][1]>testy)) &&
- (testx <= (point[j][0]-point[i][0]) * (testy-point[i][1])+1 / (point[j][1]-point[i][1])+2 + point[i][0]) )
- c = !c;
- }
- p += c;
- }
- }
- cout << p << endl;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement