Diferente pentru problema/lpaths intre reviziile #1 si #2

Nu exista diferente intre titluri.

Diferente intre continut:

== include(page="template/taskheader" task_id="lpaths") ==
Poveste şi cerinţă...
Back when he was little, Stefan used to look a lot at the sky during the night, hoping to see various kinds of stars and to imagine different kinds of lines which can be drawn amongst them. Looking back at his childhood, he realized that he can now use the computer to refine this process!
 
Therefore, he gives you the 2D map of the stars during one particular night, and he tells you that there were $n$ stars on the sky. Furthermore, he also tells you that he is interested in finding the number of parallel L-shaped paths he can find in the given star map.
 
A parallel L-shaped path is a sequence of three stars which form an L-shape and it is parallel to the coordinate axes. The L can have its sides rotated, as long as it still forms an L. Furthermore, the L can't be degenerated(i.e: a straight line).
 
h2. Date de intrare
Fişierul de intrare $lpaths.in$ ...
The first line of the input file $lpaths.in$ contains $n$, the number of stars.
 
The next line of the input contains the coordinates of the $n$ stars. All stars are distinct.
 
h2. Date de ieşire
În fişierul de ieşire $lpaths.out$ ...
The output file $lpaths.out$ contains the number of L-shaped paths we have in the star map.
h2. Restricţii
* $... ≤ ... ≤ ...$
* $1 ≤ n ≤ 2 * 10^5$
* $0 ≤ x, y ≤ 2 * 10^5$
* For tests worth $20$ points, $1 ≤ n ≤ 200$
* For tests worth $30$ more points, $1 ≤ n ≤ 2000$.
h2. Exemplu
table(example). |_. lpaths.in |_. lpaths.out |
| This is some
  text written on
  multiple lines.
| This is another
  text written on
  multiple lines.
| 5
5 5
8 5
5 8
5 0
0 5
| 4
|
h3. Explicaţie
 
...
== include(page="template/taskfooter" task_id="lpaths") ==

Nu exista diferente intre securitate.

Topicul de forum nu a fost schimbat.