Submission #137987


Source Code Expand

#include<cstdio>
#include<algorithm>
#include<stack>
#include<queue>
#include<vector>
#include<string>
#include<string.h>
#include<cstdlib>
#include<ctime>
#include<cmath>
#include<complex>
#include<map>
#include<set>
#include<bitset>
#include<iostream>
#include<sstream>
#define fi first
#define se second
#define rep(i,n) for(int i = 0; i < n; i++)
#define rrep(i,n) for(int i = 1; i <= n; i++)
#define drep(i,n) for(int i = n-1; i >= 0; i--)
#define gep(i,g,j) for(int i = g.head[j]; i != -1; i = g.e[i].next)
#define each(it,c) for(__typeof((c).begin()) it=(c).begin();it!=(c).end();it++)
#define rng(a) a.begin(),a.end()
#define maxs(x,y) x = max(x,y);
#define mins(x,y) x = min(x,y);
#define pb push_back
#define sz(x) (int)(x).size()
#define popcount __builtin_popcount
#define snuke srand((unsigned)clock()+(unsigned)time(NULL))
using namespace std;
typedef long long int ll;
typedef pair<int,int> P;
typedef vector<int> vi;

const int MX = 100005, INF = 1000000000;
const ll LINF = 1000000000000000000ll;
const double eps = 1e-10;
const int dx[] = {-1,0,1,0}, dy[] = {0,-1,0,1}; //<^>v

string s[5];

int f(char c){
	if(s[0].find(c) != string::npos) return 0;
	if(c != 'B') return 1;
	return 2;
}

int main(){
	s[0] = "CEFGHIJKLMNSTUVWXYZ";
	s[1] = "ADOPQR";
	s[2] = "B";
	
	string t;
	cin >> t;
	
	bool ok = true;
	if(f(t[0]) != 0) ok = false;
	if(f(t[1]) != 0) ok = false;
	if(f(t[2]) != 1) ok = false;
	if(f(t[3]) != 0) ok = false;
	
	string ans = "yes";
	if(!ok) ans = "no";
	cout << ans << endl;
	
	return 0;
}




Submission Info

Submission Time
Task A - UTPC
User snuke
Language C++ (G++ 4.6.4)
Score 100
Code Size 1601 Byte
Status AC
Exec Time 23 ms
Memory 920 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 22 ms 796 KB
00-sample-01 AC 22 ms 912 KB
00-sample-02 AC 19 ms 792 KB
10-yes-00 AC 21 ms 792 KB
10-yes-01 AC 21 ms 912 KB
10-yes-02 AC 20 ms 912 KB
10-yes-03 AC 21 ms 788 KB
10-yes-04 AC 22 ms 916 KB
10-yes-05 AC 21 ms 804 KB
10-yes-06 AC 22 ms 792 KB
10-yes-07 AC 22 ms 796 KB
10-yes-08 AC 22 ms 912 KB
10-yes-09 AC 21 ms 912 KB
20-all-00 AC 23 ms 864 KB
20-all-01 AC 22 ms 920 KB
20-all-02 AC 22 ms 796 KB
20-all-03 AC 22 ms 916 KB
20-all-04 AC 22 ms 796 KB
20-all-05 AC 21 ms 916 KB
20-all-06 AC 22 ms 792 KB
20-all-07 AC 22 ms 920 KB
20-all-08 AC 22 ms 916 KB
20-all-09 AC 22 ms 792 KB
20-all-10 AC 21 ms 792 KB
20-all-11 AC 22 ms 796 KB
20-all-12 AC 23 ms 856 KB
20-all-13 AC 22 ms 920 KB
20-all-14 AC 22 ms 796 KB
20-all-15 AC 20 ms 804 KB
20-all-16 AC 19 ms 920 KB
20-all-17 AC 21 ms 908 KB
20-all-18 AC 21 ms 916 KB
20-all-19 AC 22 ms 916 KB
20-all-20 AC 19 ms 916 KB
20-all-21 AC 20 ms 784 KB
20-all-22 AC 20 ms 920 KB
20-all-23 AC 19 ms 792 KB
20-all-24 AC 19 ms 916 KB
20-all-25 AC 19 ms 788 KB
20-all-26 AC 21 ms 916 KB
20-all-27 AC 21 ms 920 KB
20-all-28 AC 22 ms 920 KB
20-all-29 AC 23 ms 792 KB
30-hand-00 AC 23 ms 804 KB
30-hand-01 AC 20 ms 916 KB