QOJ.ac

QOJ

시간 제한: 1.0 s 메모리 제한: 256 MB 총점: 100 난이도: [표시] 해킹 가능 ✓

#14435. Enn eitt uppbyggilegt verkefni

통계

Þér er gefin umröðun $a$ af lengd $n$. Einnig eru gefnar jákvæðar heiltölur $k$ og $m$ ($1 \le k \le m \le n$).

Þú átt að segja til um hvort til sé hlutruna $b$ úr $a$ af lengd $m$ þannig að lengd lengstu vaxandi hlutrunu í $b$ sé jöfn $k$. Ef slík hlutruna er til áttu að prenta einhverja rétta hlutrunu.

Inntak

Fyrsta línan inniheldur þrjár heiltölur $n, m, k$ ($1 \le k \le m \le n \le 5\,000$) — lengd umröðunarinnar, lengd hlutrununnar $b$ og lengd lengstu vaxandi hlutrunu í $b$.

Úttak

Á fyrstu línu skal prenta „Yes“ eða „No“. Yfirferðarforritið gerir ekki greinarmun á há- og lágstöfum.

Á annarri línu skal prenta eina af réttu hlutrununum ef slík er til.

Dæmi

Inntak 1

5 2 2
4 5 3 2 1

Úttak 1

Yes
4 5

Inntak 2

5 2 2
5 4 3 2 1

Úttak 2

No

Inntak 3

6 4 2
1 3 4 2 6 5

Úttak 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.