Submission #1688193


Source Code Expand

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

#include "stdafx.h"
#include <iostream>
#include <memory>


int main()
{
	bool n = false, s = false, w = false, e = false;
	while(int c = std::cin.get())
	{
		if (c == EOF)break;
		switch (c)
		{
		case 'N':
			n = true;
			break;
		case 'S':
			s = true;
			break;
		case 'W':
			w = true;
			break;
		case 'E':
			e = true;
			break;
		}
	}

	if (n && s && !e && !w || n && s && e && w || !n && !w && e & w)
	{
		std::cout << "Yes";
	}
	else
	{
		std::cout << "No";
	}

    return 0;
}

Submission Info

Submission Time
Task A - Wanna go back home
User KageShiron
Language C++14 (Clang 3.8.0)
Score 0
Code Size 655 Byte
Status CE

Compile Error

./Main.cpp:4:10: fatal error: 'stdafx.h' file not found
#include "stdafx.h"
         ^
1 error generated.