QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#448428 | #8687. Toy Train Tracks | james1BadCreeper# | WA | 1ms | 3700kb | C++17 | 1.3kb | 2024-06-19 16:45:04 | 2024-06-19 16:45:04 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
int n, m;
int main(void) {
cin >> n >> m;
if (n % 2) --n;
if (m % 2) --m;
if (n == 0) {
if (m % 4 == 2) m -= 2;
if (m == 8) m = 4;
if (m == 4) cout << "RRRR\n";
else {
cout << "RLRR";
for (int i = 1; i <= (m - 8) / 4; ++i) cout << "LR";
cout << "RLRR";
for (int i = 1; i <= (m - 8) / 4; ++i) cout << "LR";
cout << "\n";
}
return 0;
}
if (m % 4 == 2) {
// cout << "L";
int op = n / 2;
for (int i = 1; i <= op; ++i) cout << "S";
cout << "L";
cout << "S";
cout << "L";
for (int i = 1; i < op; ++i) cout << "S";
for (int i = 1; i <= (m - 6) / 4; ++i) cout << "RL";
cout << "LRLL";
for (int i = 1; i <= (m - 6) / 4; ++i) cout << "RL";
cout << "\n";
return 0;
}
int op = n / 2;
for (int i = 1; i < op; ++i) cout << "S";
cout << "L";
cout << "SS";
cout << "L";
for (int i = 1; i < op; ++i) cout << "S";
for (int i = 1; i <= (m - 6) / 4; ++i) cout << "RL";
cout << "LRLL";
for (int i = 1; i <= (m - 6) / 4; ++i) cout << "RL";
cout << "\n";
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 1ms
memory: 3544kb
input:
0 4
output:
RRRR
result:
ok correct, length = 4
Test #2:
score: 0
Accepted
time: 0ms
memory: 3700kb
input:
1 4
output:
RRRR
result:
ok correct, length = 4
Test #3:
score: -100
Wrong Answer
time: 0ms
memory: 3700kb
input:
2 4
output:
LSSLLRLL
result:
wrong answer your loop is not closed