Submission #7517099


Source Code Expand

Copy
import java.util.*;
import java.lang.*;



public class Main {
    static boolean isGoodDance(String dance){
        for(int i=0; i<dance.length(); i++){
            if(i%2==0 && dance.charAt(i)=='L') return false;
            if(i%2==1 && dance.charAt(i)=='R') return false;
        }
        return true;
    }
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        String dance = sc.next();
        System.out.println(isGoodDance(dance) ? "Yes" : "No");

    }
}

Submission Info

Submission Time
Task B - Tap Dance
User NASU41
Language Java8 (OpenJDK 1.8.0)
Score 200
Code Size 528 Byte
Status AC
Exec Time 138 ms
Memory 23636 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 88 ms 19284 KB
sample_02.txt AC 88 ms 21844 KB
sample_03.txt AC 88 ms 19284 KB
sample_04.txt AC 88 ms 19924 KB
sample_05.txt AC 90 ms 21712 KB
sub1_01.txt AC 87 ms 18512 KB
sub1_02.txt AC 89 ms 21332 KB
sub1_03.txt AC 90 ms 21588 KB
sub1_04.txt AC 90 ms 21332 KB
sub1_05.txt AC 87 ms 20692 KB
sub1_06.txt AC 138 ms 21204 KB
sub1_07.txt AC 88 ms 19284 KB
sub1_08.txt AC 87 ms 23636 KB
sub1_09.txt AC 89 ms 20692 KB
sub1_10.txt AC 88 ms 20688 KB
sub1_11.txt AC 88 ms 16980 KB
sub1_12.txt AC 89 ms 17108 KB
sub1_13.txt AC 88 ms 20560 KB
sub1_14.txt AC 90 ms 19668 KB
sub1_15.txt AC 89 ms 21204 KB