Submission #3026698


Source Code Expand

//#include <bits/stdc++.h>
//#include <stdio.h>
#include<iostream>
#include<cstdio>
#include<bitset>
#include<algorithm>
#include<vector>
#include<list>
#include<queue>
#include<stack>
#include<string>
#include<string.h>
#include<cmath>
#include<utility>
#include<functional>
#include<map>
#include<set>
#include<cctype>
#include<fstream>


#define FOR(i, a, b) for( int i=(a);i<=(b);i++)
#define RFOR(i, a, b) for( int i=(a);i>=(b);i--)
#define LFOR(i, a, b) for( long long int i=(a);i<=(b);i++)
#define LRFOR(i, a, b) for(long long int i=(a);i>=(b);i--)
#define MOD 1000000007
#define INF 1000000000 //2000000000
#define LLINF 1000000000000000000 //9000000000000000000
#define PI 3.14159265358979
#define MAXI 7500000

using namespace std;
typedef long long int ll;
typedef pair< long long int, long long  int> P;
typedef string::const_iterator State;

int dy[5] = { 0,0,1,-1,0 };
int dx[5] = { 1,-1,0,0 ,0 };




int main(void) {
	
	string s;
	bool flag = true;

	cin >> s;

	FOR(i, 0, 3) {
		if (i == 2) {
			switch (s[i]) {
			case 'A':
			case 'D':
			case 'O':
			case 'P':
			case 'Q':
			case 'R':
				break;
			default:
				flag = false;
			}
		}
		else {
			switch (s[i]) {
			case 'A':
			case 'D':
			case 'O':
			case 'P':
			case 'Q':
			case 'R':
			case 'B':
				flag = false;
			default:
				break;
			}
		}
	}

	if (flag) {
		cout << "yes" << endl;
	}
	else {
		cout << "no" << endl;
	}


	return 0;
}

Submission Info

Submission Time
Task A - UTPC
User yukiteru
Language C++14 (GCC 5.4.1)
Score 100
Code Size 1508 Byte
Status AC
Exec Time 1 ms
Memory 256 KB

Judge Result

Set Name All
Score / Max Score 100 / 100
Status
AC × 45
Set Name Test Cases
All 00-sample-00, 00-sample-01, 00-sample-02, 10-yes-00, 10-yes-01, 10-yes-02, 10-yes-03, 10-yes-04, 10-yes-05, 10-yes-06, 10-yes-07, 10-yes-08, 10-yes-09, 20-all-00, 20-all-01, 20-all-02, 20-all-03, 20-all-04, 20-all-05, 20-all-06, 20-all-07, 20-all-08, 20-all-09, 20-all-10, 20-all-11, 20-all-12, 20-all-13, 20-all-14, 20-all-15, 20-all-16, 20-all-17, 20-all-18, 20-all-19, 20-all-20, 20-all-21, 20-all-22, 20-all-23, 20-all-24, 20-all-25, 20-all-26, 20-all-27, 20-all-28, 20-all-29, 30-hand-00, 30-hand-01
Case Name Status Exec Time Memory
00-sample-00 AC 1 ms 256 KB
00-sample-01 AC 1 ms 256 KB
00-sample-02 AC 1 ms 256 KB
10-yes-00 AC 1 ms 256 KB
10-yes-01 AC 1 ms 256 KB
10-yes-02 AC 1 ms 256 KB
10-yes-03 AC 1 ms 256 KB
10-yes-04 AC 1 ms 256 KB
10-yes-05 AC 1 ms 256 KB
10-yes-06 AC 1 ms 256 KB
10-yes-07 AC 1 ms 256 KB
10-yes-08 AC 1 ms 256 KB
10-yes-09 AC 1 ms 256 KB
20-all-00 AC 1 ms 256 KB
20-all-01 AC 1 ms 256 KB
20-all-02 AC 1 ms 256 KB
20-all-03 AC 1 ms 256 KB
20-all-04 AC 1 ms 256 KB
20-all-05 AC 1 ms 256 KB
20-all-06 AC 1 ms 256 KB
20-all-07 AC 1 ms 256 KB
20-all-08 AC 1 ms 256 KB
20-all-09 AC 1 ms 256 KB
20-all-10 AC 1 ms 256 KB
20-all-11 AC 1 ms 256 KB
20-all-12 AC 1 ms 256 KB
20-all-13 AC 1 ms 256 KB
20-all-14 AC 1 ms 256 KB
20-all-15 AC 1 ms 256 KB
20-all-16 AC 1 ms 256 KB
20-all-17 AC 1 ms 256 KB
20-all-18 AC 1 ms 256 KB
20-all-19 AC 1 ms 256 KB
20-all-20 AC 1 ms 256 KB
20-all-21 AC 1 ms 256 KB
20-all-22 AC 1 ms 256 KB
20-all-23 AC 1 ms 256 KB
20-all-24 AC 1 ms 256 KB
20-all-25 AC 1 ms 256 KB
20-all-26 AC 1 ms 256 KB
20-all-27 AC 1 ms 256 KB
20-all-28 AC 1 ms 256 KB
20-all-29 AC 1 ms 256 KB
30-hand-00 AC 1 ms 256 KB
30-hand-01 AC 1 ms 256 KB