Contest Duration: - (local time) (110 minutes) Back to Home

Submission #846749

Source Code Expand

Copy
```#include <bits/stdc++.h>
// iostream is too mainstream
#include <cstdio>
#include <iostream>
#include <algorithm>
#include <cstdlib>
#include <vector>
#include <set>
#include <map>
#include <queue>
#include <stack>
#include <list>
#include <cmath>
#include <iomanip>
#include <time.h>
#define dibs reserve
#define OVER9000 1234567890
#define ALL_THE(CAKE,LIE) for(auto LIE =CAKE.begin(); LIE != CAKE.end(); LIE++)
#define tisic 47
#define soclose 1e-8
#define chocolate win
// so much chocolate
#define patkan 9
#define ff first
#define ss second
#define abs(x) ((x < 0)?-(x):x)
#define uint unsigned int
#define dbl long double
#define pi 3.14159265358979323846
using namespace std;
// mylittledoge

#ifdef DONLINE_JUDGE
// palindromic tree is better than splay tree!
#define lld I64d
#endif

int main() {
cin.sync_with_stdio(0);
cin.tie(0);
cout << fixed << setprecision(10);
string S;
cin >> S;
set<char> s;
ALL_THE(S,it) s.insert(*it);
if(s.count('N') || s.count('S'))
if(s.count('N') == 0 || s.count('S') == 0) {
cout << "No\n";
return 0;}
if(s.count('E') || s.count('W'))
if(s.count('E') == 0 || s.count('W') == 0) {
cout << "No\n";
return 0;}
cout << "Yes\n";
return 0;}

// look at my code
// my code is amazing
```

#### Submission Info

Submission Time 2016-08-21 21:45:44+0900 A - Wanna go back home xellos C++14 (GCC 5.4.1) 200 1326 Byte AC 4 ms 256 KB

#### Judge Result

Set Name Sample All
Score / Max Score 0 / 0 200 / 200
Status
 AC × 4
 AC × 15
Set Name Test Cases
Sample s1.txt, s2.txt, s3.txt, s4.txt
All 01.txt, 04.txt, 05.txt, 06.txt, 07.txt, 08.txt, 09.txt, 10.txt, 11.txt, 13.txt, 15.txt, s1.txt, s2.txt, s3.txt, s4.txt
Case Name Status Exec Time Memory
01.txt AC 4 ms 256 KB
04.txt AC 4 ms 256 KB
05.txt AC 4 ms 256 KB
06.txt AC 4 ms 256 KB
07.txt AC 4 ms 256 KB
08.txt AC 4 ms 256 KB
09.txt AC 4 ms 256 KB
10.txt AC 4 ms 256 KB
11.txt AC 4 ms 256 KB
13.txt AC 4 ms 256 KB
15.txt AC 4 ms 256 KB
s1.txt AC 4 ms 256 KB
s2.txt AC 4 ms 256 KB
s3.txt AC 4 ms 256 KB
s4.txt AC 4 ms 256 KB