Submission #844392


Source Code Expand

Copy
#include <cstdio>
#include <cstring>
using namespace std;

const int N = 1000500;

char buf[N];
bool was[256];

int main() {
    gets(buf);
    int n = strlen(buf);
    for (int i = 0; i < n; i++) {
        was[buf[i]] = true;
    }
    bool ans = was['N'] == was['S'] && was['E'] == was['W'];
    puts(ans ? "Yes" : "No");
}

Submission Info

Submission Time
Task A - Wanna go back home
User Zlobober
Language C++14 (GCC 5.4.1)
Score 0
Code Size 344 Byte
Status CE

Compile Error

./Main.cpp: In function ‘int main()’:
./Main.cpp:11:13: error: ‘gets’ was not declared in this scope
     gets(buf);
             ^