Submission #1731927
Source Code Expand
#define _CRT_SECURE_NO_WARNINGS #include <iostream> #include <sstream> #include <iomanip> #include <cstdio> #include <cstdlib> #include <cmath> #include <cctype> #include <cstring> #include <vector> #include <list> #include <queue> #include <deque> #include <stack> #include <map> #include <set> #include <algorithm> #include <iterator> #include <bitset> #include <ctime> #include<complex> using namespace std; #define FOR(i,a,b) for (int i = (a); i < (b); i++) #define RFOR(i,b,a) for (int i = (b)-1; i >= (a); i--) #define ITER(it,a) for (__typeof(a.begin()) it = a.begin(); it != a.end(); it++) #define FILL(a,value) memset(a, value, sizeof(a)) #define SZ(a) (int)a.size() #define ALL(a) a.begin(), a.end() #define PB push_back #define MP make_pair typedef long long LL; typedef vector<int> VI; typedef pair<int, int> PII; const double PI = acos(-1.0); const int INF = 1000 * 1000 * 1000 + 7; const LL LINF = INF * (LL)INF; const int MAX = 1000 + 47; int C[MAX]; int main() { //freopen("in.txt", "r", stdin); //freopen("out.txt", "w", stdout); ios::sync_with_stdio(false); cin.tie(0); string s; cin >> s; FOR(i, 0, SZ(s)) { C[s[i]] = 1; } if ((C['W'] ^ C['E']) == 1 || (C['N'] ^ C['S']) == 1) { cout << "No" << endl; return 0; } cout << "Yes" << endl; }
Submission Info
Submission Time | |
---|---|
Task | A - Wanna go back home |
User | vjudge2 |
Language | C++14 (GCC 5.4.1) |
Score | 200 |
Code Size | 1283 Byte |
Status | AC |
Exec Time | 1 ms |
Memory | 256 KB |
Judge Result
Set Name | Sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 200 / 200 | ||||
Status |
|
|
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 | 1 ms | 256 KB |
04.txt | AC | 1 ms | 256 KB |
05.txt | AC | 1 ms | 256 KB |
06.txt | AC | 1 ms | 256 KB |
07.txt | AC | 1 ms | 256 KB |
08.txt | AC | 1 ms | 256 KB |
09.txt | AC | 1 ms | 256 KB |
10.txt | AC | 1 ms | 256 KB |
11.txt | AC | 1 ms | 256 KB |
13.txt | AC | 1 ms | 256 KB |
15.txt | AC | 1 ms | 256 KB |
s1.txt | AC | 1 ms | 256 KB |
s2.txt | AC | 1 ms | 256 KB |
s3.txt | AC | 1 ms | 256 KB |
s4.txt | AC | 1 ms | 256 KB |