oj mrJudge
Toggle navigation
  • Login
    • Forget Password
      Login
User Image

Hello, Stranger

Guest
  • Analysis Mode
  • Problems
    • All Problems
    • Latest Problems
  • Join Us Now
  • Registration
  • Contact Us
  • Infomation
  • About
    • Terms of Use
    • Technical Specifications
    • Credits

csecrets Batch , stdin/stdout

Registered Users Only

Please login to utilize this feature.

Do note that this website only supports submissions in C++.

csecrets.html

Strings of strings are strings made of strings. Being a master string stringer such as your stringy self, Ran the cat needs your help to string together a string of strings, so that he'll have a fun string of strings to play with. To make a string of strings a fun string of strings though, the strings have to be strung together in particular ways.

One way to do this is to take two strings, cut them up, and put them together. Given two strings, A and B, cut them up into pieces of length n. Then join these pieces together in an alternating manner. The lengths of the strings will be the same, and will be multiples of n.

Input

Two strings, A and B.

Followed by an integer, n

Output

The strung string of strings.

Subtasks

For 30% of the allocated score, length of A ≤ 1000

For 100% of the allocated score, length of A ≤ 1000000

Sample Input

applepies areyummys
3

Sample Output

apparelepyumiesmys

Tags

String Processing

Subtasks and Limits

Subtask Score #TC Time Memory Scoring
13061s32MBMinimum
270141s32MBMinimum
3011s32MBMinimum

Judge Compile Command

g++-8 ans.cpp -o csecrets -Wall -Wshadow -static -O2 -lm -m64 -s -w -std=gnu++17 -fmax-errors=512

Accepted Submissions

subIDUserTimeMax Time

Past Submissions

subIDUserTimeScore
mrJudge 09.05.20
Copyright © 2020 mrJudge. All rights reserved.