QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#294172 | #6431. Oops, It's Yesterday Twice More | georgeyucjr# | AC ✓ | 1ms | 3624kb | C++23 | 1.5kb | 2023-12-30 09:02:31 | 2023-12-30 09:02:32 |
Judging History
answer
# include <bits/stdc++.h>
using namespace std;
# define ll long long
# define ull unsigned long long
# define rep(i, f, t, ...) for (int i = f, ##__VA_ARGS__; i <= t; ++i)
# define red(i, f, t, ...) for (int i = f, ##__VA_ARGS__; i >= t; --i)
# define emb emplace_back
# define pb push_back
# define pii pair<int, int>
# define mkp make_pair
# define arr3 array<int, 3>
# define arr4 array<int, 4>
# define FILEIO(filename) freopen (filename".in", "r", stdin), freopen (filename ".out", "w", stdout)
# define N
bool Mst;
int n, a, b;
bool Med;
signed main() {
ios_base :: sync_with_stdio ( false ), cin.tie ( nullptr ), cout.tie (nullptr);
cin >> n >> a >> b;
if ( a <= n / 2 && b <= n / 2) {
rep (i, 1, n - 1) cout << "UL";
rep (i, 1, a - 1) cout << "D";
rep (i, 1, b - 1) cout << "R";
} else if ( a <= n / 2 && b > n / 2 ) {
rep (i, 1, n - 1) cout << "UR";
rep (i, 1, a - 1) cout << "D";
rep (i, 1, n - b) cout << "L";
} else if ( a > n / 2 && b <= n / 2 ) {
rep (i, 1, n - 1) cout << "LD";
rep (i, 1, n - a) cout << "U";
rep (i, 1, b - 1) cout << "R";
} else {
rep (i, 1, n - 1) cout << "DR";
rep (i, 1, n - a) cout << "U";
rep (i, 1, n - b) cout << "L";
}
cout << endl;
# ifdef MACOS
cerr << "Memory & Time Information : " << endl;
cerr << "Memory : " << ( ( &Med ) - ( &Mst ) ) * 1. / 1024. / 1024. << "MB" << endl;
cerr << "Time : " << clock ( ) * 1. / CLOCKS_PER_SEC * 1000. << "ms" << endl;
# endif
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 0ms
memory: 3448kb
input:
3 3 3
output:
DRDR
result:
ok n=3, x=3, y=3
Test #2:
score: 0
Accepted
time: 0ms
memory: 3392kb
input:
4 3 2
output:
LDLDLDUR
result:
ok n=4, x=3, y=2
Test #3:
score: 0
Accepted
time: 0ms
memory: 3396kb
input:
2 1 1
output:
UL
result:
ok n=2, x=1, y=1
Test #4:
score: 0
Accepted
time: 0ms
memory: 3452kb
input:
500 250 250
output:
ULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULUL...
result:
ok n=500, x=250, y=250
Test #5:
score: 0
Accepted
time: 0ms
memory: 3612kb
input:
500 250 249
output:
ULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULUL...
result:
ok n=500, x=250, y=249
Test #6:
score: 0
Accepted
time: 0ms
memory: 3340kb
input:
500 250 251
output:
URURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURUR...
result:
ok n=500, x=250, y=251
Test #7:
score: 0
Accepted
time: 1ms
memory: 3392kb
input:
500 251 251
output:
DRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDR...
result:
ok n=500, x=251, y=251
Test #8:
score: 0
Accepted
time: 1ms
memory: 3448kb
input:
500 251 249
output:
LDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLD...
result:
ok n=500, x=251, y=249
Test #9:
score: 0
Accepted
time: 1ms
memory: 3400kb
input:
500 249 249
output:
ULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULUL...
result:
ok n=500, x=249, y=249
Test #10:
score: 0
Accepted
time: 1ms
memory: 3400kb
input:
499 250 250
output:
DRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDR...
result:
ok n=499, x=250, y=250
Test #11:
score: 0
Accepted
time: 0ms
memory: 3396kb
input:
499 251 249
output:
LDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLD...
result:
ok n=499, x=251, y=249
Test #12:
score: 0
Accepted
time: 0ms
memory: 3448kb
input:
499 251 251
output:
DRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDR...
result:
ok n=499, x=251, y=251
Test #13:
score: 0
Accepted
time: 1ms
memory: 3444kb
input:
499 250 249
output:
LDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLD...
result:
ok n=499, x=250, y=249
Test #14:
score: 0
Accepted
time: 0ms
memory: 3400kb
input:
3 2 2
output:
DRDRUL
result:
ok n=3, x=2, y=2
Test #15:
score: 0
Accepted
time: 0ms
memory: 3388kb
input:
4 1 4
output:
URURUR
result:
ok n=4, x=1, y=4
Test #16:
score: 0
Accepted
time: 0ms
memory: 3440kb
input:
4 4 1
output:
LDLDLD
result:
ok n=4, x=4, y=1
Test #17:
score: 0
Accepted
time: 0ms
memory: 3624kb
input:
300 1 300
output:
URURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURUR...
result:
ok n=300, x=1, y=300
Test #18:
score: 0
Accepted
time: 0ms
memory: 3396kb
input:
400 300 200
output:
LDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLD...
result:
ok n=400, x=300, y=200
Test #19:
score: 0
Accepted
time: 0ms
memory: 3624kb
input:
400 400 400
output:
DRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDR...
result:
ok n=400, x=400, y=400
Test #20:
score: 0
Accepted
time: 0ms
memory: 3396kb
input:
350 350 1
output:
LDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLD...
result:
ok n=350, x=350, y=1
Test #21:
score: 0
Accepted
time: 0ms
memory: 3404kb
input:
278 123 54
output:
ULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULUL...
result:
ok n=278, x=123, y=54
Test #22:
score: 0
Accepted
time: 0ms
memory: 3452kb
input:
389 98 178
output:
ULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULUL...
result:
ok n=389, x=98, y=178
Test #23:
score: 0
Accepted
time: 0ms
memory: 3624kb
input:
490 1 1
output:
ULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULUL...
result:
ok n=490, x=1, y=1
Test #24:
score: 0
Accepted
time: 0ms
memory: 3448kb
input:
500 500 500
output:
DRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDR...
result:
ok n=500, x=500, y=500
Test #25:
score: 0
Accepted
time: 0ms
memory: 3456kb
input:
500 1 1
output:
ULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULUL...
result:
ok n=500, x=1, y=1
Test #26:
score: 0
Accepted
time: 0ms
memory: 3452kb
input:
378 2 270
output:
URURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURUR...
result:
ok n=378, x=2, y=270
Test #27:
score: 0
Accepted
time: 0ms
memory: 3580kb
input:
476 3 377
output:
URURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURUR...
result:
ok n=476, x=3, y=377
Test #28:
score: 0
Accepted
time: 0ms
memory: 3444kb
input:
438 348 4
output:
LDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLD...
result:
ok n=438, x=348, y=4
Test #29:
score: 0
Accepted
time: 0ms
memory: 3448kb
input:
456 456 12
output:
LDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLD...
result:
ok n=456, x=456, y=12
Test #30:
score: 0
Accepted
time: 0ms
memory: 3392kb
input:
499 12 23
output:
ULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULUL...
result:
ok n=499, x=12, y=23
Test #31:
score: 0
Accepted
time: 1ms
memory: 3452kb
input:
500 500 1
output:
LDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLD...
result:
ok n=500, x=500, y=1