| Task: | Buzzwords |
| Sender: | aalto26im_026 |
| Submission time: | 2026-11-02 17:04:18 +0200 |
| Language: | C++ (C++23) |
| Status: | READY |
| Result: | RUNTIME ERROR |
| test | verdict | time | |
|---|---|---|---|
| #1 | RUNTIME ERROR | 0.00 s | details |
| #2 | RUNTIME ERROR | 0.00 s | details |
| #3 | RUNTIME ERROR | 0.00 s | details |
| #4 | RUNTIME ERROR | 0.00 s | details |
| #5 | RUNTIME ERROR | 0.00 s | details |
| #6 | RUNTIME ERROR | 0.00 s | details |
| #7 | RUNTIME ERROR | 0.00 s | details |
| #8 | RUNTIME ERROR | 0.00 s | details |
| #9 | RUNTIME ERROR | 0.00 s | details |
| #10 | RUNTIME ERROR | 0.00 s | details |
| #11 | RUNTIME ERROR | 0.00 s | details |
| #12 | RUNTIME ERROR | 0.00 s | details |
| #13 | RUNTIME ERROR | 0.00 s | details |
| #14 | RUNTIME ERROR | 0.00 s | details |
| #15 | RUNTIME ERROR | 0.00 s | details |
| #16 | RUNTIME ERROR | 0.00 s | details |
| #17 | RUNTIME ERROR | 0.00 s | details |
| #18 | RUNTIME ERROR | 0.00 s | details |
| #19 | RUNTIME ERROR | 0.00 s | details |
| #20 | RUNTIME ERROR | 0.00 s | details |
| #21 | RUNTIME ERROR | 0.00 s | details |
| #22 | RUNTIME ERROR | 0.00 s | details |
| #23 | RUNTIME ERROR | 0.00 s | details |
| #24 | RUNTIME ERROR | 0.00 s | details |
| #25 | RUNTIME ERROR | 0.00 s | details |
| #26 | RUNTIME ERROR | 0.00 s | details |
| #27 | RUNTIME ERROR | 0.00 s | details |
| #28 | RUNTIME ERROR | 0.00 s | details |
| #29 | RUNTIME ERROR | 0.00 s | details |
| #30 | RUNTIME ERROR | 0.00 s | details |
| #31 | RUNTIME ERROR | 0.00 s | details |
| #32 | RUNTIME ERROR | 0.00 s | details |
| #33 | RUNTIME ERROR | 0.00 s | details |
| #34 | RUNTIME ERROR | 0.00 s | details |
| #35 | RUNTIME ERROR | 0.00 s | details |
| #36 | RUNTIME ERROR | 0.00 s | details |
| #37 | RUNTIME ERROR | 0.00 s | details |
| #38 | RUNTIME ERROR | 0.00 s | details |
| #39 | RUNTIME ERROR | 0.00 s | details |
| #40 | RUNTIME ERROR | 0.00 s | details |
| #41 | RUNTIME ERROR | 0.00 s | details |
| #42 | RUNTIME ERROR | 0.00 s | details |
| #43 | RUNTIME ERROR | 0.00 s | details |
| #44 | RUNTIME ERROR | 0.00 s | details |
Code
#include <iostream>
#include <string>
int main(int argc, char **argv) {
int n, m;
std::cin >> n >> m;
if (n % 2 == 0 && m >=2) {
std::cout << std::string(m-1, 'R');
for (int row=1; row<n; row++) {
char c = (row % 2 != 0) ? 'L' : 'R';
std::cout << 'D' << std::string(m-2, c);
}
std::cout << 'L' << std::string(n-1, 'U') << std::endl;
} else if (n >= 2 && m % 2 == 0) {
std::cout << std::string(n-1, 'D');
for (int col=1; col<m; col++) {
char c = (col % 2 != 0) ? 'U' : 'D';
std::cout << 'R' << std::string(n-2, c);
}
std::cout << 'U' << std::string(m-1, 'L') << std::endl;
} else {
std::cout << "-1" << std::endl;
}
return 0;
}Test details
Test 1
Verdict: RUNTIME ERROR
| input |
|---|
| g fhe 395 a aa aafh ... |
| correct output |
|---|
| 10 |
| user output |
|---|
| RRRRRRRRRRRRRRRRRRRRRRRRRRRRRR... |
Error:
terminate called after throwing an instance of 'std::length_error' what(): basic_string::_M_create
Test 2
Verdict: RUNTIME ERROR
| input |
|---|
| s adh 372 a ad ae ... |
| correct output |
|---|
| 6 |
| user output |
|---|
| RRRRRRRRRRRRRRRRRRRRRRRRRRRRRR... |
Error:
terminate called after throwing an instance of 'std::length_error' what(): basic_string::_M_create
Test 3
Verdict: RUNTIME ERROR
| input |
|---|
| adcdb 20 a aa ab ... |
| correct output |
|---|
| 9 |
| user output |
|---|
| RRRRRRRRRRRRRRRRRRRRRRRRRRRRRR... |
Error:
terminate called after throwing an instance of 'std::length_error' what(): basic_string::_M_create
Test 4
Verdict: RUNTIME ERROR
| input |
|---|
| aaaaa 5 a aa aaa ... |
| correct output |
|---|
| 15 |
| user output |
|---|
| RRRRRRRRRRRRRRRRRRRRRRRRRRRRRR... |
Error:
terminate called after throwing an instance of 'std::length_error' what(): basic_string::_M_create
Test 5
Verdict: RUNTIME ERROR
| input |
|---|
| o zws 759 a ab abw ... |
| correct output |
|---|
| 8 |
| user output |
|---|
| RRRRRRRRRRRRRRRRRRRRRRRRRRRRRR... |
Error:
terminate called after throwing an instance of 'std::length_error' what(): basic_string::_M_create
Test 6
Verdict: RUNTIME ERROR
| input |
|---|
| aaaaa 5 a aa aaa ... |
| correct output |
|---|
| 15 |
| user output |
|---|
| RRRRRRRRRRRRRRRRRRRRRRRRRRRRRR... |
Error:
terminate called after throwing an instance of 'std::length_error' what(): basic_string::_M_create
Test 7
Verdict: RUNTIME ERROR
| input |
|---|
| ifv b 649 a aaw ac ... |
| correct output |
|---|
| 10 |
| user output |
|---|
| RRRRRRRRRRRRRRRRRRRRRRRRRRRRRR... |
Error:
terminate called after throwing an instance of 'std::length_error' what(): basic_string::_M_create
Test 8
Verdict: RUNTIME ERROR
| input |
|---|
| dbbdc 129 a aa aaab ... |
| correct output |
|---|
| 15 |
| user output |
|---|
| RRRRRRRRRRRRRRRRRRRRRRRRRRRRRR... |
Error:
terminate called after throwing an instance of 'std::length_error' what(): basic_string::_M_create
Test 9
Verdict: RUNTIME ERROR
| input |
|---|
| aaaaa 5 a aa aaa ... |
| correct output |
|---|
| 15 |
| user output |
|---|
| RRRRRRRRRRRRRRRRRRRRRRRRRRRRRR... |
Error:
terminate called after throwing an instance of 'std::length_error' what(): basic_string::_M_create
Test 10
Verdict: RUNTIME ERROR
| input |
|---|
| eeeab 9 a b c ... |
| correct output |
|---|
| 5 |
| user output |
|---|
| RRRRRRRRRRRRRRRRRRRRRRRRRRRRRR... |
Error:
terminate called after throwing an instance of 'std::length_error' what(): basic_string::_M_create
Test 11
Verdict: RUNTIME ERROR
| input |
|---|
| ghfhe d fd 430 a aa aafa ... |
| correct output |
|---|
| 22 |
| user output |
|---|
| RRRRRRRRRRRRRRRRRRRRRRRRRRRRRR... |
Error:
terminate called after throwing an instance of 'std::length_error' what(): basic_string::_M_create
Test 12
Verdict: RUNTIME ERROR
| input |
|---|
| syadhzdgck 275 a ad adh ... |
| correct output |
|---|
| 53 |
| user output |
|---|
| RRRRRRRRRRRRRRRRRRRRRRRRRRRRRR... |
Error:
terminate called after throwing an instance of 'std::length_error' what(): basic_string::_M_create
Test 13
Verdict: RUNTIME ERROR
| input |
|---|
| adcdbbbbba 256 a aa aaa ... |
| correct output |
|---|
| 49 |
| user output |
|---|
| RRRRRRRRRRRRRRRRRRRRRRRRRRRRRR... |
Error:
terminate called after throwing an instance of 'std::length_error' what(): basic_string::_M_create
Test 14
Verdict: RUNTIME ERROR
| input |
|---|
| aaaaaaaaaa 10 a aa aaa ... |
| correct output |
|---|
| 55 |
| user output |
|---|
| RRRRRRRRRRRRRRRRRRRRRRRRRRRRRR... |
Error:
terminate called after throwing an instance of 'std::length_error' what(): basic_string::_M_create
Test 15
Verdict: RUNTIME ERROR
| input |
|---|
| o zwspspfd 468 a adks afhsrhvwxn ... |
| correct output |
|---|
| 45 |
| user output |
|---|
| RRRRRRRRRRRRRRRRRRRRRRRRRRRRRR... |
Error:
terminate called after throwing an instance of 'std::length_error' what(): basic_string::_M_create
Test 16
Verdict: RUNTIME ERROR
| input |
|---|
| aaaaaaaaaa 10 a aa aaa ... |
| correct output |
|---|
| 55 |
| user output |
|---|
| RRRRRRRRRRRRRRRRRRRRRRRRRRRRRR... |
Error:
terminate called after throwing an instance of 'std::length_error' what(): basic_string::_M_create
Test 17
Verdict: RUNTIME ERROR
| input |
|---|
| i vbbjczpc 703 a aa abou ... |
| correct output |
|---|
| 29 |
| user output |
|---|
| RRRRRRRRRRRRRRRRRRRRRRRRRRRRRR... |
Error:
terminate called after throwing an instance of 'std::length_error' what(): basic_string::_M_create
Test 18
Verdict: RUNTIME ERROR
| input |
|---|
| d bdcbdbcb 128 a aa aab ... |
| correct output |
|---|
| 42 |
| user output |
|---|
| RRRRRRRRRRRRRRRRRRRRRRRRRRRRRR... |
Error:
terminate called after throwing an instance of 'std::length_error' what(): basic_string::_M_create
Test 19
Verdict: RUNTIME ERROR
| input |
|---|
| aaaaaaaaaa 10 a aa aaa ... |
| correct output |
|---|
| 55 |
| user output |
|---|
| RRRRRRRRRRRRRRRRRRRRRRRRRRRRRR... |
Error:
terminate called after throwing an instance of 'std::length_error' what(): basic_string::_M_create
Test 20
Verdict: RUNTIME ERROR
| input |
|---|
| eeeabcbabh 171 a aac aahg ... |
| correct output |
|---|
| 34 |
| user output |
|---|
| RRRRRRRRRRRRRRRRRRRRRRRRRRRRRR... |
Error:
terminate called after throwing an instance of 'std::length_error' what(): basic_string::_M_create
Test 21
Verdict: RUNTIME ERROR
| input |
|---|
| ghfhehdf ddciaicdehheefdihadaf... |
| correct output |
|---|
| 246 |
| user output |
|---|
| RRRRRRRRRRRRRRRRRRRRRRRRRRRRRR... |
Error:
terminate called after throwing an instance of 'std::length_error' what(): basic_string::_M_create
Test 22
Verdict: RUNTIME ERROR
| input |
|---|
| s adhzdgckekirkyowkirnflwfanrx... |
| correct output |
|---|
| 52 |
| user output |
|---|
| RRRRRRRRRRRRRRRRRRRRRRRRRRRRRR... |
Error:
terminate called after throwing an instance of 'std::length_error' what(): basic_string::_M_create
Test 23
Verdict: RUNTIME ERROR
| input |
|---|
| adcdbbbbbaaccabbbccd cabccacdb... |
| correct output |
|---|
| 178 |
| user output |
|---|
| RRRRRRRRRRRRRRRRRRRRRRRRRRRRRR... |
Error:
terminate called after throwing an instance of 'std::length_error' what(): basic_string::_M_create
Test 24
Verdict: RUNTIME ERROR
| input |
|---|
| aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa... |
| correct output |
|---|
| 2518 |
| user output |
|---|
| RRRRRRRRRRRRRRRRRRRRRRRRRRRRRR... |
Error:
terminate called after throwing an instance of 'std::length_error' what(): basic_string::_M_create
Test 25
Verdict: RUNTIME ERROR
| input |
|---|
| oezws spfdzfasgxlquafowjzpe pv... |
| correct output |
|---|
| 284 |
| user output |
|---|
| RRRRRRRRRRRRRRRRRRRRRRRRRRRRRR... |
Error:
terminate called after throwing an instance of 'std::length_error' what(): basic_string::_M_create
Test 26
Verdict: RUNTIME ERROR
| input |
|---|
| aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa... |
| correct output |
|---|
| 1387 |
| user output |
|---|
| RRRRRRRRRRRRRRRRRRRRRRRRRRRRRR... |
Error:
terminate called after throwing an instance of 'std::length_error' what(): basic_string::_M_create
Test 27
Verdict: RUNTIME ERROR
| input |
|---|
| ifvbbjczpcnpknimqvlttkngpe szx... |
| correct output |
|---|
| 258 |
| user output |
|---|
| RRRRRRRRRRRRRRRRRRRRRRRRRRRRRR... |
Error:
terminate called after throwing an instance of 'std::length_error' what(): basic_string::_M_create
Test 28
Verdict: RUNTIME ERROR
| input |
|---|
| dbbdcbdb bcaabb bccddbbbacbcdc... |
| correct output |
|---|
| 36 |
| user output |
|---|
| RRRRRRRRRRRRRRRRRRRRRRRRRRRRRR... |
Error:
terminate called after throwing an instance of 'std::length_error' what(): basic_string::_M_create
Test 29
Verdict: RUNTIME ERROR
| input |
|---|
| aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa... |
| correct output |
|---|
| 3076 |
| user output |
|---|
| RRRRRRRRRRRRRRRRRRRRRRRRRRRRRR... |
Error:
terminate called after throwing an instance of 'std::length_error' what(): basic_string::_M_create
Test 30
Verdict: RUNTIME ERROR
| input |
|---|
| e eabcbabhdbcbaddebchdiga ggfb... |
| correct output |
|---|
| 23 |
| user output |
|---|
| RRRRRRRRRRRRRRRRRRRRRRRRRRRRRR... |
Error:
terminate called after throwing an instance of 'std::length_error' what(): basic_string::_M_create
Test 31
Verdict: RUNTIME ERROR
| input |
|---|
| ghfhehdff dci icdehheefdih daf... |
| correct output |
|---|
| 248 |
| user output |
|---|
| RRRRRRRRRRRRRRRRRRRRRRRRRRRRRR... |
Error:
terminate called after throwing an instance of 'std::length_error' what(): basic_string::_M_create
Test 32
Verdict: RUNTIME ERROR
| input |
|---|
| s a hzdgckekirkyo kirnflw anrx... |
| correct output |
|---|
| 27 |
| user output |
|---|
| RRRRRRRRRRRRRRRRRRRRRRRRRRRRRR... |
Error:
terminate called after throwing an instance of 'std::length_error' what(): basic_string::_M_create
Test 33
Verdict: RUNTIME ERROR
| input |
|---|
| adcdbbb baac abbbcc c abccacd ... |
| correct output |
|---|
| 433 |
| user output |
|---|
| RRRRRRRRRRRRRRRRRRRRRRRRRRRRRR... |
Error:
terminate called after throwing an instance of 'std::length_error' what(): basic_string::_M_create
Test 34
Verdict: RUNTIME ERROR
| input |
|---|
| aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa... |
| correct output |
|---|
| 3427 |
| user output |
|---|
| RRRRRRRRRRRRRRRRRRRRRRRRRRRRRR... |
Error:
terminate called after throwing an instance of 'std::length_error' what(): basic_string::_M_create
Test 35
Verdict: RUNTIME ERROR
| input |
|---|
| oezwsp pf z asgxlquafowjzpekpv... |
| correct output |
|---|
| 359 |
| user output |
|---|
| RRRRRRRRRRRRRRRRRRRRRRRRRRRRRR... |
Error:
terminate called after throwing an instance of 'std::length_error' what(): basic_string::_M_create
Test 36
Verdict: RUNTIME ERROR
| input |
|---|
| aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa... |
| correct output |
|---|
| 2126 |
| user output |
|---|
| RRRRRRRRRRRRRRRRRRRRRRRRRRRRRR... |
Error:
terminate called after throwing an instance of 'std::length_error' what(): basic_string::_M_create
Test 37
Verdict: RUNTIME ERROR
| input |
|---|
| ifvbbjczpcnpk imqvlttkngpeqszx... |
| correct output |
|---|
| 395 |
| user output |
|---|
| RRRRRRRRRRRRRRRRRRRRRRRRRRRRRR... |
Error:
terminate called after throwing an instance of 'std::length_error' what(): basic_string::_M_create
Test 38
Verdict: RUNTIME ERROR
| input |
|---|
| dbbdcbd cbcaabbabccddbb acbcdc... |
| correct output |
|---|
| 242 |
| user output |
|---|
| RRRRRRRRRRRRRRRRRRRRRRRRRRRRRR... |
Error:
terminate called after throwing an instance of 'std::length_error' what(): basic_string::_M_create
Test 39
Verdict: RUNTIME ERROR
| input |
|---|
| aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa... |
| correct output |
|---|
| 4287 |
| user output |
|---|
| RRRRRRRRRRRRRRRRRRRRRRRRRRRRRR... |
Error:
terminate called after throwing an instance of 'std::length_error' what(): basic_string::_M_create
Test 40
Verdict: RUNTIME ERROR
| input |
|---|
| eeeabcbabhd cb ddebchdigaiggfb... |
| correct output |
|---|
| 15 |
| user output |
|---|
| RRRRRRRRRRRRRRRRRRRRRRRRRRRRRR... |
Error:
terminate called after throwing an instance of 'std::length_error' what(): basic_string::_M_create
Test 41
Verdict: RUNTIME ERROR
| input |
|---|
| ghfhehdffdd i icdehheefd hadaf... |
| correct output |
|---|
| 431 |
| user output |
|---|
| RRRRRRRRRRRRRRRRRRRRRRRRRRRRRR... |
Error:
terminate called after throwing an instance of 'std::length_error' what(): basic_string::_M_create
Test 42
Verdict: RUNTIME ERROR
| input |
|---|
| syadhzdgckekirkyow irnflwfanrx... |
| correct output |
|---|
| 8039 |
| user output |
|---|
| RRRRRRRRRRRRRRRRRRRRRRRRRRRRRR... |
Error:
terminate called after throwing an instance of 'std::length_error' what(): basic_string::_M_create
Test 43
Verdict: RUNTIME ERROR
| input |
|---|
| adcdbbbbbaaccabb ccdccabcc cdb... |
| correct output |
|---|
| 9409 |
| user output |
|---|
| RRRRRRRRRRRRRRRRRRRRRRRRRRRRRR... |
Error:
terminate called after throwing an instance of 'std::length_error' what(): basic_string::_M_create
Test 44
Verdict: RUNTIME ERROR
| input |
|---|
| aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa... |
| correct output |
|---|
| 168696 |
| user output |
|---|
| RRRRRRRRRRRRRRRRRRRRRRRRRRRRRR... |
Error:
terminate called after throwing an instance of 'std::length_error' what(): basic_string::_M_create
