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

jacketorme Batch , stdin/stdout

Registered Users Only

Please login to utilize this feature.

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

jacketorme.html

Problem Description

"HOR!! You want jacket or you want me ><" Rar the Cat asks.
"Me jacket" His beloved girlfriend answers.

Rar the Cat is devastated. Really? Does a jacket have more worth than him? Determined to find out the true answer, Rar the Cat sneaks into his girlfriend's house during her sleep, and records down everything she says in her sleep, to determine her true thoughts. However, due to his horrible note-taking skills, he is only able to take down a long string of upper-case letters! Help Rar the Cat figure out his worth by counting the number of times "RANALD" and "JACKET" appears in the string of letters. If there are more "JACKET"s than "RANALD"s, output "JACKET" to indicate that the jacket is more important. Else, output "RANALD".

Input

The input will consist of one upper-case string, the one that Rar the Cat took down.

Output

Your output should be either "JACKET" or "RANALD", according the number of times it appears in the long string.

Limits

Subtask 1 (30%): Length of string will always be less than 1,000 characters.
Subtask 2 (70%): Length of string will always be less than 10,000,000 characters.

Sample Input 1

OMGRANALDJACKETJACKETRAWRJACKETA

Sample Output 1

JACKET

Tags

String Processing

Subtasks and Limits

Subtask Score #TC Time Memory Scoring
13061s64MBMinimum
270111s64MBMinimum
3011s64MBMinimum

Judge Compile Command

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