CSES - Datatähti 2022 alku - Results
Submission details
Task:Merkkijono
Sender:Emunemu
Submission time:2021-10-04 22:04:14 +0300
Language:C++ (C++17)
Status:READY
Result:0
Feedback
groupverdictscore
#10
Test results
testverdicttime
#1ACCEPTED0.01 sdetails
#2ACCEPTED0.01 sdetails
#3ACCEPTED0.01 sdetails
#4ACCEPTED0.01 sdetails
#5ACCEPTED0.01 sdetails
#6ACCEPTED0.01 sdetails
#7ACCEPTED0.01 sdetails
#8ACCEPTED0.01 sdetails
#9ACCEPTED0.01 sdetails
#10ACCEPTED0.01 sdetails
#110.01 sdetails
#120.01 sdetails
#130.01 sdetails
#140.01 sdetails
#150.01 sdetails
#160.02 sdetails

Code

#include <stdio.h>
#include <iostream>
#include <math.h>

using namespace std;
string ToStr( char c ) {
   return string( 1, c );
}
int main()
{
    string ans = "a";
    string abc = "abcdefghijlkmnop";
    int n;
    cin >> n;
    for (int i = 1; i < n; i++) {
        string c = string(1,abc.at(i));
        for (int j = 0;ans.at(ans.length()-1) != abc.at(i); j+=2) {
            ans.insert(j,c);
        }
    } 
    /*string c = ToStr(abc.at(0));
    ans.insert(0,c);*/
    cout << ans;
    
    

    return 0;
}


Test details

Test 1

Verdict: ACCEPTED

input
1

correct output
a

user output
a

Test 2

Verdict: ACCEPTED

input
2

correct output
bab

user output
bab

Test 3

Verdict: ACCEPTED

input
3

correct output
cbcacbc

user output
cbcacbc

Test 4

Verdict: ACCEPTED

input
4

correct output
dcdbdcdadcdbdcd

user output
dcdbdcdadcdbdcd

Test 5

Verdict: ACCEPTED

input
5

correct output
edecedebedecedeaedecedebedeced...

user output
edecedebedecedeaedecedebedeced...

Test 6

Verdict: ACCEPTED

input
6

correct output
fefdfefcfefdfefbfefdfefcfefdfe...

user output
fefdfefcfefdfefbfefdfefcfefdfe...

Test 7

Verdict: ACCEPTED

input
7

correct output
gfgegfgdgfgegfgcgfgegfgdgfgegf...

user output
gfgegfgdgfgegfgcgfgegfgdgfgegf...
Truncated

Test 8

Verdict: ACCEPTED

input
8

correct output
hghfhghehghfhghdhghfhghehghfhg...

user output
hghfhghehghfhghdhghfhghehghfhg...
Truncated

Test 9

Verdict: ACCEPTED

input
9

correct output
ihigihifihigihieihigihifihigih...

user output
ihigihifihigihieihigihifihigih...
Truncated

Test 10

Verdict: ACCEPTED

input
10

correct output
jijhjijgjijhjijfjijhjijgjijhji...

user output
jijhjijgjijhjijfjijhjijgjijhji...
Truncated

Test 11

Verdict:

input
11

correct output
kjkikjkhkjkikjkgkjkikjkhkjkikj...

user output
ljliljlhljliljlgljliljlhljlilj...
Truncated

Test 12

Verdict:

input
12

correct output
lkljlklilkljlklhlkljlklilkljlk...

user output
klkjklkiklkjklkhklkjklkiklkjkl...
Truncated

Test 13

Verdict:

input
13

correct output
mlmkmlmjmlmkmlmimlmkmlmjmlmkml...

user output
mkmlmkmjmkmlmkmimkmlmkmjmkmlmk...
Truncated

Test 14

Verdict:

input
14

correct output
nmnlnmnknmnlnmnjnmnlnmnknmnlnm...

user output
nmnknmnlnmnknmnjnmnknmnlnmnknm...
Truncated

Test 15

Verdict:

input
15

correct output
onomonolonomonokonomonolonomon...

user output
onomonokonomonolonomonokonomon...
Truncated

Test 16

Verdict:

input
16

correct output
popnpopmpopnpoplpopnpopmpopnpo...

user output
popnpopmpopnpopkpopnpopmpopnpo...
Truncated