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

shortestword Batch , stdin/stdout

Registered Users Only

Please login to utilize this feature.

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

shortestword.html

Input a list of n words and output the shortest word.

Input

The first line of input is a single integer, n.
0 < n <= 1000
The following n lines will have one word on each line.
The length of the words will be less than or equal to 10000.

Output

Output a single word, which is the shortest word out of the list.
In the event there is more than one word with the same 'shortest' length, output the first word appeared in the input.

Sample Input

5
Hello
Kitty
is
Nice
Right

Sample Output

is

Tags

String Processing

Subtasks and Limits

Subtask Score #TC Time Memory Scoring
1100101s32MBAverage
2011s32MBAverage

Judge Compile Command

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