QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#599712 | #5483. Class Field Trip | andahe | AC ✓ | 0ms | 3796kb | C++17 | 388b | 2024-09-29 09:37:33 | 2024-09-29 09:37:34 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
int main()
{
//freopen("1.in","r",stdin);
string a, b, c;
cin >> a >> b;
int i = 0, j = 0;
for(; i < a.size() || j < b.size();)
{
while((a[i] <= b[j] || j == b.size()) && i < a.size()) cout<<a[i++];
while((b[j] <= a[i] || i == a.size()) && j < b.size()) cout<<b[j++];
}
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 0ms
memory: 3792kb
input:
ahjmnoy acijjkll
output:
aachijjjkllmnoy
result:
ok single line: 'aachijjjkllmnoy'
Test #2:
score: 0
Accepted
time: 0ms
memory: 3504kb
input:
a a
output:
aa
result:
ok single line: 'aa'
Test #3:
score: 0
Accepted
time: 0ms
memory: 3508kb
input:
aaaabbccddeeeefghijjknnnoopqrssssstttuuvwwxxxyyyyy abbcefgghiiiiiijjjllllmmnnooqqrssttuvvwxxxxxyyzzzz
output:
aaaaabbbbcccddeeeeeffggghhiiiiiiijjjjjkllllmmnnnnnoooopqqqrrssssssstttttuuuvvvwwwxxxxxxxxyyyyyyyzzzz
result:
ok single line: 'aaaaabbbbcccddeeeeeffggghhiiii...tttuuuvvvwwwxxxxxxxxyyyyyyyzzzz'
Test #4:
score: 0
Accepted
time: 0ms
memory: 3556kb
input:
aaaaabcdegghhhijlllmmnnnooppppqqrrrrssttuvwwwxyyzz aabbbbccgggggijjjjlllmmmnnooppqrtttuuuvvvwxxxxxyzz
output:
aaaaaaabbbbbcccdeggggggghhhiijjjjjllllllmmmmmnnnnnooooppppppqqqrrrrrsstttttuuuuvvvvwwwwxxxxxxyyyzzzz
result:
ok single line: 'aaaaaaabbbbbcccdeggggggghhhiij...stttttuuuuvvvvwwwwxxxxxxyyyzzzz'
Test #5:
score: 0
Accepted
time: 0ms
memory: 3536kb
input:
aaaaabbbbcdeeeffggggghhhhiiiijjjjkklllllmmnnnnnnoooooppppppqqqqqrrrrrsssttttuuuvvvwwwwwwwwwxyyyyzzzz a
output:
aaaaaabbbbcdeeeffggggghhhhiiiijjjjkklllllmmnnnnnnoooooppppppqqqqqrrrrrsssttttuuuvvvwwwwwwwwwxyyyyzzzz
result:
ok single line: 'aaaaaabbbbcdeeeffggggghhhhiiii...sssttttuuuvvvwwwwwwwwwxyyyyzzzz'
Test #6:
score: 0
Accepted
time: 0ms
memory: 3568kb
input:
aaaaaabbbbbbccccddeeeefgggggghiijjjjjjklllmmmnnnnnoooopppqqrrsssssttttttuuuuuvvvvwwwxxxxxxxxyyyyyyzz z
output:
aaaaaabbbbbbccccddeeeefgggggghiijjjjjjklllmmmnnnnnoooopppqqrrsssssttttttuuuuuvvvvwwwxxxxxxxxyyyyyyzzz
result:
ok single line: 'aaaaaabbbbbbccccddeeeefggggggh...ttuuuuuvvvvwwwxxxxxxxxyyyyyyzzz'
Test #7:
score: 0
Accepted
time: 0ms
memory: 3732kb
input:
z aaaaaabbbccdeefgggghhhhiiiiiiijjjjlllllllmmmmnnnnnooooppppqqqqrrrrrssssttttuuvvvwwwwxxxxxxyyyyzzzzzz
output:
aaaaaabbbccdeefgggghhhhiiiiiiijjjjlllllllmmmmnnnnnooooppppqqqqrrrrrssssttttuuvvvwwwwxxxxxxyyyyzzzzzzz
result:
ok single line: 'aaaaaabbbccdeefgggghhhhiiiiiii...sttttuuvvvwwwwxxxxxxyyyyzzzzzzz'
Test #8:
score: 0
Accepted
time: 0ms
memory: 3600kb
input:
aaaaabbbbcdeeeffggggghhhhiiiijjjjkklllllmmnnnnnnoooooppppppqqqqqrrrrrsssttttuuuvvvwwwwwwwwwxyyyyzzzz aaaaaabbbbbbccccddeeeefgggggghiijjjjjjklllmmmnnnnnoooopppqqrrsssssttttttuuuuuvvvvwwwxxxxxxxxyyyyyyzz
output:
aaaaaaaaaaabbbbbbbbbbcccccdddeeeeeeefffggggggggggghhhhhiiiiiijjjjjjjjjjkkkllllllllmmmmmnnnnnnnnnnnooooooooopppppppppqqqqqqqrrrrrrrssssssssttttttttttuuuuuuuuvvvvvvvwwwwwwwwwwwwxxxxxxxxxyyyyyyyyyyzzzzzz
result:
ok single line: 'aaaaaaaaaaabbbbbbbbbbcccccddde...wwwwwwxxxxxxxxxyyyyyyyyyyzzzzzz'
Test #9:
score: 0
Accepted
time: 0ms
memory: 3760kb
input:
aaaaaabbbccdeefgggghhhhiiiiiiijjjjlllllllmmmmnnnnnooooppppqqqqrrrrrssssttttuuvvvwwwwxxxxxxyyyyzzzzzz aaaaaabbbbbbccccddeeeefgggggghiijjjjjjklllmmmnnnnnoooopppqqrrsssssttttttuuuuuvvvvwwwxxxxxxxxyyyyyyzz
output:
aaaaaaaaaaaabbbbbbbbbccccccdddeeeeeeffgggggggggghhhhhiiiiiiiiijjjjjjjjjjkllllllllllmmmmmmmnnnnnnnnnnoooooooopppppppqqqqqqrrrrrrrsssssssssttttttttttuuuuuuuvvvvvvvwwwwwwwxxxxxxxxxxxxxxyyyyyyyyyyzzzzzzzz
result:
ok single line: 'aaaaaaaaaaaabbbbbbbbbccccccddd...xxxxxxxxxxxxxyyyyyyyyyyzzzzzzzz'
Test #10:
score: 0
Accepted
time: 0ms
memory: 3564kb
input:
aaaaabbbbcdeeeffggggghhhhiiiijjjjkklllllmmnnnnnnoooooppppppqqqqqrrrrrsssttttuuuvvvwwwwwwwwwxyyyyzzzz aaabceehiillmnorrtv
output:
aaaaaaaabbbbbccdeeeeeffggggghhhhhiiiiiijjjjkklllllllmmmnnnnnnnooooooppppppqqqqqrrrrrrrssstttttuuuvvvvwwwwwwwwwxyyyyzzzz
result:
ok single line: 'aaaaaaaabbbbbccdeeeeeffggggghh...stttttuuuvvvvwwwwwwwwwxyyyyzzzz'
Test #11:
score: 0
Accepted
time: 0ms
memory: 3548kb
input:
z a
output:
az
result:
ok single line: 'az'
Test #12:
score: 0
Accepted
time: 0ms
memory: 3796kb
input:
a z
output:
az
result:
ok single line: 'az'
Test #13:
score: 0
Accepted
time: 0ms
memory: 3500kb
input:
aabeehiklmmsy aaabceehiillmnorrtv
output:
aaaaabbceeeehhiiiklllmmmnorrstvy
result:
ok single line: 'aaaaabbceeeehhiiiklllmmmnorrstvy'
Test #14:
score: 0
Accepted
time: 0ms
memory: 3508kb
input:
ahijjmmnory aabeehiklmmsy
output:
aaabeehhiijjklmmmmnorsyy
result:
ok single line: 'aaabeehhiijjklmmmmnorsyy'
Test #15:
score: 0
Accepted
time: 0ms
memory: 3564kb
input:
aaaaabcdegghhhijlllmmnnnooppppqqrrrrssttuvwwwxyyzz hjno
output:
aaaaabcdegghhhhijjlllmmnnnnoooppppqqrrrrssttuvwwwxyyzz
result:
ok single line: 'aaaaabcdegghhhhijjlllmmnnnnoooppppqqrrrrssttuvwwwxyyzz'
Test #16:
score: 0
Accepted
time: 0ms
memory: 3560kb
input:
ahijjmmnory bbbeeffggghiiijjjkkllnnnoooppqqqrsttuuvvwwwwwwyyzz
output:
abbbeeffggghhiiiijjjjjkkllmmnnnnooooppqqqrrsttuuvvwwwwwwyyyzz
result:
ok single line: 'abbbeeffggghhiiiijjjjjkkllmmnnnnooooppqqqrrsttuuvvwwwwwwyyyzz'
Test #17:
score: 0
Accepted
time: 0ms
memory: 3508kb
input:
aabbbbccgggggijjjjlllmmmnnooppqrtttuuuvvvwxxxxxyzz aabeehiklmmsy
output:
aaaabbbbbcceeggggghiijjjjkllllmmmmmnnooppqrstttuuuvvvwxxxxxyyzz
result:
ok single line: 'aaaabbbbbcceeggggghiijjjjkllllmmmmmnnooppqrstttuuuvvvwxxxxxyyzz'
Test #18:
score: 0
Accepted
time: 0ms
memory: 3508kb
input:
aaabceehiillmnorrtv aaaabbccddeeeefghijjknnnoopqrssssstttuuvwwxxxyyyyy
output:
aaaaaaabbbcccddeeeeeefghhiiijjkllmnnnnooopqrrrsssssttttuuvvwwxxxyyyyy
result:
ok single line: 'aaaaaaabbbcccddeeeeeefghhiiijj...ooopqrrrsssssttttuuvvwwxxxyyyyy'