QOJ.ac

QOJ

Time Limit: 2 s Memory Limit: 256 MB Total points: 100

#22541. Sekretne pastwisko Bessie

Statistics

Farmer John wyciął z pastwiska niemal nieograniczoną liczbę kwadratów darni o wszystkich całkowitych długościach boku. Czasem FJ źle uruchamia ostrze i tworzy nawet kwadraty o boku 0. Ułożył je w porządne stosy, zauważone przez Bessie pewnego popołudnia.

Bessie zawsze chce smacznej trawy na sekretnym pastwisku. Zabierze dokładnie cztery kawałki i potnie je na części $1\times1$, by pokryć $N$ kwadratów jednostkowych ($1 \le N \le 10,000$).

Ile sposobów wyboru czterech kawałków jest możliwych? Dla rozmiaru 4 jest pięć: $(1,1,1,1)$, $(2,0,0,0)$, $(0,2,0,0)$, $(0,0,2,0)$, $(0,0,0,2)$. Kolejność ma znaczenie: $(4,3,2,1)$ i $(1,2,3,4)$ są różne.

Wejście

  • Wiersz 1: jedna liczba całkowita $N$.

Wyjście

  • Wiersz 1: jedna liczba całkowita, liczba sposobów wyboru przez Bessie czterech kawałków darni na pastwisko.

Przykład

Wejście 1

4

Wyjście 1

5

Autor zadania: Jeffrey Wang, 2007

Discussions

About Discussions

The discussion section is only for posting: General Discussions (problem-solving strategies, alternative approaches), and Off-topic conversations.

This is NOT for reporting issues! If you want to report bugs or errors, please use the Issues section below.

Open Discussions 0
No discussions in this category.

Issues

About Issues

If you find any issues with the problem (statement, scoring, time/memory limits, test cases, etc.), you may submit an issue here. A problem moderator will review your issue.

Guidelines:

  1. This is not a place to publish discussions, editorials, or requests to debug your code. Issues are only visible to you and problem moderators.
  2. Do not submit duplicated issues.
  3. Issues must be filed in English or Chinese only.
Active Issues 0
No issues in this category.
Closed/Resolved Issues 0
No issues in this category.