Task: | HIIT Generation |
Sender: | TreamDeam |
Submission time: | 2018-05-26 14:39:01 +0300 |
Language: | Java |
Status: | READY |
Result: | WRONG ANSWER |
test | verdict | time | |
---|---|---|---|
#1 | WRONG ANSWER | 0.33 s | details |
#2 | TIME LIMIT EXCEEDED | -- | details |
#3 | WRONG ANSWER | 0.32 s | details |
#4 | WRONG ANSWER | 0.17 s | details |
Code
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.Scanner; public class H { public static void main(String[] args) throws NumberFormatException, IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int n = Integer.parseInt(br.readLine()); String cur = "HIIT"; String s = "HIIT"; for (int i = 0; i < n; i++) { String m = br.readLine(); if (m.equals("I")) { cur = cur.replaceAll("II", "HIITHIIT"); } else { cur = cur.replaceAll(m, s); } } } }
Test details
Test 1
Verdict: WRONG ANSWER
input |
---|
17 I I I I ... |
correct output |
---|
HHHHHHHHHHHHHHHHHHIITHIITTHHII... |
user output |
---|
(empty) |
Test 2
Verdict: TIME LIMIT EXCEEDED
input |
---|
333332 H H H H ... |
correct output |
---|
HIITIITIITIITIITIITIITIITIITII... |
user output |
---|
(empty) |
Test 3
Verdict: WRONG ANSWER
input |
---|
24 H T H T ... |
correct output |
---|
HIIHIITIIHIIHIITIIHIITIIHIIHII... |
user output |
---|
(empty) |
Test 4
Verdict: WRONG ANSWER
input |
---|
0 |
correct output |
---|
HIIT |
user output |
---|
(empty) |