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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
s105059203 | p04019 | u131453093 | 1592722928 | Python | Python (3.8.2) | py | Accepted | 30 | 9100 | 117 | s = set(list(input()))
if any(s == set(list(i)) for i in ["NS","EW","NEWS"]):
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,171 |
s471869372 | p04019 | u511457539 | 1592710344 | Python | Python (3.8.2) | py | Accepted | 28 | 9120 | 351 | N = str(input())
if N.count("N") > 0 and N.count("W") > 0 and N.count("S") > 0 and N.count("E") > 0:
print("Yes")
elif N.count("N") > 0 and N.count("W") == 0 and N.count("S") > 0 and N.count("E") == 0:
print("Yes")
elif N.count("N") == 0 and N.count("W") > 0 and N.count("S") == 0 and N.count("E") > 0:
prin... | 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,172 |
s358702182 | p04019 | u940780117 | 1592683416 | Python | Python (3.8.2) | py | Accepted | 28 | 9064 | 292 | S=input()
t=set()
for i in range(len(S)):
t.add(S[i])
if len(t)==4:
print('Yes')
elif len(t)==3:
print('No')
elif len(t)==2:
if 'N' in t and 'S' in t:
print('Yes')
elif 'W' in t and 'E' in t:
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,173 |
s506898809 | p04019 | u085717502 | 1592665373 | Python | Python (3.8.2) | py | Accepted | 29 | 9064 | 494 | #!/usr/bin/env python
# coding: utf-8
# In[7]:
S = input()
# In[8]:
s_set = set(S)
if "S" in s_set and "N" in s_set:
if "E" in s_set and "W" in s_set:
print("Yes")
elif "E" in s_set or "W" in s_set:
print("No")
else:
print("Yes")
elif "S" in s_set or "N" in s_set:
print("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,174 |
s650208446 | p04019 | u325956328 | 1592655949 | Python | Python (3.8.2) | py | Accepted | 29 | 9116 | 251 | S = set(list(input()))
if len(S) == 4:
ans = "Yes"
elif len(S) == 3 or len(S) == 1:
ans = "No"
else:
# print(list(S))
if ("N" in S and "S" in S) or ("E" in S and "W" in 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,175 |
s818396359 | p04019 | u442877951 | 1592633527 | Python | Python (3.8.2) | py | Accepted | 27 | 9064 | 314 | S = str(input())
vertical,side = ['N', 'S'], ['W', 'E']
ans1,ans2 = 0,0
for l in vertical:
if l in S:
ans1 += 1
for l in side:
if l in S:
ans2 += 1
if ans1 >= 2 and ans2 >= 2:
print('Yes')
elif ans1 >= 2 and ans2 == 0:
print('Yes')
elif ans1 == 0 and ans2 >= 2:
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,176 |
s111069897 | p04019 | u102461423 | 1592593371 | Python | Python (3.8.2) | py | Accepted | 28 | 9092 | 270 | import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
S = read().decode()
N, W, S, E = 'N' in S, 'W' in S, 'S' in S, 'E' in S
cond1 = not N ^ S
cond2 = not W ^ E
print('Yes' if cond1 and cond2 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,177 |
s831310093 | p04019 | u640922335 | 1592554622 | Python | Python (3.8.2) | py | Accepted | 26 | 9020 | 215 | S=input()
A=[]
for letter in S:
A.append(letter)
if ('N' in A and 'S' not in A) or ('S' in A and 'N' not in A) or ('E' in A and 'W' not in A)or ('W' in A and 'E' not in A):
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,178 |
s947504258 | p04019 | u687574784 | 1592537337 | Python | Python (3.8.2) | py | Accepted | 27 | 8988 | 121 | s = set(list(input()))
if any(s==set(list(cand)) for cand in ['NS','EW','NEWS']):
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,179 |
s762997301 | p04019 | u364386647 | 1592453749 | Python | Python (3.4.3) | py | Accepted | 17 | 3064 | 400 | def resolve():
S = str(input())
n = S.count('N')
s = S.count('S')
w = S.count('W')
e = S.count('E')
if n > 0 and s == 0:
print('No')
return
if n == 0 and s > 0:
print('No')
return
if w > 0 and e == 0:
print('No')
return
if w == 0 and 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,180 |
s696070775 | p04019 | u425762225 | 1592352191 | Python | Python (3.4.3) | py | Accepted | 21 | 3316 | 377 | #!/usr/bin/env python3
from collections import Counter
def solve(S):
s = Counter(S)
if len(S) == 1:
return "No"
elif (s["N"]*s["S"] == 0 and s["N"]+s["S"] > 0) or \
(s["E"]*s["W"] == 0 and s["E"]+s["W"] > 0):
return "No"
else:
return "Yes"
def main():
S = input()
... | 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,181 |
s577563700 | p04019 | u441246928 | 1592275873 | Python | Python (3.4.3) | py | Accepted | 17 | 2940 | 115 | s=input()
s=set(s)
if s=={"N","E","S","W"} or s=={"N","S"} or s=={"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,182 |
s368186631 | p04019 | u345778634 | 1592266143 | Python | Python (3.4.3) | py | Accepted | 18 | 2940 | 166 | S = input()
NEWS = {'N':0, 'E':0, 'W':0, 'S':0}
for char in S:
NEWS[char] = 1
if NEWS['N']^NEWS['S'] | NEWS['E']^NEWS['W']:
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,183 |
s041426605 | p04019 | u642012866 | 1592119249 | Python | Python (3.4.3) | py | Accepted | 17 | 3060 | 246 | S = input()
res = "Yes"
if "N" in S:
if "S" not in S:
res = "No"
if "W" in S:
if "E" not in S:
res = "No"
if "S" in S:
if "N" not in S:
res = "No"
if "E" in S:
if "W" not in S:
res = "No"
print(res) | 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,184 |
s626894357 | p04019 | u693694535 | 1592074040 | Python | Python (3.4.3) | py | Accepted | 17 | 3060 | 223 | 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,185 |
s456057608 | p04019 | u509739538 | 1591991496 | Python | Python (3.4.3) | py | Accepted | 22 | 3572 | 3,042 | import math
from collections import deque
from collections import defaultdict
import itertools as it
#自作関数群
def readInt():
return int(input())
def readInts():
return list(map(int, input().split()))
def readChar():
return input()
def readChars():
return input().split()
def factorization(n):
res = []
if n%2==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,186 |
s763822445 | p04019 | u238940874 | 1591977475 | Python | Python (3.4.3) | py | Accepted | 17 | 3060 | 114 | s=input()
s=set(s)
if s=={"N","E","S","W"} or s=={"N","S"} or s=={"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,187 |
s466508903 | p04019 | u474925961 | 1591921953 | Python | Python (3.4.3) | py | Accepted | 17 | 3060 | 154 | s=list(input())
p=set(s)
if p=={"N","S"} or p=={"W","E"} or p=={"N","E","W","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,188 |
s239365064 | p04019 | u514118270 | 1591823019 | Python | Python (3.4.3) | py | Accepted | 17 | 3060 | 266 | S = list(input())
if 'N' in S and 'W' in S and 'S' in S and 'E' in S:
print('Yes')
elif 'N' in S and 'S' in S and 'W' not in S and 'E' not in S:
print('Yes')
elif 'N' not in S and 'S' not in S and 'W' in S and 'E' 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,189 |
s691497279 | p04019 | u168416324 | 1591809654 | Python | Python (3.4.3) | py | Accepted | 17 | 2940 | 162 | s=input()
pr=True
if (s.count("N")==0)^(s.count("S")==0):
pr=False
if (s.count("E")==0)^(s.count("W")==0):
pr=False
if pr:
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,190 |
s093989176 | p04019 | u285891772 | 1591800470 | Python | Python (3.4.3) | py | Accepted | 38 | 5200 | 1,038 | import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, tan, asin, acos, atan, radians, degrees#, log2, log
from itertools import accumulate, permutations, combinations, combinations_with_replacement, product, groupby
from operator import itemgette... | 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,191 |
s488119526 | p04019 | u285891772 | 1591800358 | Python | Python (3.4.3) | py | Accepted | 39 | 5196 | 1,127 | import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, tan, asin, acos, atan, radians, degrees#, log2, log
from itertools import accumulate, permutations, combinations, combinations_with_replacement, product, groupby
from operator import itemgette... | 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,192 |
s105199371 | p04019 | u723583932 | 1591675260 | Python | Python (3.4.3) | py | Accepted | 17 | 2940 | 184 | s=input()
ryoko={'S':False,'N':False,'W':False,'E':False}
for c in s:
ryoko[c]=True
if (ryoko['S']!=ryoko['N']) or (ryoko['W']!=ryoko['E']):
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,193 |
s824393658 | p04019 | u382423941 | 1591673768 | Python | Python (3.4.3) | py | Accepted | 17 | 2940 | 224 | 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,194 |
s297411883 | p04019 | u630096262 | 1591672704 | Python | Python (3.4.3) | py | Accepted | 18 | 3064 | 470 | s = input()
p = ['N', 'S', 'E', 'W']
cnt = []
for i in p:
cnt.append(s.count(i))
if cnt[0] != 0 and cnt[1] != 0 or cnt[0] == 0 and cnt[1] == 0:
if cnt[2] != 0 and cnt[3] != 0 or cnt[2] == 0 and cnt[3] == 0:
print("Yes")
else:
print("No")
elif cnt[2] != 0 and cnt[3] != 0 or cnt[2] == 0 and cn... | 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,195 |
s659619939 | p04019 | u629350026 | 1591663050 | Python | Python (3.4.3) | py | Accepted | 17 | 3060 | 227 | s=str(input())
s=list(s)
if "W" in s and "E" not in s:
print("No")
elif "E" in s and "W" not in s:
print("No")
elif "N" in s and "S" not in s:
print("No")
elif "S" in s and "N" 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,196 |
s319971884 | p04019 | u193927973 | 1591640828 | Python | Python (3.4.3) | py | Accepted | 17 | 3060 | 199 | s=list(input())
m=set(s)
if len(m)==4:
print("Yes")
elif len(m)==2:
c1="S" in m and "N" in m
c2="W" in m and "E" in m
if c1 or c2:
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,197 |
s739473956 | p04019 | u374802266 | 1591579849 | Python | Python (3.4.3) | py | Accepted | 18 | 3060 | 148 | s=input()
print('No' 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 else '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,198 |
s539691031 | p04019 | u782930273 | 1591494861 | Python | Python (3.4.3) | py | Accepted | 18 | 3064 | 288 | S = input()
count = {s: 0 for s in "NWSE"}
for s in S:
count[s] += 1
if count["N"] == 0 and count["S"] >= 1 or count["N"] >= 1 and count["S"] == 0:
print("No")
elif count["E"] == 0 and count["W"] >= 1 or count["E"] >= 1 and count["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,199 |
s057711170 | p04019 | u344122377 | 1591374957 | Python | Python (3.4.3) | py | Accepted | 18 | 2940 | 107 | s = input();
st = set(s)
print("Yes" if st == set("WE") or st == set("NS") or st == set("SENW") 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,200 |
s733572971 | p04019 | u742729271 | 1591325832 | Python | Python (3.4.3) | py | Accepted | 18 | 3060 | 174 | S = input()
n = S.count("N")
s = S.count("S")
w = S.count("W")
e = S.count("E")
if (n>0 and s>0 or n==s==0) and (w>0 and e>0 or w==e==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,201 |
s035962391 | p04019 | u580316619 | 1591313132 | Python | Python (3.4.3) | py | Accepted | 20 | 3316 | 265 | import collections
s=input()
a=collections.Counter(s)
f=True
if a['N']>0:
if a['S']==0:
f=False
if a['S']>0:
if a['N']==0:
f=False
if a['W']>0:
if a['E']==0:
f=False
if a['E']>0:
if a['W']==0:
f=False
if f:
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,202 |
s707056145 | p04019 | u830054172 | 1591278867 | Python | Python (3.4.3) | py | Accepted | 21 | 3316 | 213 | from collections import Counter
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,203 |
s066504304 | p04019 | u745514010 | 1591249283 | Python | Python (3.4.3) | py | Accepted | 18 | 3060 | 251 | string = input()
news = "NEWS"
flg = [False for _ in range(4)]
for s in string:
for i in range(4):
if s == news[i]:
flg[i] = True
break
if flg[0] != flg[3] or flg[1] != flg[2]:
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,204 |
s545752319 | p04019 | u742899538 | 1591205056 | Python | Python (3.4.3) | py | Accepted | 17 | 3060 | 545 | S = list(input())
dir_set = set()
for s in S:
dir_set.add(s)
if 'N' in dir_set and 'S' in dir_set and 'W' in dir_set and 'E' in dir_set:
### "NSFW" 全部ある場合
print("Yes")
elif not 'N' in dir_set and not 'S' in dir_set and 'W' in dir_set and 'E' in dir_set:
### "NS" はなく "EW" が両方ある場合
print("Yes")
el... | 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,205 |
s306495655 | p04019 | u713914478 | 1591193016 | Python | Python (3.4.3) | py | Accepted | 17 | 2940 | 252 | s = input()
if "N" in s and "S" in s and "W" in s and "E" in s:
print("Yes")
elif not "N" in s and not "S" in s and "W" in s and "E" in s:
print("Yes")
elif "N" in s and "S" in s and not "W" in s and not "E" 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,206 |
s860806378 | p04019 | u151785909 | 1591156215 | Python | Python (3.4.3) | py | Accepted | 17 | 3060 | 222 | t = input()
n = t.count('N')
s = t.count('S')
w = t.count('W')
e = t.count('E')
if (n>0 and s>0 and w>0 and e>0)or(n==0 and s==0 and w>0 and e>0) or (n>0 and s>0 and w==0 and e==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,207 |
s843746739 | p04019 | u366886346 | 1591155873 | Python | Python (3.4.3) | py | Accepted | 17 | 3060 | 360 | s=input()
N=s.count("N")
W=s.count("W")
S=s.count("S")
E=s.count("E")
if N==0 and S==0:
if E==0 and W==0:
print("Yes")
elif E>0 and W>0:
print("Yes")
else:
print("No")
elif N>0 and S>0:
if E==0 and W==0:
print("Yes")
elif E>0 and W>0:
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,208 |
s230820967 | p04019 | u098012509 | 1591071305 | Python | Python (3.4.3) | py | Accepted | 17 | 3060 | 405 | import sys
sys.setrecursionlimit(10 ** 8)
input = sys.stdin.readline
def main():
S = input().strip()
n = S.count("N")
s = S.count("S")
w = S.count("W")
e = S.count("E")
if (n == 0 and s != 0) or (n != 0 and s == 0) or (w != 0 and e == 0) or (w == 0 and e != 0):
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,209 |
s165668511 | p04019 | u471539833 | 1591070146 | Python | Python (3.4.3) | py | Accepted | 18 | 3060 | 201 | S=input()
nsflag=False
weflag=False
if(("N" in S and "S" in S)or("N" not in S and "S" not in S)):
if(("W" in S and "E" in S)or("W" not in S and "E" 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,210 |
s017371254 | p04019 | u453642820 | 1591027572 | Python | Python (3.4.3) | py | Accepted | 17 | 3060 | 262 | S=input()
if S.count("N")>=1 and S.count("S")==0:
print("No")
elif S.count("S")>=1 and S.count("N")==0:
print("No")
elif S.count("W")>=1 and S.count("E")==0:
print("No")
elif S.count("E")>=1 and S.count("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,211 |
s729542632 | p04019 | u528661669 | 1591024656 | Python | Python (3.4.3) | py | Accepted | 20 | 3064 | 492 | Count = [0,0,0,0]
for j in input():
if j == 'N':
Count[0] +=1
elif j == 'S':
Count[1] +=1
elif j == 'W':
Count[2] +=1
elif j == 'E':
Count[3] +=1
if (Count[0] > 0 and Count[1] > 0) and (Count[2] > 0 and Count[3] > 0):
print("Yes")
elif (Count[0] == 0 and Count[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,212 |
s020468859 | p04019 | u459150945 | 1590967512 | Python | Python (3.4.3) | py | Accepted | 17 | 3060 | 237 | S = input()
n, w = S.count('N'), S.count('W')
s, e = S.count('S'), S.count('E')
flag = True
if n == 0 or s == 0:
if n != s:
flag = False
if w == 0 or e == 0:
if w != e:
flag = False
print('Yes' if flag 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,213 |
s035905190 | p04019 | u934442292 | 1590956392 | Python | Python (3.4.3) | py | Accepted | 18 | 3068 | 501 | import sys
input = sys.stdin.readline
def main():
S = input().rstrip()
go_back_home = True
if "N" in S:
if "S" not in S:
go_back_home = False
if "S" in S:
if "N" not in S:
go_back_home = False
if "W" in S:
if "E" not in S:
go_back_home ... | 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,214 |
s716653965 | p04019 | u724742135 | 1590945626 | Python | Python (3.4.3) | py | Accepted | 18 | 2940 | 214 | from sys import stdin
S = stdin.readline().rstrip()
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,215 |
s933003166 | p04019 | u102223485 | 1590800686 | Python | Python (3.4.3) | py | Accepted | 18 | 2940 | 157 | # coding: utf-8
S = set(input())
i = {'N', 'S'}
j = {'W', 'E'}
k = {'N', 'S', 'W', 'E'}
if S == i or S == j or S == k:
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,216 |
s504592097 | p04019 | u263226212 | 1590797019 | Python | Python (3.4.3) | py | Accepted | 17 | 3060 | 243 | s = input()
x = 0
y = 0
s = list(set(s))
for i in range(len(s)):
if s[i] == 'N':
y += 1
elif s[i] == 'W':
x -= 1
elif s[i] == 'S':
y -= 1
else:
x += 1
print('Yes' if x == 0 and y == 0 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,217 |
s361753509 | p04019 | u227085629 | 1590763462 | Python | Python (3.4.3) | py | Accepted | 17 | 3060 | 162 | s = input()
c = 0
d = 0
if 'W' in s:
c += 1
if 'E' in s:
c -= 1
if 'N' in s:
d += 1
if 'S' in s:
d -= 1
if c == d == 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,218 |
s992422265 | p04019 | u597374218 | 1590714782 | Python | Python (3.4.3) | py | Accepted | 18 | 2940 | 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,219 |
s145278125 | p04019 | u597374218 | 1590714585 | Python | Python (3.4.3) | py | Accepted | 18 | 2940 | 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,220 |
s085361420 | p04019 | u597374218 | 1590714236 | Python | Python (3.4.3) | py | Accepted | 17 | 2940 | 105 | S="".join(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,221 |
s047887535 | p04019 | u888092736 | 1590634166 | Python | Python (3.4.3) | py | Accepted | 17 | 2940 | 269 | S = input()
has_N = "N" in S
has_S = "S" in S
has_E = "E" in S
has_W = "W" in S
reachable_NS = has_N and has_S or not has_N and not has_S
reachable_SW = has_E and has_W or not has_E and not has_W
if reachable_NS and reachable_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,222 |
s544238253 | p04019 | u314089899 | 1590624781 | Python | Python (3.4.3) | py | Accepted | 19 | 3060 | 268 | S = str(input())
if (S.count("N") !=0 and S.count("S") !=0) or (S.count("N") ==0 and S.count("S") ==0):
if (S.count("W") !=0 and S.count("E") !=0) or (S.count("W") ==0 and S.count("E") ==0):
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,223 |
s883507709 | p04019 | u391819434 | 1590549166 | Python | Python (3.4.3) | py | Accepted | 17 | 3060 | 248 | S=input()
ans='Yes'
if S.count('N')>=1 and S.count('S')==0:
ans='No'
elif S.count('S')>=1 and S.count('N')==0:
ans='No'
elif S.count('E')>=1 and S.count('W')==0:
ans='No'
elif S.count('W')>=1 and S.count('E')==0:
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,224 |
s639664661 | p04019 | u351892848 | 1590544502 | Python | Python (3.4.3) | py | Accepted | 21 | 3316 | 270 | from collections import Counter
S = list(input())
c = Counter(S)
ans = True
if (c["N"]> 0 and c["S"] == 0) or (c["N"]== 0 and c["S"] > 0) or (c["W"] > 0 and c["E"] == 0) or (c["W"] == 0 and c["E"] > 0):
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,225 |
s551358192 | p04019 | u371385198 | 1590527212 | Python | Python (3.4.3) | py | Accepted | 17 | 2940 | 188 | S = set(input())
if len(S) == 2:
if len(S & {'N', 'S'}) == 2 or len(S & {'E', 'W'}) == 2:
print('Yes')
else:
print('No')
elif len(S) == 4:
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,226 |
s583738615 | p04019 | u408620326 | 1590522425 | Python | Python (3.4.3) | py | Accepted | 17 | 2940 | 110 | s = list(input())
if ('N' in s) == ('S' in s) and ('E' in s) == ('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,227 |
s215592831 | p04019 | u579015878 | 1590505619 | Python | Python (3.4.3) | py | Accepted | 19 | 3188 | 212 | s=list(input())
ss=len(set(s))
if ss==1 or ss==3:
print('No')
elif ss==4:
print('Yes')
else:
if 'N' in s and 'S' in s:
print('Yes')
elif 'W' in s and 'E' 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,228 |
s641173827 | p04019 | u370331385 | 1590449115 | Python | Python (3.4.3) | py | Accepted | 17 | 3064 | 316 | S = list(input())
S = list(set(S))
n,w,s,e = 0,0,0,0
for i in range(len(S)):
if(S[i] == 'N'): n = 1
elif(S[i] == 'W'): w = 1
elif(S[i] == 'S'): s = 1
elif(S[i] == 'E'): e = 1
judge = [n,w,s,e]
if((judge == [1,0,1,0])or(judge == [0,1,0,1])or(judge == [1,1,1,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,229 |
s460147194 | p04019 | u924691798 | 1590447336 | Python | Python (3.4.3) | py | Accepted | 20 | 3316 | 191 | from collections import defaultdict
S = input()
dic = defaultdict(bool)
for s in S:
dic[s] = True
if dic["N"] != dic["S"] or dic["W"] != dic["E"]:
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,230 |
s568906858 | p04019 | u220394041 | 1590447335 | Python | Python (3.4.3) | py | Accepted | 17 | 3060 | 337 | st = input()
if "N" in st:
if ("S" in st) is False:
print("No")
exit()
if "W" in st:
if ("E" in st) is False:
print("No")
exit()
if "S" in st:
if ("N" in st) is False:
print("No")
exit()
if "E" in st:
if ("W" in st) is False:
print("No")
ex... | 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,231 |
s602222131 | p04019 | u941047297 | 1590351910 | Python | Python (3.4.3) | py | Accepted | 20 | 3316 | 292 | from collections import Counter
S = list(input())
def zeroandnot0(a, b):
if (a == 0 and b != 0) or (a != 0 and b == 0):
return True
else:
return False
c = Counter(S)
if zeroandnot0(c['E'], c['W']) or zeroandnot0(c['N'], c['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,232 |
s915503537 | p04019 | u178432859 | 1590297188 | Python | Python (3.4.3) | py | Accepted | 17 | 3064 | 274 | s = list(set(input()))
l = [["N","S"], ["W","E"], ["N", "S", "W", "E"]]
if len(s) != 2 and len(s) != 4:
print("No")
exit()
for i in l:
x = 0
for j in s:
if j in i:
x += 1
if x == len(i):
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,233 |
s545943438 | p04019 | u057415180 | 1590289119 | Python | Python (3.4.3) | py | Accepted | 17 | 2940 | 192 | s = input()
if ('N' in s and 'S' in s) or ('N' not in s and 'S' not in s):
if ('W' in s and 'E' in s) or ('W' not in s and 'E' 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,234 |
s465332874 | p04019 | u871980676 | 1590259145 | Python | Python (3.4.3) | py | Accepted | 17 | 3060 | 284 | s=input()
res = ''
if 'N' in s:
if 'S' not in s:
res = 'No'
if 'S' in s:
if 'N' not in s:
res = 'No'
if 'E' in s:
if 'W' not in s:
res = 'No'
if 'W' in s:
if 'E' not in s:
res = 'No'
if res == '':
print('Yes')
else:
print(res)
| 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,235 |
s110178136 | p04019 | u725133562 | 1590215765 | Python | Python (3.4.3) | py | Accepted | 17 | 3060 | 188 | s = input()
l = len(s)
judge = 0
if 'N' in s:
judge += 1000
if 'W' in s:
judge += 1
if 'S' in s:
judge -= 1000
if 'E' in s:
judge -= 1
print('Yes' if judge == 0 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,236 |
s303329493 | p04019 | u106181248 | 1590198696 | Python | Python (3.4.3) | py | Accepted | 17 | 3060 | 266 | s = list(input())
x = 0
y = 0
if (s.count("S") > 0 and s.count("N") > 0) or (s.count("S") == 0 and s.count("N") == 0):
if (s.count("E") > 0 and s.count("W") > 0) or (s.count("E") == 0 and s.count("W") == 0):
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,237 |
s742898869 | p04019 | u657901243 | 1590169934 | Python | Python (3.4.3) | py | Accepted | 17 | 3060 | 247 | S = input()
res = "Yes"
if S.count('N') and not S.count('S'):
res = "No"
if not S.count('N') and S.count('S'):
res = "No"
if S.count('E') and not S.count('W'):
res = "No"
if not S.count('E') and S.count('W'):
res = "No"
print(res)
| 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,238 |
s887896511 | p04019 | u680503348 | 1590165889 | Python | Python (3.4.3) | py | Accepted | 18 | 3064 | 838 | # For taking integer inputs.
import math
def inp():
return(int(input()))
# For taking List inputs.
def inlist():
return(list(map(int, input().split())))
# For taking string inputs. Actually it returns a List of Characters, instead of a string, which is easier to use in Python, because in Python, Strings 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,239 |
s667435283 | p04019 | u462329577 | 1590120749 | Python | Python (3.4.3) | py | Accepted | 17 | 2940 | 190 | s = input()
if ("N" in s and "S" in s) or ("N" not in s and "S" not in s):
if ("W" in s and "E" in s) or ("W" not in s and "E" 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,240 |
s263870481 | p04019 | u922449550 | 1590116448 | Python | Python (3.4.3) | py | Accepted | 17 | 3060 | 148 | S = input()
n = int('N' in S)
s = int('S' in S)
w = int('W' in S)
e = int('E' in S)
if n + s == 1 or w + e == 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,241 |
s738324641 | p04019 | u788137651 | 1590035963 | Python | Python (3.4.3) | py | Accepted | 41 | 5460 | 1,559 | #
# ⋀_⋀
# (・ω・)
# ./ U ∽ U\
# │* 合 *│
# │* 格 *│
# │* 祈 *│
# │* 願 *│
# │* *│
#  ̄
#
import sys
sys.setrecursionlimit(10**6)
input=sys.stdin.readline
from math import floor,sqrt,factorial,hypot,log #log2ないyp
from heapq import heappop, heappush, heappushpop
from collections import Counter,default... | 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,242 |
s306284684 | p04019 | u663767599 | 1590027946 | Python | Python (3.4.3) | py | Accepted | 22 | 3316 | 258 | from collections import Counter
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 "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,243 |
s147721144 | p04019 | u394731058 | 1590005652 | Python | Python (3.4.3) | py | Accepted | 17 | 2940 | 236 | import sys
input = sys.stdin.readline
def main():
S = input().rstrip('\n')
if (('S' in S) == ('N' in S)) and (('E' in S) == ('W' in S)):
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,244 |
s151686482 | p04019 | u394731058 | 1590004607 | Python | Python (3.4.3) | py | Accepted | 17 | 3064 | 457 | import sys
input = sys.stdin.readline
def main():
snflg = True
ewflg = True
S = input().rstrip('\n')
if 'S' in S or 'N' in S:
snflg = False
if 'S' in S and 'N' in S:
snflg = 'Yes'
if 'E' in S or 'W' in S:
ewflg = False
if 'E' in S and 'W' in S:
... | 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,245 |
s032235913 | p04019 | u482157295 | 1590004345 | Python | Python (3.4.3) | py | Accepted | 18 | 3064 | 337 | s = input()
ok = True
if s.count("N") >= 1:
if s.count("S") == 0:
ok = False
if s.count("S") >= 1:
if s.count("N") == 0:
ok = False
if s.count("E") >= 1:
if s.count("W") == 0:
ok = False
if s.count("W") >= 1:
if s.count("E") == 0:
ok = False
if ok:
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,246 |
s995061445 | p04019 | u229156891 | 1589986296 | Python | Python (3.4.3) | py | Accepted | 17 | 3064 | 241 | S = input()
S_set = set(S)
if len(S_set) % 2 == 0:
if S_set == set() or S_set == set(['N', 'S']) or S_set == set(['E', 'W']) or S_set == set(['N', 'S', 'E', '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,247 |
s989565688 | p04019 | u339199690 | 1589985970 | Python | Python (3.4.3) | py | Accepted | 20 | 2940 | 268 | S = list(input())
if "N" in S and "W" not in S and "S" in S and "E" not in S:
print("Yes")
elif "N" not in S and "W" in S and "S" not in S and "E" in S:
print("Yes")
elif "N" in S and "W" in S and "S" in S and "E" 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,248 |
s783477731 | p04019 | u810288681 | 1589954510 | Python | Python (3.4.3) | py | Accepted | 17 | 3060 | 260 | s = input()
if 'S' in s and 'N' in s and 'W' in s and 'E' in s:
print('Yes')
elif 'S' in s and 'N' in s and 'W' not in s and 'E' not in s:
print('Yes')
elif 'S' not in s and 'N' not in s and 'W' in s and 'E' 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,249 |
s029886540 | p04019 | u409306788 | 1589898985 | Python | Python (3.4.3) | py | Accepted | 18 | 3064 | 381 | # A - Wanna go back home
def can_go_home(dir1, dir2):
if dir1 > 0 and dir2 > 0:
return True
elif dir1 == 0 and dir2 == 0:
return True
else:
return False
n, w, s, e = 0, 0, 0, 0
for dir in input():
if dir == 'N':
n += 1
elif dir == 'W':
w += 1
elif dir == 'S':
s += 1
else:
e += 1
if can_go_home(... | 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,250 |
s136020762 | p04019 | u221285045 | 1589872173 | Python | Python (3.4.3) | py | Accepted | 26 | 3952 | 536 | from sys import stdin
import math
import re
import queue
input = stdin.readline
MOD = 1000000007
def solve():
str = (input().rstrip())
W = 0
N = 0
S = 0
E = 0
for s in str:
if(s == 'W'):
W += 1
elif(s =='E'):
E += 1
elif(s == '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,251 |
s090359357 | p04019 | u408375121 | 1589847075 | Python | Python (3.4.3) | py | Accepted | 18 | 3064 | 464 | s = input()
n_cnt = 0
s_cnt = 0
e_cnt = 0
w_cnt = 0
for i in range(len(s)):
if s[i] == 'N':
n_cnt += 1
if s[i] == 'S':
s_cnt += 1
if s[i] == 'W':
w_cnt += 1
if s[i] == 'E':
e_cnt += 1
if (n_cnt > 0 and s_cnt > 0) or (n_cnt == 0 and s_cnt == 0):
length = True
else:
length = False
if (e_cnt > ... | 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,252 |
s240544410 | p04019 | u751717561 | 1589756354 | Python | Python (3.4.3) | py | Accepted | 17 | 3060 | 220 | s = list(input())
k, m, n, h = 0, 0, 0, 0
if 'N' in s:
k = 1
if 'S' in s:
m = 1
if 'W' in s:
n = 1
if 'E' in s:
h = 1
if (abs(k-m))%2 == 0 and (abs(n-h))%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,253 |
s011833609 | p04019 | u474423089 | 1589686177 | Python | Python (3.4.3) | py | Accepted | 17 | 2940 | 125 | S=list(set(input()))
if len(S)==4 or set(S)==set(['N','S']) or set(S)==set(['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,254 |
s551012888 | p04019 | u731322489 | 1589655001 | Python | Python (3.4.3) | py | Accepted | 18 | 2940 | 186 | S = input()
cannot = [
"N" in S and "S" not in S,
"N" not in S and "S" in S,
"W" in S and "E" not in S,
"W" not in S and "E" in S,
]
print("No" if any(cannot) else "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,255 |
s699007431 | p04019 | u502731482 | 1589605240 | Python | Python (3.4.3) | py | Accepted | 18 | 3060 | 273 | s = input()
flag = [0] * 4
for i in range(len(s)):
if s[i] == "N":
flag[0] = 1
elif s[i] == "W":
flag[1] = 1
elif s[i] == "S":
flag[2] = 1
else:
flag[3] = 1
print("Yes" if flag[0] == flag[2] and flag[1] == flag[3] 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,256 |
s230503726 | p04019 | u178079174 | 1589590290 | Python | Python (3.4.3) | py | Accepted | 19 | 3060 | 219 | 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('E') > 0 and S.count('W') == 0 or S.count('E') == 0 and S.count('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,257 |
s540683629 | p04019 | u215341636 | 1589552880 | Python | Python (3.4.3) | py | Accepted | 17 | 2940 | 227 | s = input()
answer = "Yes"
if "N" in s and "S" not in s:
answer = "No"
elif "S" in s and "N" not in s:
answer = "No"
elif "W" in s and "E" not in s:
answer = "No"
elif "E" in s and "W" not in s:
answer = "No"
print(answer)
| 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,258 |
s935687593 | p04019 | u860002137 | 1589505892 | Python | Python (3.4.3) | py | Accepted | 18 | 3060 | 188 | S = input()
NS = (("S" in S) & ("N" in S)) | (("S" not in S) & ("N" not in S))
EW = (("E" in S) & ("W" in S)) | (("E" not in S) & ("W" not in S))
print("Yes") if NS & EW 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,259 |
s319255431 | p04019 | u849229491 | 1589430504 | Python | Python (3.8.2) | py | Accepted | 24 | 9032 | 100 | 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,260 |
s158330820 | p04019 | u652656291 | 1589376294 | Python | Python (3.4.3) | py | Accepted | 23 | 3064 | 215 | s = input()
N = s.count('N')
S = s.count('S')
E = s.count('E')
W = s.count('W')
if ((N >= 1 and S == 0) or (N == 0 and S >= 1) or
(E >= 1 and W == 0) or (E == 0 and W >= 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,261 |
s496385708 | p04019 | u652656291 | 1589375792 | Python | Python (3.4.3) | py | Accepted | 17 | 2940 | 112 | S =input()
if (('N' in S) == ('S' in S)) and (('W' in S) == ('E' 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,262 |
s644657140 | p04019 | u134019875 | 1589335010 | Python | Python (3.4.3) | py | Accepted | 17 | 2940 | 301 | s = input()
if 'N' in s:
if 'S' not in s:
print('No')
exit()
if 'S' in s:
if 'N' not in s:
print('No')
exit()
if 'E' in s:
if 'W' not in s:
print('No')
exit()
if 'W' in s:
if 'E' not 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,263 |
s444836551 | p04019 | u863442865 | 1589334039 | Python | Python (3.4.3) | py | Accepted | 22 | 3316 | 658 | def main():
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**7)
from collections import Counter, deque
from itertools import combinations, permutations, accumulate, groupby, product
from bisect import bisect_left,bisect_right
from heapq import heapify, heappop, heappush
im... | 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,264 |
s703398462 | p04019 | u711238850 | 1589304203 | Python | Python (3.4.3) | py | Accepted | 17 | 3064 | 527 | s = set(list(input()))
if 'N' in s:
if not 'S' in s:
print("No")
exit()
elif len(s) == 2 or len(s)==4:
print("Yes")
exit()
if 'S' in s:
if not 'N' in s:
print("No")
exit()
elif len(s) == 2 or len(s)==4:
print("Yes")
exit()
if 'W' in s:
if not 'E' in s:
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,265 |
s706866941 | p04019 | u048176319 | 1589239430 | Python | Python (3.4.3) | py | Accepted | 17 | 3064 | 513 | S = input()
if "N" in S:
if "S" not in S:
print("No")
elif "E" in S:
if "W" not in S:
print("No")
else:
print("Yes")
else:
if "W" in S:
print("No")
else:
print("Yes")
else:
if "S" in S:
print("No")
eli... | 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,266 |
s563883255 | p04019 | u902151549 | 1589232432 | Python | Python (3.4.3) | py | Accepted | 58 | 6252 | 3,597 | # coding: utf-8
import re
import math
from collections import defaultdict
from collections import deque
import itertools
from copy import deepcopy
import random
import time
import os
import queue
import sys
import datetime
from functools import lru_cache
#@lru_cache(maxsize=None)
readline=sys.stdin.readline
sys.setrecu... | 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,267 |
s866784477 | p04019 | u948522631 | 1589144232 | Python | Python (3.4.3) | py | Accepted | 17 | 3060 | 277 | s = input()
count = {"N":0, "W":0, "S":0, "E":0}
for i in s:
count[i] += 1
if ((count["N"] != 0 and count["S"] != 0) or (count["N"] == count["S"] == 0))and ((count["W"] != 0 and count["E"] != 0) or (count["W"] == count["E"] == 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,268 |
s553688605 | p04019 | u729294108 | 1589143000 | Python | Python (3.4.3) | py | Accepted | 18 | 3060 | 409 | s = input().strip()
counts = {
'N': 0, 'W': 0, 'S': 0, 'E': 0
}
for c in s:
counts[c] += 1
def judge():
if counts['N'] > 0 or counts['S'] > 0:
if counts['N'] * counts['S'] == 0:
return False
if counts['W'] > 0 or counts['E'] > 0:
if counts['W'] * counts['E'] == 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,269 |
s447548392 | p04019 | u683406607 | 1589071464 | Python | Python (3.4.3) | py | Accepted | 18 | 3060 | 215 | 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,270 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.