QOJ.ac

QOJ

Süre Sınırı: 1.0 s Bellek Sınırı: 256 MB Toplam puan: 100 Zorluk: [göster] Hack'lenebilir ✓

#14435. مسألة بنائية أخرى

İstatistikler

أُعطيت تبديلاً $a$ طوله $n$. كما أُعطيت عددين صحيحين موجبين $k$ و $m$ ($1 \le k \le m \le n$).

المطلوب منك تحديد ما إذا كانت توجد متتالية جزئية $b$ من $a$ طولها $m$ بحيث يكون طول أطول متتالية جزئية متزايدة في $b$ مساوياً لـ $k$. وفي حال وجود مثل هذه المتتالية الجزئية، يُطلب منك طباعة أي متتالية جزئية صحيحة.

الإدخال

يحتوي السطر الأول على ثلاثة أعداد صحيحة $n, m, k$ ($1 \le k \le m \le n \le 5\,000$) — طول التبديل، وطول المتتالية الجزئية $b$، وطول أطول متتالية جزئية متزايدة في $b$.

الإخراج

في السطر الأول، اطبع “Yes” أو “No”. برنامج التحقق غير حساس لحالة الأحرف.

في السطر الثاني، اطبع إحدى المتتاليات الجزئية الصحيحة إن وجدت.

أمثلة

الإدخال 1

5 2 2
4 5 3 2 1

الإخراج 1

Yes
4 5

الإدخال 2

5 2 2
5 4 3 2 1

الإخراج 2

No

الإدخال 3

6 4 2
1 3 4 2 6 5

الإخراج 3

Yes
4 2 6 5

Editorials

IDTypeStatusTitlePosted ByLast UpdatedActions
#373EditorialOpen题解jianglyView

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.