QOJ.ac

QOJ

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

#22541. مرعى Bessie السري

Statistics

قطع Farmer John من المرعى عددًا شبه غير محدود من مربعات العشب بكل أطوال الضلع الصحيحة. أحيانًا لا يشغل FJ الشفرة جيدًا فيصنع حتى مربعات ضلعها 0. رصها في أكوام منظمة لاحظتها Bessie بعد ظهر أحد الأيام.

تريد Bessie دائمًا عشبًا لذيذًا في مرعاها السري. قررت نقل أربع قطع بالضبط وتقطيعها إلى أجزاء $1\times1$ لتغطية مربعاته الوحدية الـ$N$ ($1 \le N \le 10,000$).

كم طريقة لاختيار أربع قطع لتغطية المرعى؟ لحجم 4 توجد خمس: $(1,1,1,1)$، $(2,0,0,0)$، $(0,2,0,0)$، $(0,0,2,0)$، $(0,0,0,2)$. الترتيب مهم: $(4,3,2,1)$ تختلف عن $(1,2,3,4)$.

الإدخال

  • السطر 1: عدد صحيح $N$.

الإخراج

  • السطر 1: عدد صحيح واحد، عدد طرق Bessie المختلفة لاختيار أربع قطع للمرعى.

أمثلة

الإدخال 1

4

الإخراج 1

5

مؤلف المسألة: 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.