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:59:54
2018-05-26 15:58:54
2018-05-26 11:59:39
2018-05-26 11:49:14
2018-05-26 11:22:34
2018-05-26 11:19:42
Task:HIIT Generation
Sender:Robotiimi
Submission time:2018-05-26 15:59:54
Language:C++
Status:READY
Result:TIME LIMIT EXCEEDED

Test results

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

Code

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

using namespace std;


int main() {
ios_base::sync_with_stdio(0);
cin.tie(0);

list <char> r;
r.push_back('H');
r.push_back('I');
r.push_back('I');
r.push_back('T');

int n;
cin >> n;
char a;


for (int i=0; i<n; i++) {
    cin >> a;
     
    for (list<char>::iterator it=r.begin(); it!=r.end(); ++it) {
        if (*it == a) {
            *it = 'T';
            r.insert(it, 'H');++it;
            r.insert(it, 'I');++it;
            r.insert(it, 'I');
            ++it;                  
        }
    }
}
    for (list<char>::iterator it=r.begin(); it!=r.end(); ++it) { 
        cout << *it;
}
}

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: WRONG ANSWER

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
IHHTIIIHIHTIIIIIHHTIIIIIHHTIII...
view   save

Test 4

Verdict: ACCEPTED

input
0
view   save

correct output
HIIT
view   save

user output
HIIT
view   save