QOJ.ac

QOJ

IDSubmission IDProblemHackerOwnerResultSubmit timeJudge time
#1125#239536#8981. Kangaroo PuzzlequailtyKhyalLinFailed.2024-11-05 18:05:292024-11-05 18:05:29

Details

Extra Test:

Accepted
time: 1ms
memory: 3548kb

input:

20 20
11111101111101111101
10010110010110010111
01011011011011011001
11101101101101101101
10110110110110110110
11011011011011011011
01101101101101101101
10110110110110110111
10011011011011011001
11101101101101101101
10110110110110110110
11011011011011011011
01101101101101101101
10110110110110110111
...

output:

DDRDDRUUUDUDUDLURDLRDDLUURRRDDLULUDRRRRRLRDLLRLUDRRULUULRUULDLLRDURLRDLUDRDRDRUUDRLRULURLULUDDRUDDLLLDDRLUDURDUDDLLDRDLUDDUULUURDDLRURDDRLDDRDULUDRRULRDRURUURUDLLDDUUURLDLLUDDUUDRURRDDRLRRLRLDURUUUURLDUDRDLRDRRDDDLULDRURDLDDLDDLRLDLDLUUDURLRLRLDRDLRDULRDUULDLUUULDLDDRDLULRRDLDUDLDRRLLRDDLRDLRURUDDRU...

result:

ok AC

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#239536#8981. Kangaroo PuzzleKhyalLinWA 1ms3684kbC++14229b2023-11-04 21:09:452024-11-05 18:07:55

answer

#include <iostream>
#include <cstdlib>

using namespace std;

int main(void)
{
    char s[] = { 'U', 'L', 'D', 'R' };
    srand(rand());
    for (int i = 0; i < 5e4; i++)
        cout << s[rand() % 4];
    return 0;
}