Submission #20299995


Source Code Expand

Copy
import std.conv, std.functional, std.range, std.stdio, std.string;
import std.algorithm, std.array, std.bigint, std.bitmanip, std.complex, std.container, std.math, std.mathspecial, std.numeric, std.regex, std.typecons;
import core.bitop;

class EOFException : Throwable { this() { super("EOF"); } }
string[] tokens;
string readToken() { for (; tokens.empty; ) { if (stdin.eof) { throw new EOFException; } tokens = readln.split; } auto token = tokens.front; tokens.popFront; return token; }
int readInt() { return readToken.to!int; }
long readLong() { return readToken.to!long; }
real readReal() { return readToken.to!real; }

bool chmin(T)(ref T t, in T f) { if (t > f) { t = f; return true; } else { return false; } }
bool chmax(T)(ref T t, in T f) { if (t < f) { t = f; return true; } else { return false; } }

int binarySearch(alias pred, T)(in T[] as) { int lo = -1, hi = cast(int)(as.length); for (; lo + 1 < hi; ) { const mid = (lo + hi) >> 1; (unaryFun!pred(as[mid]) ? hi : lo) = mid; } return hi; }
int lowerBound(T)(in T[] as, T val) { return as.binarySearch!(a => (a >= val)); }
int upperBound(T)(in T[] as, T val) { return as.binarySearch!(a => (a > val)); }




void main() {
  try {
    for (; ; ) {
      const S = readToken();
      
      bool ans = true;
      foreach (i, c; S) {
        if (i % 2 == 0) {
          ans = ans && ('a' <= c && c <= 'z');
        } else {
          ans = ans && ('A' <= c && c <= 'Z');
        }
      }
      writeln(ans ? "Yes" : "No");
    }
  } catch (EOFException e) {
  }
}

Submission Info

Submission Time
Task B - uNrEaDaBlE sTrInG
User hos_lyric
Language D (LDC 1.20.1)
Score 200
Code Size 1568 Byte
Status AC
Exec Time 9 ms
Memory 3380 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 200 / 200
Status
AC × 3
AC × 26
Set Name Test Cases
Sample sample_01.txt, sample_02.txt, sample_03.txt
All hand_01.txt, no2_01.txt, no2_02.txt, no_01.txt, no_02.txt, no_03.txt, no_04.txt, no_05.txt, no_06.txt, no_07.txt, no_08.txt, no_09.txt, no_10.txt, sample_01.txt, sample_02.txt, sample_03.txt, yes_01.txt, yes_02.txt, yes_03.txt, yes_04.txt, yes_05.txt, yes_06.txt, yes_07.txt, yes_08.txt, yes_09.txt, yes_10.txt
Case Name Status Exec Time Memory
hand_01.txt AC 9 ms 3224 KB
no2_01.txt AC 4 ms 3276 KB
no2_02.txt AC 3 ms 3292 KB
no_01.txt AC 5 ms 3220 KB
no_02.txt AC 5 ms 3180 KB
no_03.txt AC 3 ms 3372 KB
no_04.txt AC 3 ms 3224 KB
no_05.txt AC 3 ms 3336 KB
no_06.txt AC 4 ms 3164 KB
no_07.txt AC 4 ms 3364 KB
no_08.txt AC 3 ms 3104 KB
no_09.txt AC 4 ms 3184 KB
no_10.txt AC 5 ms 3276 KB
sample_01.txt AC 7 ms 3288 KB
sample_02.txt AC 4 ms 3184 KB
sample_03.txt AC 3 ms 3280 KB
yes_01.txt AC 3 ms 3224 KB
yes_02.txt AC 3 ms 3380 KB
yes_03.txt AC 7 ms 3328 KB
yes_04.txt AC 4 ms 3168 KB
yes_05.txt AC 3 ms 3100 KB
yes_06.txt AC 3 ms 3100 KB
yes_07.txt AC 3 ms 3212 KB
yes_08.txt AC 3 ms 3220 KB
yes_09.txt AC 4 ms 3220 KB
yes_10.txt AC 3 ms 3220 KB