Task: | HIIT Generation |
Sender: | TreamDeam |
Submission time: | 2018-05-26 14:53:25 +0300 |
Language: | C++ |
Status: | READY |
Result: | TIME LIMIT EXCEEDED |
test | verdict | time | |
---|---|---|---|
#1 | ACCEPTED | 0.07 s | details |
#2 | TIME LIMIT EXCEEDED | -- | details |
#3 | ACCEPTED | 0.05 s | details |
#4 | ACCEPTED | 0.01 s | details |
Code
#include <iostream> using namespace std; int len; char rep[1000000]; void write(char letter,int s) { //cout << "wr\n"; int a = 0; for (int i = s; i < len; i++) { if (letter == rep[i]) { write('H', i + 1); write('I', i + 1); write('I', i + 1); write('T', i + 1); a = 1; break; } } if (a == 0) cout << letter; } int main() { cin >> len; char a; for (int i = 0; i < len; i++) { cin >> a; rep[i] = a; } //cout << rep[0] << " " << rep[1] << "\n"; write('H', 0); write('I', 0); write('I', 0); write('T', 0); cout << endl; return 0; }
Test details
Test 1
Verdict: ACCEPTED
input |
---|
17 I I I I ... |
correct output |
---|
HHHHHHHHHHHHHHHHHHIITHIITTHHII... |
user output |
---|
HHHHHHHHHHHHHHHHHHIITHIITTHHII... |
Test 2
Verdict: TIME LIMIT EXCEEDED
input |
---|
333332 H H H H ... |
correct output |
---|
HIITIITIITIITIITIITIITIITIITII... |
user output |
---|
(empty) |
Test 3
Verdict: ACCEPTED
input |
---|
24 H T H T ... |
correct output |
---|
HIIHIITIIHIIHIITIIHIITIIHIIHII... |
user output |
---|
HIIHIITIIHIIHIITIIHIITIIHIIHII... |
Test 4
Verdict: ACCEPTED
input |
---|
0 |
correct output |
---|
HIIT |
user output |
---|
HIIT |