# HCPC points on this side of a line

## Submit

Language is selected by the extension of the file. See the list of supported languages to know the extension of your language.

## Problem

You are given an integer n and a pair of distinct integer valued (x, y) coordinates on the boundary of the grid. The coordinates are indexed from 1. The points will always be on different sides of the grid and neither of them will be (1,1).

Output the number of integer points in an n by n grid that are on the same side of the line between the two boundary points as the coordinate (1,1). Points that are exactly on the line should be counted as well.

## Options

exec is denied

rejudge feature is enabled

now post-mortem time, all source codes will be revealed

## Sample input:_

10
1 2
10 7

## Sample output:

41

## Sample input:_

8
8 3
3 8

## Sample output:

49

## Sample input:_

8
7 1
8 2

## Sample output:

63

## Ranking

Rank | User | Size | Time | Date | Statistics |
---|

1 | whio | 10 | 0.2133 | *2024/02/18 01:47:47* | 3B / 4B / 3B |

### Language Ranking_

Rank | Lang | User | Size | Score |

1 | gs2 | whio | 10 | 10000 |

2 | Python3 | David Sharick | 216 | 462 |

return to the top page