s_id stringlengths 10 10 | p_id stringlengths 6 6 | u_id stringlengths 10 10 | date stringlengths 10 10 | language stringclasses 1
value | original_language stringclasses 11
values | filename_ext stringclasses 1
value | status stringclasses 1
value | cpu_time int64 0 100 | memory stringlengths 4 6 | code_size int64 15 14.7k | code stringlengths 15 14.7k | problem_id stringlengths 6 6 | problem_description stringlengths 358 9.83k | input stringlengths 2 4.87k | output stringclasses 807
values | __index_level_0__ int64 1.1k 1.22M |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
s444177830 | p04019 | u493520238 | 1597799120 | Python | PyPy3 (7.3.0) | py | Accepted | 64 | 61808 | 261 | s = input()
if 'W' in s and 'E' in s and 'N' in s and 'S' in s:
print('Yes')
elif 'W' in s and 'E' in s and not 'N' in s and not 'S' in s:
print('Yes')
elif not 'W' in s and not 'E' in s and 'N' in s and 'S' in s:
print('Yes')
else:
print('No')
| p04019 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip.
At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <... | SENW
| Yes
| 1,200,071 |
s768780852 | p04019 | u761320129 | 1597799001 | Python | Python (3.8.2) | py | Accepted | 27 | 9040 | 225 | S = input()
if 'N' in S and 'S' not in S:
print('No')
elif 'S' in S and 'N' not in S:
print('No')
elif 'W' in S and 'E' not in S:
print('No')
elif 'E' in S and 'W' not in S:
print('No')
else:
print('Yes') | p04019 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip.
At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <... | SENW
| Yes
| 1,200,072 |
s925516793 | p04019 | u898058223 | 1597794865 | Python | Python (3.8.2) | py | Accepted | 32 | 9128 | 374 | s=input()
if "N" in s:
if "S" in s:
pass
else:
print("No")
exit()
if "E" in s:
if "W" in s:
pass
else:
print("No")
exit()
if "S" in s:
if "N" in s:
pass
else:
print("No")
exit()
if "W" in s:
if "E" in s:
pass
... | p04019 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip.
At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <... | SENW
| Yes
| 1,200,073 |
s752324455 | p04019 | u680851063 | 1597755234 | Python | Python (3.8.2) | py | Accepted | 25 | 9108 | 182 | l = list(input())
l=set(l)
if len(l)==4: print('Yes')
elif len(l)==2 and 'N' in l and 'S' in l: print('Yes')
elif len(l)==2 and 'E' in l and 'W' in l: print('Yes')
else: print('No') | p04019 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip.
At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <... | SENW
| Yes
| 1,200,074 |
s305399906 | p04019 | u896791216 | 1597719861 | Python | Python (3.8.2) | py | Accepted | 28 | 9144 | 275 | s = input()
list_s = list(set(s))
ans = ''
if len(set(s)) == 4:
ans = 'Yes'
elif len(list_s) == 2 and list_s.count('E') == list_s.count('W'):
ans = 'Yes'
elif len(list_s) == 2 and list_s.count('N') == list_s.count('S'):
ans = 'Yes'
else:
ans = 'No'
print(ans) | p04019 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip.
At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <... | SENW
| Yes
| 1,200,075 |
s344142501 | p04019 | u411923565 | 1597692761 | Python | Python (3.8.2) | py | Accepted | 28 | 9108 | 263 | #A - Wanna go back home
S = list(input())
N = S.count('N')
E = S.count('E')
W = S.count('W')
s = S.count('S')
if ((N>0 and s>0) and ((E>0 and W>0) or (E == W == 0))) or ((N == s == 0) and ((E>0 and W>0) or (E == W == 0))):
print('Yes')
else:
print('No') | p04019 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip.
At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <... | SENW
| Yes
| 1,200,076 |
s782590917 | p04019 | u942051624 | 1597635983 | Python | Python (3.8.2) | py | Accepted | 29 | 9304 | 290 | import collections
S=list(str(input()))
cc=collections.Counter(S)
if cc['S']==0 and cc['N']!=0:
print('No')
elif cc['S']!=0 and cc['N']==0:
print('No')
elif cc['E']==0 and cc['W']!=0:
print('No')
elif cc['E']!=0 and cc['W']==0:
print('No')
else:
print('Yes')
| p04019 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip.
At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <... | SENW
| Yes
| 1,200,077 |
s706633973 | p04019 | u138083942 | 1597614725 | Python | PyPy3 (7.3.0) | py | Accepted | 61 | 61868 | 389 | # row = [int(x) for x in input().rstrip().split(" ")]
# n = int(input().rstrip())
# s = input().rstrip()
def resolve():
import sys
input = sys.stdin.readline
se = input().rstrip()
S = "S" in se
N = "N" in se
E = "E" in se
W = "W" in se
if (S ^ N) or (E ^ W):
print("No")
e... | p04019 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip.
At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <... | SENW
| Yes
| 1,200,078 |
s068270181 | p04019 | u163501259 | 1597441049 | Python | Python (3.8.2) | py | Accepted | 33 | 9276 | 423 | import sys
input = sys.stdin.readline
from collections import Counter
def main():
S = input().rstrip()
C = Counter(S)
n = C['N']
s = C['S']
w = C['W']
e = C['E']
if (n != 0 and s != 0) or (n == 0 and s == 0):
if (w != 0 and e != 0) or (w == 0 and e == 0):
print('Yes')
... | p04019 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip.
At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <... | SENW
| Yes
| 1,200,079 |
s694018088 | p04019 | u357751375 | 1597418098 | Python | Python (3.8.2) | py | Accepted | 33 | 9052 | 206 | l = list(input())
n = l.count('N')
w = l.count('W')
s = l.count('S')
e = l.count('E')
if n == s or (n != 0 and s != 0):
if w == e or (w != 0 and e != 0):
print('Yes')
exit(0)
print('No') | p04019 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip.
At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <... | SENW
| Yes
| 1,200,080 |
s720244953 | p04019 | u201928947 | 1597371528 | Python | PyPy3 (7.3.0) | py | Accepted | 71 | 61932 | 158 | S = input()
ans = True
if ('S' in S) ^ ('N' in S):
ans = False
if ('W' in S) ^ ('E' in S):
ans = False
if ans:
print('Yes')
else:
print('No')
| p04019 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip.
At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <... | SENW
| Yes
| 1,200,081 |
s564920414 | p04019 | u821251381 | 1597355707 | Python | Python (3.8.2) | py | Accepted | 28 | 8960 | 207 | S = input()
if (S.count("W")>0 and S.count("E")==0) or (S.count("E")>0 and S.count("W")==0) or (S.count("N")>0 and S.count("S")==0) or (S.count("S")>0 and S.count("N")==0): print("No")
else:
print("Yes") | p04019 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip.
At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <... | SENW
| Yes
| 1,200,082 |
s606008213 | p04019 | u344888046 | 1597271844 | Python | Python (3.8.2) | py | Accepted | 26 | 8904 | 272 | S = list(input())
n = S.count("N")
s = S.count("S")
e = S.count("E")
w = S.count("W")
if n!=0 and s!=0 and e==0 and w==0:
print("Yes")
elif n==0 and s==0 and e!=0 and w!=0:
print("Yes")
elif n!=0 and s!=0 and e!=0 and w!=0:
print("Yes")
else:
print("No") | p04019 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip.
At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <... | SENW
| Yes
| 1,200,083 |
s734103899 | p04019 | u395202850 | 1597243987 | Python | Python (3.8.2) | py | Accepted | 33 | 9232 | 397 | import collections
def main():
s = list(input())
c = collections.Counter(s)
keys = list(c.keys())
print("Yes" if ((keys.count("S") == 0 and keys.count("N") == 0) or (keys.count("S") == 1 and keys.count("N") == 1)) and (
(keys.count("E") == 0 and keys.count("W") == 0) or (keys.count("E") == 1 a... | p04019 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip.
At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <... | SENW
| Yes
| 1,200,084 |
s971963352 | p04019 | u349449706 | 1597208068 | Python | PyPy3 (7.3.0) | py | Accepted | 70 | 61888 | 220 | S = input()
if S.count('N') > 0 and S.count('S') == 0 or S.count('N') == 0 and S.count('S') > 0 or S.count('W') > 0 and S.count('E') == 0 or S.count('W') == 0 and S.count('E') > 0:
print('No')
else:
print('Yes')
| p04019 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip.
At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <... | SENW
| Yes
| 1,200,085 |
s269032876 | p04019 | u201660334 | 1597179821 | Python | Python (3.8.2) | py | Accepted | 27 | 8920 | 169 | s = input()
flag = True
if ("N" in s) ^ ("S" in s):
flag = False
if ("W" in s) ^ ("E" in s):
flag = False
if flag == True:
print("Yes")
else:
print("No") | p04019 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip.
At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <... | SENW
| Yes
| 1,200,086 |
s550204375 | p04019 | u970198631 | 1597179817 | Python | Python (3.8.2) | py | Accepted | 28 | 9144 | 253 | S = input()
count =0
if 'S' in S:
if 'N' not in S:
count = 1
if 'N' in S:
if 'S' not in S:
count = 1
if 'W' in S:
if 'E' not in S:
count = 1
if 'E' in S:
if 'W' not in S:
count = 1
if count ==1:
print('No')
else:
print('Yes') | p04019 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip.
At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <... | SENW
| Yes
| 1,200,087 |
s697472906 | p04019 | u459798349 | 1597169704 | Python | Python (3.8.2) | py | Accepted | 27 | 9096 | 175 | s=set(input())
flg=0
if "N" in s:
flg+=1
if "S" in s:
flg-=1
if "W" in s:
flg+=10
if "E" in s:
flg-=10
if flg==0:
print("Yes")
else:
print("No")
| p04019 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip.
At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <... | SENW
| Yes
| 1,200,088 |
s013897889 | p04019 | u648881683 | 1597097222 | Python | Python (3.8.2) | py | Accepted | 40 | 9964 | 744 | import bisect, collections, copy, heapq, itertools, math, string, sys
input = lambda: sys.stdin.readline().rstrip()
sys.setrecursionlimit(10**7)
INF = float('inf')
def I(): return int(input())
def F(): return float(input())
def SS(): return input()
def LI(): return [int(x) for x in input().split()]
def LI_(): return [... | p04019 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip.
At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <... | SENW
| Yes
| 1,200,089 |
s412517160 | p04019 | u112364985 | 1597067651 | Python | Python (3.8.2) | py | Accepted | 24 | 9024 | 222 | t=input()
n=t.count("N")
w=t.count("W")
s=t.count("S")
e=t.count("E")
if ((n>=1 and s>=1 and w==0 and e==0) or (w>=1 and e>=1 and n==0 and s==0) or (n>=1 and s>=1 and w>=1 and e>=1)):
print("Yes")
else:
print("No") | p04019 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip.
At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <... | SENW
| Yes
| 1,200,090 |
s770163203 | p04019 | u363825867 | 1597049271 | Python | Python (3.8.2) | py | Accepted | 26 | 9052 | 225 | S = input().strip()
f = True
if S.count("N")*S.count("S") == 0 and S.count("N")+S.count("S") != 0:
f = False
if S.count("E")*S.count("W") == 0 and S.count("E")+S.count("W") != 0:
f = False
print("Yes" if f else "No")
| p04019 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip.
At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <... | SENW
| Yes
| 1,200,091 |
s636292136 | p04019 | u780698286 | 1597001849 | Python | Python (3.8.2) | py | Accepted | 30 | 9036 | 208 | s = list(input())
ew = []
sn = []
for i in s:
if i == "E" or i == "W":
ew.append(i)
else:
sn.append(i)
if len(set(ew)) == 1 or len(set(sn)) == 1:
print("No")
else:
print("Yes") | p04019 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip.
At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <... | SENW
| Yes
| 1,200,092 |
s313537625 | p04019 | u112581208 | 1596988060 | Python | Python (3.8.2) | py | Accepted | 30 | 9096 | 358 | s = input()
if s.count("N") > 0:
if s.count("S") == 0:
print("No")
exit()
if s.count("S") > 0:
if s.count("N") == 0:
print("No")
exit()
if s.count("W") > 0:
if s.count("E") == 0:
print("No")
exit()
if s.count("E") > 0:
if s.count("W") == 0:
pri... | p04019 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip.
At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <... | SENW
| Yes
| 1,200,093 |
s302660806 | p04019 | u478417863 | 1596936254 | Python | Python (3.8.2) | py | Accepted | 29 | 9024 | 190 | s= input().strip()
f="Yes"
if (s.count('N')!=s.count('S') and s.count('N')*s.count('S')==0):
f="No"
elif(s.count('E')*s.count('W')==0 and s.count('E')!=s.count('W')):
f="No"
print(f) | p04019 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip.
At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <... | SENW
| Yes
| 1,200,094 |
s962004880 | p04019 | u835283937 | 1596892746 | Python | Python (3.8.2) | py | Accepted | 33 | 9044 | 405 | def main():
S = input()
if (S.count("N") >= 1 and S.count("S") >= 1 and S.count("E") == 0 and S.count("W") == 0)\
or (S.count("N") == 0 and S.count("S") == 0 and S.count("E") >= 1 and S.count("W") >= 1)\
or (S.count("N") >= 1 and S.count("S") >= 1 and S.count("E") >= 1 and S.count("W") >= 1):
... | p04019 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip.
At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <... | SENW
| Yes
| 1,200,095 |
s772128791 | p04019 | u569776981 | 1596853653 | Python | Python (3.8.2) | py | Accepted | 30 | 9076 | 471 | S = input()
n = 0
w = 0
s = 0
e = 0
x = len(S)
for i in range(x):
if S[i] == 'N':
n += 1
elif S[i] == 'W':
w += 1
elif S[i] == 'S':
s += 1
elif S[i] == 'E':
e += 1
if n == 0 and s == 0:
if e * w != 0:
print('Yes')
else:
print('No')
elif n != 0 an... | p04019 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip.
At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <... | SENW
| Yes
| 1,200,096 |
s285728395 | p04019 | u869265610 | 1596838378 | Python | Python (3.8.2) | py | Accepted | 31 | 9108 | 269 | U=list(str(input()))
if "N" in U:
if "S" not in U:
print("No")
exit()
if "S" in U:
if "N" not in U:
print("No")
exit()
if "E" in U:
if "W" not in U:
print("No")
exit()
if "W" in U:
if "E" not in U:
print("No")
exit()
print("Yes") | p04019 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip.
At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <... | SENW
| Yes
| 1,200,097 |
s470959046 | p04019 | u758815106 | 1596771421 | Python | Python (3.8.2) | py | Accepted | 27 | 9116 | 226 | S = list(input())
res = True
n = S.count("N")
s = S.count("S")
w = S.count("W")
e = S.count("E")
if (n > 0) ^ (s > 0):
res = False
if (w > 0) ^ (e > 0):
res = False
if res:
print("Yes")
else:
print("No")
| p04019 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip.
At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <... | SENW
| Yes
| 1,200,098 |
s483572846 | p04019 | u016881126 | 1596742225 | Python | Python (3.8.2) | py | Accepted | 29 | 9052 | 403 | import sys
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
read = sys.stdin.buffer.read
sys.setrecursionlimit(10 ** 7)
INF = float('inf')
S = input()
sS = set(S)
if "N" in sS or "S" in sS:
if not ("N" in sS and "S" in sS):
print('No')
quit()
if "W" in sS or "E" in sS:
... | p04019 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip.
At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <... | SENW
| Yes
| 1,200,099 |
s641969502 | p04019 | u319245933 | 1596509790 | Python | Python (3.8.2) | py | Accepted | 32 | 9376 | 280 | import collections
S = input()
c = collections.Counter(S)
K = c.keys()
if len(K) == 4:
print('Yes')
elif len(K) == 2:
if 'N' in K and 'S' in K:
print('Yes')
elif 'W' in K and 'E' in K:
print('Yes')
else:
print('No')
else:
print('No') | p04019 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip.
At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <... | SENW
| Yes
| 1,200,100 |
s943347052 | p04019 | u212328220 | 1596485298 | Python | Python (3.8.2) | py | Accepted | 32 | 9376 | 320 | from collections import Counter
s = input()
C = Counter(s)
if len(C) % 2 != 0:
print('No')
exit()
else:
if len(s) == 4:
print('Yes')
else:
if 'N' in s and 'S' in s:
print('Yes')
elif 'E' in s and 'W' in s:
print('Yes')
else:
print('No') | p04019 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip.
At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <... | SENW
| Yes
| 1,200,101 |
s505730495 | p04019 | u996564551 | 1596216852 | Python | Python (3.8.2) | py | Accepted | 31 | 9048 | 425 | S = input()
S = list(S)
count = 0
while count == 0:
if 'N' in S:
if'S' in S:
count += 1
else:
print('No')
break
if 'S' in S:
if'N' in S:
count += 1
else:
print('No')
break
if 'E' in S:
if'W' in S:
count += 1
else:
print('No')
break
if... | p04019 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip.
At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <... | SENW
| Yes
| 1,200,102 |
s144283692 | p04019 | u163320134 | 1596098307 | Python | Python (3.8.2) | py | Accepted | 25 | 9128 | 209 | s=input()
ans=[0]*4
check='NWSE'
for i in range(len(s)):
for j in range(len(check)):
if s[i]==check[j]:
ans[j]=1
if (ans[0]+ans[2])%2==0 and (ans[1]+ans[3])%2==0:
print('Yes')
else:
print('No') | p04019 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip.
At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <... | SENW
| Yes
| 1,200,103 |
s523184954 | p04019 | u681444474 | 1595786944 | Python | Python (3.8.2) | py | Accepted | 29 | 9000 | 356 | # coding: utf-8
# Your code here!
#a, b = map(int,input().split())
S = input()
F = [False] * 4
n = len(S)
flg = False
V = ["E", "W", "N", "S"]
for i in range(n):
s = S[i]
F[V.index(s)] = True
if not (F[0]^F[1]):
if not (F[2]^F[3]):
flg = True
a = True
b= False
c=False
if flg:
print("Yes")
else... | p04019 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip.
At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <... | SENW
| Yes
| 1,200,104 |
s121397993 | p04019 | u597374218 | 1595708467 | Python | Python (3.8.2) | py | Accepted | 26 | 9076 | 85 | S=input()
print("Yes" if ("N" in S)==("S" in S) and ("W" in S)==("E" in S) else "No") | p04019 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip.
At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <... | SENW
| Yes
| 1,200,105 |
s132162246 | p04019 | u597374218 | 1595703685 | Python | Python (3.8.2) | py | Accepted | 28 | 8944 | 89 | S="".join(sorted(set(input())))
print("Yes" if S=="ENSW" or S=="NS" or S=="EW" else "No") | p04019 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip.
At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <... | SENW
| Yes
| 1,200,106 |
s633150672 | p04019 | u597374218 | 1595703526 | Python | Python (3.8.2) | py | Accepted | 27 | 8928 | 102 | S=list(set(input()))
print("Yes" if len(S)==4 or (len(S)==2 and S.count("N")==S.count("S")) else "No") | p04019 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip.
At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <... | SENW
| Yes
| 1,200,107 |
s679167075 | p04019 | u814663076 | 1595637494 | Python | Python (3.8.2) | py | Accepted | 32 | 9136 | 417 | import sys
def rs(): return sys.stdin.readline().rstrip()
def ri(): return int(rs())
def rs_(): return [_ for _ in rs().split()]
def ri_(): return [int(_) for _ in rs().split()]
from collections import Counter
c = Counter(rs())
f = False
if (c['N'] > 0 and c['S'] > 0) or (c['N'] == 0 and c['S'] == 0):
if (c['W'] >... | p04019 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip.
At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <... | SENW
| Yes
| 1,200,108 |
s391459457 | p04019 | u013373291 | 1595519497 | Python | Python (3.8.2) | py | Accepted | 30 | 8804 | 249 | #!/usr/bin/env python3
S = set(input())
if len(S) % 2 != 0:
print("No")
elif ("N" in S and not "S" in S) or ("S" in S and not "N" in S) or ("W" in S and not "E" in S) or ("E" in S and not "W" in S):
print("No")
else:
print("Yes")
| p04019 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip.
At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <... | SENW
| Yes
| 1,200,109 |
s412230993 | p04019 | u937238023 | 1595342613 | Python | Python (3.8.2) | py | Accepted | 27 | 9000 | 201 | st = input()
n = st.count('N')
s = st.count('S')
e = st.count('E')
w = st.count('W')
if (n>0 and s==0) or (n==0 and s>0) or (w==0 and e>0) or (e==0 and w>0):
print("No")
else:
print("Yes") | p04019 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip.
At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <... | SENW
| Yes
| 1,200,110 |
s769636631 | p04019 | u434966508 | 1595298139 | Python | PyPy3 (7.3.0) | py | Accepted | 67 | 61816 | 119 | s = set(input())
if {"N","S"} == s or {"W","E"} == s or {"N","S","W","E"} == s:
print("Yes")
else:
print("No")
| p04019 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip.
At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <... | SENW
| Yes
| 1,200,111 |
s987977536 | p04019 | u833492079 | 1595221958 | Python | Python (3.8.2) | py | Accepted | 26 | 9120 | 206 | S = input()
n = S.count('N')
w = S.count('W')
s = S.count('S')
e = S.count('E')
def f(n,s):
return (n==0 and s==0) or (n>0 and s>0)
b = f(n,s) and f(e,w)
if b:
print("Yes")
else:
print("No")
| p04019 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip.
At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <... | SENW
| Yes
| 1,200,112 |
s378184345 | p04019 | u357751375 | 1595213430 | Python | Python (3.8.2) | py | Accepted | 30 | 9072 | 298 | s = list(input())
we = [0,0]
ns = [0,0]
for i in range(len(s)):
if s[i] == ('N'):
ns[0] = 1
elif s[i] == ('W'):
we[0] = 1
elif s[i] == ('S'):
ns[1] = 1
else:
we[1] = 1
if sum(we) % 2 == 0 and sum(ns) % 2 == 0:
print('Yes')
else:
print('No') | p04019 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip.
At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <... | SENW
| Yes
| 1,200,113 |
s087697081 | p04019 | u131464432 | 1595168144 | Python | Python (3.8.2) | py | Accepted | 29 | 9100 | 214 | S = input()
if "S" in S and "N" not in S:
print("No")
elif "N" in S and "S" not in S:
print("No")
elif "E" in S and "W" not in S:
print("No")
elif "W" in S and "E" not in S:
print("No")
else:
print("Yes") | p04019 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip.
At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <... | SENW
| Yes
| 1,200,114 |
s549570633 | p04019 | u062691227 | 1595122002 | Python | PyPy3 (7.3.0) | py | Accepted | 70 | 61780 | 104 | s = input()
if ('N' in s) ^ ('S'in s) or ('W' in s) ^ ('E' in s):
print('No')
else:
print('Yes') | p04019 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip.
At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <... | SENW
| Yes
| 1,200,115 |
s630267090 | p04019 | u261103969 | 1594982640 | Python | PyPy3 (7.3.0) | py | Accepted | 63 | 61948 | 308 | import sys
readline = sys.stdin.readline
MOD = 10 ** 9 + 7
INF = float('INF')
sys.setrecursionlimit(10 ** 5)
def main():
s = input()
ok = [{"N", "S"}, {"E", "W"}, {"N", "S", "E", "W"}]
if set(s) in ok:
print("Yes")
else:
print("No")
if __name__ == '__main__':
main()
| p04019 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip.
At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <... | SENW
| Yes
| 1,200,116 |
s579887196 | p04019 | u849756457 | 1594972210 | Python | Python (3.8.2) | py | Accepted | 26 | 8876 | 208 | s = input()
L = [['W', 'E'], ['S', 'N']]
for l in L:
if l[0] in s:
if l[1] not in s:
print("No")
exit(0)
if l[1] in s:
if l[0] not in s:
print("No")
exit(0)
print("Yes") | p04019 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip.
At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <... | SENW
| Yes
| 1,200,117 |
s025944569 | p04019 | u634046173 | 1594884777 | Python | Python (3.8.2) | py | Accepted | 25 | 9032 | 265 | S = input()
if 'N' in S:
if not 'S' in S:
print('No')
exit()
if 'S' in S:
if not 'N' in S:
print('No')
exit()
if 'E' in S:
if not 'W' in S:
print('No')
exit()
if 'W' in S:
if not 'E' in S:
print('No')
exit()
print('Yes')
| p04019 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip.
At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <... | SENW
| Yes
| 1,200,118 |
s902814570 | p04019 | u430928274 | 1594843366 | Python | Python (3.8.2) | py | Accepted | 26 | 9016 | 258 | s = input()
N = s.count("N")
W = s.count("W")
S = s.count("S")
E = s.count("E")
flag = -1
if (S > 0 and N > 0) or (S == 0 and N == 0) :
if (E > 0 and W > 0) or (E == 0 and W == 0) :
flag = 1
if flag == 1 :
print("Yes")
else :
print("No")
| p04019 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip.
At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <... | SENW
| Yes
| 1,200,119 |
s689491712 | p04019 | u452269253 | 1594836516 | Python | Python (3.8.2) | py | Accepted | 29 | 9032 | 245 | S = input()
dir = [0]*4
move = "NWSE"
for i in S:
dir[move.index(i)] += 1
p1 = (dir[0] > 0 and dir[2] > 0) or (dir[0] == 0 and dir[2] == 0)
p2 = (dir[1] > 0 and dir[3] > 0) or (dir[1] == 0 and dir[3] == 0)
print("Yes" if p1 and p2 else "No") | p04019 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip.
At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <... | SENW
| Yes
| 1,200,120 |
s105697371 | p04019 | u068142202 | 1594831420 | Python | Python (3.8.2) | py | Accepted | 32 | 9416 | 358 | import collections
s = list(input())
counter_s = collections.Counter(s)
if counter_s["N"] != 0 and counter_s["S"] == 0:
print("No")
elif counter_s["S"] != 0 and counter_s["N"] == 0:
print("No")
elif counter_s["W"] != 0 and counter_s["E"] == 0:
print("No")
elif counter_s["E"] != 0 and counter_s["W"] == 0:
... | p04019 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip.
At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <... | SENW
| Yes
| 1,200,121 |
s048732335 | p04019 | u694665829 | 1594760032 | Python | Python (3.8.2) | py | Accepted | 28 | 8944 | 109 | s=input()
s=set(s)
s=sorted(s)
ans=[['E','W'],['N','S'],['E','N','S','W']]
print("Yes" if s in ans else "No") | p04019 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip.
At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <... | SENW
| Yes
| 1,200,122 |
s044612483 | p04019 | u143051858 | 1594648199 | Python | Python (3.8.2) | py | Accepted | 27 | 8984 | 254 | S = input()
n = 0
e = 0
w = 0
s = 0
for v in S:
if v == 'N': n+=1
if v == 'E': e+=1
if v == 'W': w+=1
if v == 'S': s+=1
if ((0<n and 0<s) or (n==0 and s==0)) and ((0<e and 0<w) or (e==0 and w==0)):
print('Yes')
else:
print('No') | p04019 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip.
At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <... | SENW
| Yes
| 1,200,123 |
s640755420 | p04019 | u496821919 | 1594604811 | Python | Python (3.8.2) | py | Accepted | 31 | 9024 | 285 | from sys import exit
s = input()
if "N" in s:
if "S" not in s:
exit(print("No"))
if "S" in s:
if "N" not in s:
exit(print("No"))
if "W" in s:
if "E" not in s:
exit(print("No"))
if "E" in s:
if "W" not in s:
exit(print("No"))
print("Yes") | p04019 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip.
At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <... | SENW
| Yes
| 1,200,124 |
s079764984 | p04019 | u586639900 | 1594573046 | Python | Python (3.8.2) | py | Accepted | 26 | 9048 | 218 | import sys
D = input()
if ('N' in D and 'S' not in D) or ('N' not in D and 'S' in D):
print('No')
sys.exit()
if ('W' in D and 'E' not in D) or ('W' not in D and 'E' in D):
print('No')
sys.exit()
print('Yes') | p04019 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip.
At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <... | SENW
| Yes
| 1,200,125 |
s213376041 | p04019 | u098982053 | 1594550924 | Python | Python (3.8.2) | py | Accepted | 30 | 8772 | 126 | S=input()
sn = "N" in S
se = "E" in S
ss = "S" in S
sw = "W" in S
if (sn==ss) and (se==sw):
print("Yes")
else:
print("No") | p04019 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip.
At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <... | SENW
| Yes
| 1,200,126 |
s746877278 | p04019 | u075303794 | 1594493606 | Python | Python (3.8.2) | py | Accepted | 29 | 9116 | 208 | S=set(x for x in input())
if len(S)==4:
print('Yes')
elif len(S)==2:
if 'W' in S and 'E' in S:
print('Yes')
elif 'N' in S and 'S' in S:
print('Yes')
else:
print('No')
else:
print('No') | p04019 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip.
At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <... | SENW
| Yes
| 1,200,127 |
s160704631 | p04019 | u763280125 | 1594474104 | Python | Python (3.8.2) | py | Accepted | 27 | 9144 | 336 | S = input()
n = False
e = False
s = False
w = False
for _s in S:
if _s == 'N':
n = True
if _s == 'E':
e = True
if _s == 'S':
s = True
if _s == 'W':
w = True
if (n and s and e and w) or (n and s and not e and not w) or (not n and not s and e and w):
print('Yes')
else:
... | p04019 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip.
At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <... | SENW
| Yes
| 1,200,128 |
s721465846 | p04019 | u629607744 | 1594420752 | Python | Python (3.8.2) | py | Accepted | 31 | 9056 | 511 | def i():
return int(input())
def i2():
return map(int,input().split())
def s():
return str(input())
def l():
return list(input())
def intl():
return list(int(k) for k in input().split())
s = s()
cn,cs,ce,cw = 0,0,0,0
for i in range(len(s)):
if s[i] == "N":
cn = 1
elif s[i] == "S":
cs = 1
elif s[i] == "E":... | p04019 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip.
At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <... | SENW
| Yes
| 1,200,129 |
s063079589 | p04019 | u811176339 | 1594417834 | Python | Python (3.8.2) | py | Accepted | 31 | 9280 | 213 | import collections
s = input()
cnt = collections.Counter(s)
cond = True
if (cnt["N"] > 0) ^ (cnt["S"] > 0):
cond = False
if (cnt["W"] > 0) ^ (cnt["E"] > 0):
cond = False
print("Yes" if cond else "No")
| p04019 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip.
At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <... | SENW
| Yes
| 1,200,130 |
s254647760 | p04019 | u163421511 | 1594349242 | Python | Python (3.8.2) | py | Accepted | 32 | 9020 | 124 | s = input()
a = 'N' in s
b = 'S' in s
c = 'E' in s
d = 'W' in s
ans = 'Yes' if all([a == b, c == d]) else 'No'
print(ans)
| p04019 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip.
At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <... | SENW
| Yes
| 1,200,131 |
s572883127 | p04019 | u094999522 | 1594258471 | Python | Python (3.8.2) | py | Accepted | 31 | 9084 | 147 | #!/usr/bin/env python3
s = input()
s = {i for i in s}
if len(s) == 4 or s == {"N", "S"} or s == {"W", "E"}:
print("Yes")
else:
print("No")
| p04019 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip.
At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <... | SENW
| Yes
| 1,200,132 |
s730706927 | p04019 | u047931063 | 1594249268 | Python | Python (3.8.2) | py | Accepted | 32 | 8984 | 277 | import sys
input = sys.stdin.readline
A = input().rstrip('\n')
N = A.count("N")
S = A.count("S")
W = A.count("W")
E = A.count("E")
if (N == 0 or S == 0) and N + S != 0:
print("No")
exit()
if (W == 0 or E == 0) and W + E != 0:
print("No")
exit()
print("Yes")
| p04019 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip.
At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <... | SENW
| Yes
| 1,200,133 |
s685334379 | p04019 | u088863512 | 1594241001 | Python | Python (3.8.2) | py | Accepted | 29 | 9340 | 672 | # -*- coding: utf-8 -*-
import sys
from collections import deque, defaultdict
from math import sqrt, factorial
# def input(): return sys.stdin.readline()[:-1] # warning not \n
# def input(): return sys.stdin.buffer.readline().strip() # warning bytes
# def input(): return sys.stdin.buffer.readline().decode('utf-8')
de... | p04019 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip.
At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <... | SENW
| Yes
| 1,200,134 |
s380178956 | p04019 | u527993431 | 1594175592 | Python | Python (3.8.2) | py | Accepted | 31 | 9072 | 295 | S=input()
S=sorted(set(S))
if S.count("N")==1:
if S.count("S")==0:
print("No")
exit()
if S.count("S")==1:
if S.count("N")==0:
print("No")
exit()
if S.count("E")==1:
if S.count("W")==0:
print("No")
exit()
if S.count("W")==1:
if S.count("E")==0:
print("No")
exit()
print("Yes") | p04019 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip.
At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <... | SENW
| Yes
| 1,200,135 |
s962220712 | p04019 | u289288647 | 1594166473 | Python | Python (3.8.2) | py | Accepted | 28 | 9100 | 259 | S = input()
n = S.count('N')
s = S.count('S')
w = S.count('W')
e = S.count('E')
if n * s > 0 and w * e > 0:
print('Yes')
elif n * s > 0 and w == 0 and e == 0:
print('Yes')
elif w * e > 0 and n == 0 and s == 0:
print('Yes')
else:
print('No')
| p04019 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip.
At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <... | SENW
| Yes
| 1,200,136 |
s671915215 | p04019 | u893962649 | 1594149219 | Python | Python (3.8.2) | py | Accepted | 29 | 9044 | 182 | S = input()
if ((("N" in S and "S" in S)
or("N" not in S and "S" not in S))
and(("E" in S and "W" in S)
or ("E" not in S and "W" not in S))):
print('Yes')
else:
print('No') | p04019 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip.
At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <... | SENW
| Yes
| 1,200,137 |
s068302684 | p04019 | u893962649 | 1594149082 | Python | Python (3.8.2) | py | Accepted | 32 | 8816 | 198 | S = input()
if (("N" in S and "S" in S)
or("N" not in S and "S" not in S)):
if (("E" in S and "W" in S)
or ("E" not in S and "W" not in S)):
print('Yes')
exit()
print('No') | p04019 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip.
At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <... | SENW
| Yes
| 1,200,138 |
s651393139 | p04019 | u032222383 | 1594142502 | Python | PyPy3 (7.3.0) | py | Accepted | 66 | 62168 | 248 | t=input()
n=0
s=0
w=0
e=0
for i in range(int(len(t))):
if t[i] =="N":
n=1
if t[i] =="S":
s=1
if t[i] =="E":
e=1
if t[i] =="W":
w=1
if (w+e)%2==0 and (n+s)%2==0:
print("Yes")
else:
print("No") | p04019 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip.
At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <... | SENW
| Yes
| 1,200,139 |
s315773248 | p04019 | u652907854 | 1594012127 | Python | PyPy3 (7.3.0) | py | Accepted | 80 | 67752 | 991 | # JAI SHREE RAM
import math; from collections import *
import sys; from functools import reduce
# sys.setrecursionlimit(10**6)
def get_ints(): return map(int, input().strip().split())
def get_list(): return list(get_ints())
def get_string(): return list(input().strip().split())
def printxsp(*... | p04019 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip.
At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <... | SENW
| Yes
| 1,200,140 |
s863483612 | p04019 | u437215432 | 1593981975 | Python | Python (3.8.2) | py | Accepted | 26 | 9020 | 321 | s = input()
s = list(s)
sowth = s.count('S') if 'S' in s else 0
east = s.count('E') if 'E' in s else 0
north = s.count('N') if 'N' in s else 0
west = s.count('W') if 'W' in s else 0
if (sowth + north != 0 and sowth * north == 0) or\
(west + east != 0 and west * east == 0):
print('No')
else:
print('Yes')... | p04019 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip.
At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <... | SENW
| Yes
| 1,200,141 |
s394134090 | p04019 | u437215432 | 1593981806 | Python | Python (3.8.2) | py | Accepted | 29 | 9040 | 361 | s = input()
s = list(s)
sowth = s.count('S') if 'S' in s else 0
east = s.count('E') if 'E' in s else 0
north = s.count('N') if 'N' in s else 0
west = s.count('W') if 'W' in s else 0
if (sowth != 0 and north == 0) or\
(sowth == 0 and north != 0) or\
(west != 0 and east == 0) or\
(west == 0 and east != 0)... | p04019 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip.
At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <... | SENW
| Yes
| 1,200,142 |
s619188745 | p04019 | u535803878 | 1593981793 | Python | PyPy3 (7.3.0) | py | Accepted | 68 | 61900 | 279 | import sys
input = lambda : sys.stdin.readline().rstrip()
sys.setrecursionlimit(max(1000, 10**9))
write = lambda x: sys.stdout.write(x+"\n")
s = input()
v1 = ("N" in s) + ("S" in s)
v2 = ("W" in s) + ("E" in s)
if v1==1 or v2==1:
ans = "No"
else:
ans = "Yes"
print(ans) | p04019 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip.
At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <... | SENW
| Yes
| 1,200,143 |
s377033725 | p04019 | u437215432 | 1593981596 | Python | Python (3.8.2) | py | Accepted | 28 | 8860 | 413 | s = input()
s = list(s)
sowth = s.count('S') if 'S' in s else 0
east = s.count('E') if 'E' in s else 0
north = s.count('N') if 'N' in s else 0
west = s.count('W') if 'W' in s else 0
if (west != 0 and east != 0 and sowth == 0 and north == 0) or\
(sowth != 0 and north != 0 and west == 0 and east == 0) or\
(so... | p04019 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip.
At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <... | SENW
| Yes
| 1,200,144 |
s695872766 | p04019 | u607075479 | 1593975281 | Python | Python (3.8.2) | py | Accepted | 28 | 8992 | 185 | S = input()
NS = set()
EW = set()
for s in S:
if s in ["N", "S"]:
NS.add(s)
if s in ["E", "W"]:
EW.add(s)
if len(NS) == 1 or len(EW) == 1:
print("No")
else:
print("Yes") | p04019 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip.
At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <... | SENW
| Yes
| 1,200,145 |
s549129239 | p04019 | u768896740 | 1593959789 | Python | Python (3.8.2) | py | Accepted | 28 | 9144 | 318 | s = input()
li = [[1, 1, 0, 0], [0, 0, 1, 1], [1, 1, 1, 1]]
direction = [0] * 4
for i in s:
if i == 'N':
direction[0] = 1
elif i == 'S':
direction[1] = 1
elif i == 'W':
direction[2] = 1
else:
direction[3] = 1
if direction in li:
print('Yes')
else:
print('No') | p04019 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip.
At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <... | SENW
| Yes
| 1,200,146 |
s269574178 | p04019 | u551437236 | 1593956554 | Python | Python (3.8.2) | py | Accepted | 28 | 9120 | 272 | s = input()
t = 0
u = 0
if "N" in s and "S" in s and "E" not in s and "W" not in s:
print("Yes")
elif "N" not in s and "S" not in s and "E" in s and "W" in s:
print("Yes")
elif "N" in s and "S" in s and "E" in s and "W" in s:
print("Yes")
else:
print("No") | p04019 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip.
At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <... | SENW
| Yes
| 1,200,147 |
s996707478 | p04019 | u198930868 | 1593879370 | Python | Python (3.8.2) | py | Accepted | 26 | 8984 | 220 | i = input()
if "S" in i and "N" not in i:
print("No")
elif "N" in i and "S" not in i:
print("No")
elif "E" in i and "W" not in i:
print("No")
elif "W" in i and "E" not in i:
print("No")
else:
print("Yes") | p04019 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip.
At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <... | SENW
| Yes
| 1,200,148 |
s617010011 | p04019 | u313111801 | 1593857608 | Python | Python (3.8.2) | py | Accepted | 27 | 8964 | 135 | S=input()
n,w,s,e='N' in S,'W' in S,'S' in S,'E' in S
cand1=not n^s
cand2=not w^e
ans="Yes" if cand1 and cand2 else "No"
print(ans)
| p04019 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip.
At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <... | SENW
| Yes
| 1,200,149 |
s732490528 | p04019 | u313111801 | 1593857437 | Python | Python (3.8.2) | py | Accepted | 26 | 8800 | 247 | S=input()
n=w=s=e=0
for c in S:
if c=='N':
n+=1
elif c=='W':
w+=1
elif c=='S':
s+=1
elif c=='E':
e+=1
ok=(n==s==0 or (n>0 and s>0)) and (w==e==0 or (w>0 and e>0))
ans="Yes" if ok else "No"
print(ans) | p04019 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip.
At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <... | SENW
| Yes
| 1,200,150 |
s612227654 | p04019 | u500376440 | 1593806434 | Python | Python (3.8.2) | py | Accepted | 26 | 8972 | 195 | S=input()
ans="Yes"
if "N" in S and not "S" in S:
ans="No"
if "S" in S and not "N" in S:
ans="No"
if "E" in S and not "W" in S:
ans="No"
if "W" in S and not "E" in S:
ans="No"
print(ans)
| p04019 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip.
At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <... | SENW
| Yes
| 1,200,151 |
s014837330 | p04019 | u761062383 | 1593702352 | Python | Python (3.8.2) | py | Accepted | 29 | 9028 | 308 | def resolve():
S = input()
chk = set(S)
if len(chk) != 4:
if ("N" in chk and "S" not in chk) or ("E" in chk and "W" not in chk) or (
"S" in chk and "N" not in chk) or ("W" in chk and "E" not in chk):
print("No")
return
print("Yes")
resolve()
| p04019 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip.
At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <... | SENW
| Yes
| 1,200,152 |
s738157322 | p04019 | u652057333 | 1593679245 | Python | PyPy3 (7.3.0) | py | Accepted | 76 | 65088 | 374 | from collections import defaultdict
s = input()
d = defaultdict(lambda: 0)
for c in s:
d[c] += 1
if d["N"] > 0:
if d["S"] == 0:
print("No")
exit()
if d["S"] > 0:
if d["N"] == 0:
print("No")
exit()
if d["W"] > 0:
if d["E"] == 0:
print("No")
exit()
if d["E"] > 0:
if d["... | p04019 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip.
At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <... | SENW
| Yes
| 1,200,153 |
s903028973 | p04019 | u557168336 | 1593572081 | Python | Python (3.8.2) | py | Accepted | 28 | 9064 | 491 | import sys
input = sys.stdin.readline
def linput(ty=int, cvt=list):
return cvt(map(ty,input().split()))
def gcd(a: int, b: int):
while b: a, b = b, a%b
return a
def lcm(a: int, b: int):
return a * b // gcd(a, b)
def dist(x1,y1,x2,y2):
return abs(x1-x2)+abs(y1-y2)
def main():
S = input().rstrip()
res = 1
n... | p04019 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip.
At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <... | SENW
| Yes
| 1,200,154 |
s761551663 | p04019 | u636684559 | 1593549758 | Python | Python (3.8.2) | py | Accepted | 28 | 9068 | 296 | S=input()
a=set()
for s in S:
a.add(s)
a=list(a)
if len(a)==4:
print('Yes')
elif len(a)==2:
if (a[0]=='N' or a[0]=='S') and (a[1]=='N' or a[1]=='S'):
print('Yes')
elif (a[0]=='E' or a[0]=='W') and (a[1]=='E' or a[1]=='W'):
print('Yes')
else:
print('No')
else:
print('No')
| p04019 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip.
At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <... | SENW
| Yes
| 1,200,155 |
s244560618 | p04019 | u463602788 | 1593498389 | Python | Python (3.8.2) | py | Accepted | 29 | 9008 | 232 | s = list(set(list(input())))
if (len(s)%2==1):
print("No")
else:
if ("N" in s) and ("S" in s):
print("Yes")
elif ("E" in s) and ("W" in s):
print("Yes")
else:
print("No")
| p04019 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip.
At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <... | SENW
| Yes
| 1,200,156 |
s534224978 | p04019 | u388463553 | 1593457692 | Python | Python (3.8.2) | py | Accepted | 30 | 9064 | 180 | S=list(input())
if ('N' in S and 'S' not in S) or ('S' in S and 'N' not in S) or ('W' in S and 'E' not in S) or ('E' in S and 'W' not in S):
print('No')
else:
print('Yes') | p04019 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip.
At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <... | SENW
| Yes
| 1,200,157 |
s366533291 | p04019 | u397953026 | 1593389599 | Python | Python (3.8.2) | py | Accepted | 32 | 9124 | 220 | s = str(input())
a = s.count("N")
b = s.count("W")
c = s.count("S")
d = s.count("E")
if (a == 0 and c != 0) or (c == 0 and a != 0) or (b == 0 and d != 0) or (d == 0 and b != 0):
print("No")
else:
print("Yes") | p04019 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip.
At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <... | SENW
| Yes
| 1,200,158 |
s767553340 | p04019 | u152614052 | 1593386159 | Python | Python (3.8.2) | py | Accepted | 31 | 9336 | 226 | import collections
s = list(input())
ans = "Yes"
c = collections.Counter(s)
if c["N"] * c["S"] == 0:
if c["N"] != c["S"]:
ans = "No"
if c["W"] * c["E"] == 0:
if c["W"] != c["E"]:
ans = "No"
print(ans) | p04019 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip.
At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <... | SENW
| Yes
| 1,200,159 |
s086874880 | p04019 | u749614185 | 1593385399 | Python | Python (3.8.2) | py | Accepted | 29 | 9120 | 225 | string=input()
n=[]
for letter in string:
n.append(letter)
if ('N' in n and 'S' not in n) or ('S' in n and 'N' not in n) or ('E' in n and 'W' not in n)or ('W' in n and 'E' not in n):
print('No')
else:
print('Yes') | p04019 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip.
At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <... | SENW
| Yes
| 1,200,160 |
s918920879 | p04019 | u277429554 | 1593370564 | Python | Python (3.8.2) | py | Accepted | 28 | 9104 | 224 | s = input()
ans = True
if 'N' in s and not('S' in s) or 'S' in s and not('N' in s):
ans = False
if 'E' in s and not('W' in s) or 'W' in s and not('E' in s):
ans = False
if ans:
print("Yes")
else:
print("No") | p04019 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip.
At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <... | SENW
| Yes
| 1,200,161 |
s771896738 | p04019 | u605086727 | 1593367135 | Python | Python (3.8.2) | py | Accepted | 27 | 9036 | 336 | S = input()
moved = {"N": False, "W": False, "S": False, "E": False}
for s in S:
if not moved[s]:
moved[s] = True
if (moved["N"] and moved["S"]) or not (moved["N"] or moved["S"]):
if (moved["W"] and moved["E"]) or not (moved["W"] or moved["E"]):
print("Yes")
else:
print("No")
else:... | p04019 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip.
At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <... | SENW
| Yes
| 1,200,162 |
s469747961 | p04019 | u276686572 | 1593277919 | Python | Python (3.8.2) | py | Accepted | 24 | 9056 | 524 | string = input()
c1 = True
c2 = True
c3 = True
if ("W" in string and not("E" in string)) or "E" in string and not("W" in string): c1 = False
if ("N" in string and not("S" in string)) or "S" in string and not("N" in string): c2 = False
if "N" in string and "S" in string and "E" in string and "W" in string:
N... | p04019 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip.
At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <... | SENW
| Yes
| 1,200,163 |
s617268358 | p04019 | u934119021 | 1593227397 | Python | Python (3.8.2) | py | Accepted | 27 | 9132 | 288 | s = input()
N = s.count('N')
W = s.count('W')
S = s.count('S')
E = s.count('E')
ans = ''
if N > 0 and W > 0 and S > 0 and E > 0:
ans = 'Yes'
elif N == 0 and W > 0 and S == 0 and E > 0:
ans = 'Yes'
elif N > 0 and W == 0 and S > 0 and E == 0:
ans = 'Yes'
else:
ans = 'No'
print(ans) | p04019 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip.
At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <... | SENW
| Yes
| 1,200,164 |
s058263217 | p04019 | u848263468 | 1593114649 | Python | Python (3.8.2) | py | Accepted | 26 | 9036 | 119 | S=input()
n="N" in S
w="W" in S
e="E" in S
s="S" in S
if (n == s) and (e == w):
print("Yes")
else:
print("No")
| p04019 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip.
At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <... | SENW
| Yes
| 1,200,165 |
s349693241 | p04019 | u000085263 | 1593068455 | Python | Python (3.8.2) | py | Accepted | 24 | 9108 | 452 | n=input()
ans1, ans2="No", "No"
ans3, ans4="No", "No"
if 'N' in n:
if 'S' in n:
ans1="Yes"
if 'S' in n:
if 'N' in n:
ans2="Yes"
if 'E' in n:
if 'W' in n:
ans3="Yes"
if 'W' in n:
if 'E' in n:
ans4="Yes"
if "W" not in n and "E" not in n:
ans3, ans4 = "Yes", "Yes"
if "N" not in n and "S" not in... | p04019 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip.
At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <... | SENW
| Yes
| 1,200,166 |
s926874354 | p04019 | u849029577 | 1593055022 | Python | PyPy3 (7.3.0) | py | Accepted | 67 | 61572 | 118 | s = set(input())
if {"N","S"} == s or {"W","E"} == s or {"N","S","W","E"} == s:
print("Yes")
else:
print("No") | p04019 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip.
At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <... | SENW
| Yes
| 1,200,167 |
s933924047 | p04019 | u796716859 | 1592896073 | Python | PyPy3 (7.3.0) | py | Accepted | 65 | 61596 | 162 | # https://atcoder.jp/contests/agc003/tasks/agc003_a
S = str(input())
n,w,e,s = 'N' in S, 'W' in S, 'E' in S, 'S' in S
print('Yes' if n == s and e == w else 'No')
| p04019 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip.
At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <... | SENW
| Yes
| 1,200,168 |
s905308970 | p04019 | u864276028 | 1592883884 | Python | Python (3.8.2) | py | Accepted | 28 | 9044 | 104 | S = input()
n,w,e,s = 'N' in S, 'W' in S, 'E' in S, 'S' in S
print('Yes' if n == s and e == w else 'No') | p04019 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip.
At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <... | SENW
| Yes
| 1,200,169 |
s776262106 | p04019 | u587589241 | 1592775686 | Python | Python (3.8.2) | py | Accepted | 26 | 9072 | 300 | s=input()
ss=set(s)
a=["N","W","S","E"]
flg=False
if all(a[i] in s for i in range(4)):
flg=True
if a[0] in s and a[1] not in s and a[2] in s and a[3] not in s:
flg=True
if a[0] not in s and a[1] in s and a[2] not in s and a[3] in s:
flg=True
if flg:
print("Yes")
else:
print("No") | p04019 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip.
At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <... | SENW
| Yes
| 1,200,170 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.