Submission #1231609


Source Code Expand

// jag2016secretspring A C++.cpp : コンソール アプリケーションのエントリ ポイントを定義します。
//

#include "stdafx.h"
#include<string>
#include<algorithm>
#include<iostream>
#include<cstdio>
using namespace std;

int main()
{
	int n;
	cin >> n;
	int a = 0; int un = 0;
	for (int i = 0; i < n; i++) {
		string s;
		cin >> s;
		if (s == "A") { a++; }
		else if (s == "Un") { un++; }
		if (un > a) {
			cout << "NO";
			break;
		}
		if (i == n - 1) {
			if (a == un) { cout << "YES"; }
			else { cout << "NO"; }
		}
	}cout << endl;
	return 0;
}

Submission Info

Submission Time
Task A - 阿吽の呼吸
User rayhotate
Language C++14 (GCC 5.4.1)
Score 0
Code Size 602 Byte
Status CE

Compile Error

./Main.cpp:4:20: fatal error: stdafx.h: No such file or directory
 #include "stdafx.h"
                    ^
compilation terminated.