Submission #844506
Source Code Expand
#include <iostream> #include <algorithm> #include <cmath> #include <cstdio> #include <set> #include <map> #include <vector> #include <queue> #include <string> #include <iomanip> #include <stdio.h> #include <cstring> #include <random> #include <chrono> #include <bitset> #include <fstream> #include <sstream> using namespace std; typedef long long ll; typedef long double ld; ll big = 1000000007ll; float likeabutterfly; string likeabee; ll n,m,q,h,k,w; ll T; vector<ll> A; int main() { ll c1,c2,c3,c4,c5,c6; ll a,b,c,e,g; ll x,y,z; //freopen("input.txt","r",stdin); //freopen("output.txt","w",stdout); string s; cin >> s; bool N = 0; bool W = 0; bool S = 0; bool E = 0; n = s.length(); for(c1 = 0 ;c1 < n; c1++){ if(s[c1] == 'N'){N = 1;} if(s[c1] == 'W'){W = 1;} if(s[c1] == 'S'){S = 1;} if(s[c1] == 'E'){E = 1;} } string ans = "Yes\n"; if((N^S == 1) || (E^W == 1)){ans == "No\n";} cout << ans; return 0; }
Submission Info
Submission Time | |
---|---|
Task | A - Wanna go back home |
User | nigus |
Language | C++14 (GCC 5.4.1) |
Score | 0 |
Code Size | 1079 Byte |
Status | WA |
Exec Time | 4 ms |
Memory | 256 KB |
Judge Result
Set Name | Sample | All | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 0 / 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 | WA | 4 ms | 256 KB |
04.txt | WA | 4 ms | 256 KB |
05.txt | WA | 4 ms | 256 KB |
06.txt | WA | 4 ms | 256 KB |
07.txt | WA | 4 ms | 256 KB |
08.txt | WA | 4 ms | 256 KB |
09.txt | WA | 4 ms | 256 KB |
10.txt | WA | 4 ms | 256 KB |
11.txt | AC | 4 ms | 256 KB |
13.txt | WA | 4 ms | 256 KB |
15.txt | WA | 4 ms | 256 KB |
s1.txt | AC | 4 ms | 256 KB |
s2.txt | AC | 4 ms | 256 KB |
s3.txt | WA | 4 ms | 256 KB |
s4.txt | WA | 4 ms | 256 KB |