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

maple Batch , stdin/stdout

Registered Users Only

Please login to utilize this feature.

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

maple.html

There is a fancy new game called Map-le. This game requires people to create maps! Being a gaming enthusiast such as yourself, you have decided to create a programme to dominate the Map-le scoreboards.

The game of Map-le is played as follows: The player gets an integer, n. Then s/he will receive n strings of location names. This is followed by n integers. the ith string corresponds with the ith integer. The player will then have to sort the locations based on the numbers given, and list out the order of locations a tourist will visit.

Input

An integer, n.

n strings which are at most 20 characters long

n integers, all of which are < 232

Output

The ordered list of locations a tourist will visit.

Subtasks

For 50% of the testcases, n ≤ 2000.

For 100% of the testcases, n ≤ 1000000.

Sample Input

3
singapore shenchen java
3 1 2

Sample Output

shenchen
java
singapore

Tags

String Processing, Sorting, Data Structure

Subtasks and Limits

Subtask Score #TC Time Memory Scoring
15051s32MBMinimum
25051.5s64MBMinimum
3011s32MBMinimum

Judge Compile Command

g++-8 ans.cpp -o maple -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.