Code Submission Evaluation System Login

HIIT Open 2018

Start:2018-05-26 11:00:00
End:2018-05-26 16:00:00
 

Tasks | Messages | Scoreboard | Statistics


CSES - HIIT Open 2018 - Results
History
2018-05-26 15:48:58
2018-05-26 15:35:59
2018-05-26 11:48:51
Task:HIIT Generation
Sender:Sloths
Submission time:2018-05-26 15:48:58
Language:C++
Status:READY
Result:TIME LIMIT EXCEEDED

Test results

testverdicttime (s)
#1TIME LIMIT EXCEEDED-- / 1.00details
#2TIME LIMIT EXCEEDED-- / 1.00details
#3TIME LIMIT EXCEEDED-- / 1.00details
#4ACCEPTED0.01 / 1.00details

Code

#include <bits/stdc++.h>
#include <string>

using namespace std;

int main()
{
  string base = "HIIT";
  int n = 0, l = 4;
  char c;
  cin >> n;

  for (int i=0; i<n; i++)
    {
      cin >> c;
	
      for (int j=0; j<l; j++)
      if (base[j] == c)
	{
	base.replace(j,1,"HIIT");
	l = base.length();
	j = j+3;
	}
    }

  cout << base;
  return 0;
}

Test details

Test 1

Verdict: TIME LIMIT EXCEEDED

input
17
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
view   save

correct output
HHHHHHHHHHHHHHHHHHIITHIITTHHII...
view   save

user output
(no output)
view   save

Test 2

Verdict: TIME LIMIT EXCEEDED

input
333332
H
H
H
H
H
H
H
H
H
H
H
H
H
H
H
H
H
H
H
...
view   save

correct output
HIITIITIITIITIITIITIITIITIITII...
view   save

user output
(no output)
view   save

Test 3

Verdict: TIME LIMIT EXCEEDED

input
24
H
T
H
T
H
T
H
T
H
T
H
T
H
T
H
T
H
T
H
...
view   save

correct output
HIIHIITIIHIIHIITIIHIITIIHIIHII...
view   save

user output
(no output)
view   save

Test 4

Verdict: ACCEPTED

input
0
view   save

correct output
HIIT
view   save

user output
HIIT
view   save