Submission #7517725


Source Code Expand

Copy
#define _CRT_SECURE_NO_WARNINGS
#define _USE_MATH_DEFINES
#include <algorithm>
#include <string>
#include <iostream>
#include <complex>
#include <ctime>
#include <cmath>
#include <cstdio>
#include <stack>
#include <map>
#include <list>
#include <queue>
#include <deque>
#include <random>
#include <set>
#include <vector>
#include <unordered_map>
#include <bitset>
#include <unordered_set>
#include <array>
#include <forward_list>
#include <chrono>
#include <iomanip>
#include <utility>
#include <cassert>

#pragma GCC optimize("Ofast")
#pragma target("sse", "sse1")

#define mp make_pair
#define pb push_back

using namespace std;
typedef long long ll;
typedef long double ld;
typedef unsigned long long ull;

mt19937 gen(34);

string s;

int main()
{
#ifdef _DEBUG
	freopen("input.txt", "r", stdin);
	//freopen("output.txt", "w", stdout);
#else
	//freopen("memory.in", "r", stdin);
	//freopen("memory.out", "w", stdout);
#endif
	ios_base::sync_with_stdio(false);
	cin.tie(0);
	cin >> s;
	bool ch = true;
	for (int i = 0; i < s.length(); i+=2)
		ch &= (s[i] == 'R' || s[i] == 'U' || s[i] == 'D');
	for (int i = 1; i < s.length(); i+=2)
		ch &= (s[i] == 'L' || s[i] == 'U' || s[i] == 'D');
	if (ch)
		cout << "Yes";
	else
		cout << "No";
	return 0;
}

Submission Info

Submission Time
Task B - Tap Dance
User SHAMPINION
Language C++14 (GCC 5.4.1)
Score 200
Code Size 1313 Byte
Status AC
Exec Time 1 ms
Memory 256 KB

Judge Result

Set Name Sample Subtask1
Score / Max Score 0 / 0 200 / 200
Status
AC × 5
AC × 20
Set Name Test Cases
Sample sample_01.txt, sample_02.txt, sample_03.txt, sample_04.txt, sample_05.txt
Subtask1 sample_01.txt, sample_02.txt, sample_03.txt, sample_04.txt, sample_05.txt, sub1_01.txt, sub1_02.txt, sub1_03.txt, sub1_04.txt, sub1_05.txt, sub1_06.txt, sub1_07.txt, sub1_08.txt, sub1_09.txt, sub1_10.txt, sub1_11.txt, sub1_12.txt, sub1_13.txt, sub1_14.txt, sub1_15.txt
Case Name Status Exec Time Memory
sample_01.txt AC 1 ms 256 KB
sample_02.txt AC 1 ms 256 KB
sample_03.txt AC 1 ms 256 KB
sample_04.txt AC 1 ms 256 KB
sample_05.txt AC 1 ms 256 KB
sub1_01.txt AC 1 ms 256 KB
sub1_02.txt AC 1 ms 256 KB
sub1_03.txt AC 1 ms 256 KB
sub1_04.txt AC 1 ms 256 KB
sub1_05.txt AC 1 ms 256 KB
sub1_06.txt AC 1 ms 256 KB
sub1_07.txt AC 1 ms 256 KB
sub1_08.txt AC 1 ms 256 KB
sub1_09.txt AC 1 ms 256 KB
sub1_10.txt AC 1 ms 256 KB
sub1_11.txt AC 1 ms 256 KB
sub1_12.txt AC 1 ms 256 KB
sub1_13.txt AC 1 ms 256 KB
sub1_14.txt AC 1 ms 256 KB
sub1_15.txt AC 1 ms 256 KB