oj mrJudge
Toggle navigation
  • Login
    • Forget Password
      Login
User Image

Hello, Stranger

Guest
  • Analysis Mode
  • Problems
    • All Problems
    • Latest Problems
  • Join Us Now
  • Registration
  • Contact Us
  • Infomation
  • About
    • Terms of Use
    • Technical Specifications
    • Credits

homework Batch , stdin/stdout

Registered Users Only

Please login to utilize this feature.

Do note that this website only supports submissions in C++.

homework.html

Problem Description

It is the start of a new school year and Mr Panda is excited to start his final year of school leading up to his A-levels :D

As he enjoys the first few days of school reuniting with his friends and chatting about their wonderful endeavours during the holidays, his homework starts piling up rapidly and studying becomes a chore all over again. It's A-level year too for him and the teachers are not going to let him off that easily.

After the first few weeks, Mr Panda starts losing track of all the homework he needs to do as his desk becomes littered with loads of worksheets and notes. Having received many warnings from his teachers due to not handing in homework on time, he has sought your help in helping him keep track of all his homework. Help him code a program to track his deadlines within the year so he can hand up his homework on time.

Given a list of his N assignments, he wants to know which assignments he needs to complete first so he can prioritise his homework and not get scolded by his teachers anymore.

Input

The input will consist of two lines.

The first line will contain N as defined above.

The second line will contain N integers, representing how many days he has left to the due date of each assignment.

Output

The output should contain one line with N integers separate by a space each in the order which he should do his assignments. Refer to the sample test data if unsure. Note that there should NOT be a space after the last integer and there should be a newline at the end of your output.

Limits

Subtask 1(15%): 0 < N ≤ 1000

Subtask 2(30%): 0 < N ≤ 100000

Subtask 3(55%): 0 < N ≤ 3000000

Subtask 4(0%): Sample

Sample Input

5
3 6 3 1 9

Sample Output

1 3 3 6 9

Tags

Life of Panda Selection Test 2013, Sorting

Subtasks and Limits

Subtask Score #TC Time Memory Scoring
115101s16MBMinimum
230101s16MBMinimum
355102s16MBMinimum
4011s16MBMinimum

Judge Compile Command

g++-8 ans.cpp -o homework -Wall -Wshadow -static -O2 -lm -m64 -s -w -std=gnu++17 -fmax-errors=512

Accepted Submissions

subIDUserTimeMax Time

Past Submissions

subIDUserTimeScore
mrJudge 09.05.20
Copyright © 2020 mrJudge. All rights reserved.