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
s548361298
p04019
u580362735
1552776876
Python
Python (3.4.3)
py
Accepted
17
3060
266
S = list(input()) if S.count('S')!=0 and S.count('N')== 0: print('No') elif S.count('N')!=0 and S.count('S')== 0: print('No') elif S.count('E')!=0 and S.count('W')== 0: print('No') elif 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,671
s850397304
p04019
u350049649
1552767169
Python
Python (3.4.3)
py
Accepted
18
3060
177
S=input() v=S.count('N')==S.count('S') or S.count('N')*S.count('S')>0 h=S.count('E')==S.count('W') or S.count('E')*S.count('W')>0 if v and h: 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,672
s820495229
p04019
u562935282
1552766568
Python
Python (3.4.3)
py
Accepted
18
3060
215
s = input() N_in = ('N' in s) S_in = ('S' in s) E_in = ('E' in s) W_in = ('W' in s) bl = ((N_in and S_in) or (not N_in and not S_in)) and ((E_in and W_in) or (not E_in and not W_in)) print('Yes' if bl 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,673
s534253752
p04019
u282228874
1552751204
Python
Python (3.4.3)
py
Accepted
18
3060
187
S = list(input()) if ('S' in S and 'N' not in S) or ('N' in S and 'S' 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,674
s202563108
p04019
u620480037
1552620004
Python
Python (3.4.3)
py
Accepted
18
3064
240
s=list(input()) E=0 W=0 N=0 S=0 for i in range(len(s)): if s[i]=="E": E=1 elif s[i]=="W": W=1 elif s[i]=="N": N=1 elif s[i]=="S": S=1 if E==W and N==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,675
s843456457
p04019
u887207211
1552460216
Python
Python (3.4.3)
py
Accepted
17
2940
106
S = input() ans = "No" if(("N" in S) == ("S" in S) and ("W" in S) == ("E" in S)): 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,676
s860506624
p04019
u977389981
1552421731
Python
Python (3.4.3)
py
Accepted
18
3060
246
S = 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) or (n == 0 and s == 0 and e > 0 and w > 0) or (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,677
s936462770
p04019
u924715151
1552367546
Python
Python (3.4.3)
py
Accepted
17
3064
296
s = input() result = "Yes" if s.find('N') > -1 : if s.find('S') == -1: result = "No" if s.find('S') > -1 : if s.find('N') == -1: result = "No" if s.find('W') > -1 : if s.find('E') == -1: result = "No" if s.find('E') > -1 : if s.find('W') == -1: result = "No" print(result)
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,678
s297872047
p04019
u543954314
1552231452
Python
Python (3.4.3)
py
Accepted
18
3060
226
s = input() b, c = 0, 0 if "N" in s and "S" in s: b = 1 elif "N" not in s and "S" not in s: b = 1 if "E" in s and "W" in s: c = 1 elif "E" not in s and "W" not in s: c = 1 if b and c: 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,679
s366129374
p04019
u158635223
1552166903
Python
Python (3.4.3)
py
Accepted
17
2940
173
def main(): s=set(input()) if(set("NS")==s or set("WE")==s or set("NSEW")==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,680
s474695179
p04019
u394721319
1551896300
Python
Python (3.4.3)
py
Accepted
19
3060
271
S = list(input()) flag = 0 if 'N' in S: if 'S' not in S: flag = 1 if 'S' in S: if 'N' not in S: flag = 1 if 'W' in S: if 'E' not in S: flag = 1 if 'E' in S: if 'W' not in S: flag = 1 print(['Yes', 'No'][flag])
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,681
s782927629
p04019
u852719059
1551755907
Python
Python (3.4.3)
py
Accepted
17
3060
359
s = input() back_home = True if 'N' in s: if 'S' not in s: back_home = False if 'S' in s: if 'N' not in s: back_home = False if 'E' in s: if 'W' not in s: back_home = False if 'W' in s: if 'E' not in s: back_home = False if 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,682
s419882028
p04019
u516272298
1551719713
Python
Python (3.4.3)
py
Accepted
18
3060
254
s = list(sorted(set(str(input())))) if len(s) == 2: if (s[0] == "N" and s[1] == "S") or (s[0] == "E" and s[1] == "W"): print("Yes") else: print("No") if len(s) == 1 or len(s) == 3: print("No") if len(s) == 4: 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,683
s535706260
p04019
u745087332
1551605202
Python
Python (3.4.3)
py
Accepted
21
3316
201
from collections import Counter s = input() C = Counter(s) if all([C['N'], C['S']]) is any([C['N'], C['S']]) and all([C['W'], C['E']]) is any([C['W'], C['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,684
s533000033
p04019
u033524082
1551583018
Python
Python (3.4.3)
py
Accepted
18
3060
260
s=input() if "N" in s and "S" in s and "W" in s and "E" in s: print("Yes") elif "N" in s and "S" in s: print("No" if "W" in s or "E" in s else "Yes") elif "W" in s and "E" in s: print("No" if "N" in s or "S" in s else "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,685
s851051568
p04019
u411858517
1551404543
Python
Python (3.4.3)
py
Accepted
17
3064
438
S = input() tmp = [0 for _ in range(4)] res = 'Yes' for i in range(len(S)): if S[i] == 'S': tmp[0] = 1 elif S[i] == 'N': tmp[1] = 1 elif S[i] == 'W': tmp[2] = 1 else: tmp[3] = 1 if tmp[0] == 1 and tmp[1] == 0: res = 'No' if tmp[1] == 1 and tmp[0] == 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,686
s113407899
p04019
u766684188
1551372946
Python
Python (3.4.3)
py
Accepted
17
2940
79
S=input() print('No' if ('N' in S)^('S' in S)|('E' in S)^('W' 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,687
s300485418
p04019
u766684188
1551372796
Python
Python (3.4.3)
py
Accepted
17
2940
88
S=input() print('No' if ('N' in S)+('S' in S)==1 or ('E' in S)+('W' in S)==1 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,688
s301201235
p04019
u945418216
1551342226
Python
Python (3.4.3)
py
Accepted
18
2940
141
ss = input() sn = (ss.count('S')>0) - (ss.count('N')>0) ew = (ss.count('W')>0) - (ss.count('E')>0) print('Yes' if sn==0 and ew==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,689
s855067742
p04019
u251123951
1551325352
Python
Python (3.4.3)
py
Accepted
17
3060
243
s=input() judge=True if "W" in s: if "E" not in s: judge=False if "E" in s: if "W" not in s: judge=False if "S" in s: if "N" not in s: judge=False if "N" in s: if "S" not in s: judge=False print("Yes") if judge 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,690
s039905579
p04019
u794173881
1551309534
Python
Python (3.4.3)
py
Accepted
18
3060
255
s = input() if s.count("N")==0 and s.count("S")>=1: print("No") elif s.count("N")>=1 and s.count("S")==0: print("No") elif s.count("E")==0 and s.count("W")>=1: 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,691
s773379975
p04019
u343904763
1551302944
Python
Python (3.4.3)
py
Accepted
18
3060
170
string_list=list(input()) N= "N"in string_list S= "S"in string_list E= "E"in string_list W= "W"in string_list if N^S==0 and 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,692
s384923528
p04019
u882209234
1551241065
Python
Python (3.4.3)
py
Accepted
18
3060
165
S = input() Ns = bool(S.count('N')) Ss = bool(S.count('S')) Es = bool(S.count('E')) Ws = bool(S.count('W')) if (Ns ^ Ss) or (Es ^ Ws): 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,693
s426172938
p04019
u367130284
1551239394
Python
Python (3.4.3)
py
Accepted
18
2940
144
s=set(input()) if len(s)%2==0: if s==set("SN") or s==set("WE") or s==set("SENW"): 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,694
s355014668
p04019
u652081898
1551228705
Python
Python (3.4.3)
py
Accepted
18
3064
353
s = input() length = len(s) x = [s[i] for i in range(length)] 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("...
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,695
s537148113
p04019
u303059352
1550296796
Python
Python (3.4.3)
py
Accepted
19
3064
513
import os import math import itertools INF, MOD = float("inf"), 1e9 + 7 MAX, MIN = -INF, INF dx1, dy1, dx2, dy2 = [-1, 0, 1, 0], [0, -1, 0, 1], [-1, 0, 1, -1, 1, -1, 0, 1], [-1, -1, -1, 0, 0, 1, 1, 1] def get_int(): return int(input()) def get_int_list(): return list(map(int, input().split())) while(True): ...
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,696
s392075099
p04019
u740284863
1550090286
Python
Python (3.4.3)
py
Accepted
17
3064
328
k = str(input()) n = 0 w = 0 s = 0 e = 0 for i in range(len(k)): if k[i] == "N": n += 1 elif k[i] == "W": w += 1 elif k[i] == "S": s += 1 else: e += 1 if (n == 0 and s > 0) or (s == 0 and n > 0) or (e == 0 and w > 0) or (w == 0 and e > 0): print("No") else: 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,697
s333077419
p04019
u950708010
1550008793
Python
Python (3.4.3)
py
Accepted
17
3064
222
s = input() ans = 'Yes' if ('N' in s): if not ('S' in s): ans = 'No' if ('W' in s): if not ('E' in s): ans = 'No' if ('S' in s): if not ('N' in s): ans = 'No' if ('E' in s): if not ('W' 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,698
s672863640
p04019
u270681687
1549971811
Python
Python (3.4.3)
py
Accepted
17
3064
312
s = input() N = 0 W = 0 S = 0 E = 0 for i in s: if i == "N": N += 1 elif i == "W": W += 1 elif i == "S": S += 1 elif i == "E": E += 1 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: 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,699
s329336648
p04019
u777923818
1549971106
Python
Python (3.4.3)
py
Accepted
17
2940
104
S = input() if (("N" in S) ^ ("S" in S)) | (("E" in S) ^ ("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,700
s192135046
p04019
u631277801
1549971024
Python
Python (3.4.3)
py
Accepted
21
3316
755
import sys stdin = sys.stdin sys.setrecursionlimit(10**8) def li(): return map(int, stdin.readline().split()) def li_(): return map(lambda x: int(x)-1, stdin.readline().split()) def lf(): return map(float, stdin.readline().split()) def ls(): return stdin.readline().split() def ns(): return stdin.readline().rstrip(...
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,701
s518357410
p04019
u761320129
1549970865
Python
Python (3.4.3)
py
Accepted
17
2940
205
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,702
s110465650
p04019
u052347048
1549921673
Python
Python (3.4.3)
py
Accepted
18
2940
113
a = input() for i in ["SN","EW","ENSW"]: if set(i) == set(a): 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,703
s616346722
p04019
u052347048
1549920460
Python
Python (3.4.3)
py
Accepted
17
2940
113
a = input() for i in ["SN","EW","ENSW"]: if set(i) == set(a): 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,704
s125061088
p04019
u599547273
1549919276
Python
Python (3.4.3)
py
Accepted
18
2940
62
print("NYoe s"[set(input())in map(set,["NS","EW","NSEW"])::2])
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,705
s135784192
p04019
u599547273
1549919239
Python
Python (3.4.3)
py
Accepted
17
2940
64
s=set;print("NYoe s"[s(input())in map(s,["NS","EW","NSEW"])::2])
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,706
s753933662
p04019
u599547273
1549918624
Python
Python (3.4.3)
py
Accepted
18
2940
75
s=set(input());print("YNeos"[1 in[(len(s&set(t)))for t in["NS","WE"]]::2])
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,707
s534510953
p04019
u599547273
1549918384
Python
Python (3.4.3)
py
Accepted
18
2940
113
S = input() S = set(S) if 1 not in [len(S&set(t)) for t in ["NS", "WE"]]: 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,708
s759940293
p04019
u928784113
1549608985
Python
Python (3.4.3)
py
Accepted
18
3060
204
S = str(input()) a = [] b = [] for i in S: if i == "N" or i == "S": a.append(i) else: b.append(i) if len(set(a)) == 1 or len(set(b)) == 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,709
s209477664
p04019
u375616706
1549580967
Python
Python (3.4.3)
py
Accepted
18
3060
348
# python template for atcoder1 import sys sys.setrecursionlimit(10**9) input = sys.stdin.readline s = input() ans = "Yes" if "W" in s: if not "E" in s: ans = "No" if "E" in s: if not "W" in s: ans = "No" if "N" in s: if not "S" in s: ans = "No" if "S" in s: if not "N" 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,710
s005746026
p04019
u272557899
1549153079
Python
Python (3.4.3)
py
Accepted
19
2940
253
s = input() if "E" in s and "W" in s and "N" in s and "S" in s: print("Yes") elif "E" in s and "W" in s and "N" not in s and "S" not in s: print("Yes") elif "E" not in s and "W" not 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,711
s220166184
p04019
u263933075
1549050458
Python
Python (3.4.3)
py
Accepted
18
3064
437
s=input() if (s.count('E')>0 and s.count('W')>0 and s.count('N')>0 and s.count('S')>0): print('Yes') elif ((s.count('E')==0 and s.count('W')==0)) and ((s.count('N')>0 and s.count('S')>0)): print('Yes') elif ((s.count('N')==0 and s.count('S')==0)) and ((s.count('E')>0 and s.count('W')>0)): print('Yes') elif ...
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,712
s343162634
p04019
u588341295
1548887714
Python
Python (3.4.3)
py
Accepted
42
5400
1,319
# -*- coding: utf-8 -*- import sys, re from collections import deque, defaultdict, Counter from math import sqrt, hypot, factorial, pi, sin, cos, radians if sys.version_info.minor >= 5: from math import gcd else: from fractions import gcd from heapq import heappop, heappush, heapify, heappushpop from bisect import bi...
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,713
s243980379
p04019
u102960641
1547687715
Python
Python (3.4.3)
py
Accepted
17
3060
135
n = set(list(input())) if n == set(["N","S"]) or n == set(["W","E"]) or n == set(["N","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,714
s049193528
p04019
u619819312
1547613569
Python
Python (3.4.3)
py
Accepted
18
3060
208
a=list(input()) if ("N" in a and"S"in a)or(not"N" in a and not "S" in a): if ("W" in a and"E"in a)or(not"W" in a and not "E" in a): 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,715
s096307350
p04019
u371467115
1547410925
Python
Python (3.4.3)
py
Accepted
18
2940
112
s=input() if ("S" in s)^("N" in s): print("No") elif ("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,716
s630228871
p04019
u004025573
1547177696
Python
Python (3.4.3)
py
Accepted
18
3064
214
S = input() n = 0 s = 0 e = 0 w = 0 for i in range(len(S)): if S[i]=='N': n = 1 elif S[i]=='S': s = 1 elif S[i]=='E': e = 1 else: w = 1 if abs(n-s)==1 or abs(e-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,717
s407485782
p04019
u181431922
1546633536
Python
Python (3.4.3)
py
Accepted
18
3060
224
s = input().strip() if not ('S' in s and 'N' in s) and ('S' in s or 'N' in s): print('No') exit() if not ('E' in s and 'W' in s) and ('E' in s or 'W' 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,718
s695342259
p04019
u633967774
1546616283
Python
Python (3.4.3)
py
Accepted
18
3064
291
S=input() rec={"N":0,"W":0,"S":0,"E":0} for i in S: rec[i]+=1 if rec["N"]>0 and rec["S"]==0: print("No") elif rec["N"]==0 and rec["S"]>0: print("No") elif rec["W"]>0 and rec["E"]==0: print("No") elif rec["W"]==0 and rec["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,719
s941641424
p04019
u785578220
1546563292
Python
Python (3.4.3)
py
Accepted
18
3060
161
a=list(input()) if len(set(a)) == 4 or ("N" in a and "S" in a and len(set(a)) ==2 )or("E" in a and "W" in a and len(set(a)) ==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,720
s540949950
p04019
u787562674
1546548731
Python
Python (3.4.3)
py
Accepted
26
3444
289
from collections import Counter S = input() set_S = set(list(S)) if len(set_S) == 2: if set_S == set(['N', 'S']): print('Yes') elif set_S == set(['W', 'E']): print('Yes') else: print('No') elif len(set_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,721
s106509230
p04019
u459233539
1546363747
Python
Python (3.4.3)
py
Accepted
18
3060
185
s = 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,722
s920660066
p04019
u459233539
1546363641
Python
Python (3.4.3)
py
Accepted
18
3060
184
s = 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,723
s688749360
p04019
u459233539
1546363609
Python
Python (3.4.3)
py
Accepted
18
3060
195
S = input() s = set(S) 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,724
s287983670
p04019
u728498511
1546125625
Python
Python (3.4.3)
py
Accepted
17
3060
173
s = list(input()) N = bool(s.count('N')) E = bool(s.count('E')) W = bool(s.count('W')) S = bool(s.count('S')) if (N ^ S) or (W ^ 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,725
s844052502
p04019
u848647227
1546108864
Python
Python (3.4.3)
py
Accepted
17
3060
260
ar = list(input()) br = set(ar) if len(br) == 4: print("Yes") elif len(br) == 1 or len(br) == 3: print("No") else: if "N" in br and "S" in br: print("Yes") elif "E" in br and "W" in br: 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,726
s086335602
p04019
u391331433
1546105030
Python
Python (2.7.6)
py
Accepted
13
2928
749
import sys from collections import deque import copy import math def get_read_func(fileobject): if fileobject == None : return raw_input else: return fileobject.readline def main(): if len(sys.argv) > 1: f = open(sys.argv[1]) else: f = None read_func = get_read_func...
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,727
s069539200
p04019
u371467115
1545856171
Python
Python (3.4.3)
py
Accepted
17
2940
126
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,728
s148698004
p04019
u983918956
1545815529
Python
Python (3.4.3)
py
Accepted
18
2940
149
S = input() S_set = set(S) if S_set == {"N","S"} or S_set == {"W","E"} or S_set == {"N","W","S","E"}: 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,729
s764507507
p04019
u445511055
1544902439
Python
Python (3.4.3)
py
Accepted
17
3064
679
# -*- coding: utf-8 -*- def main(): """Function.""" s = str(input()) N = s.count("N") W = s.count("W") S = s.count("S") E = s.count("E") ns_flag = -1 if N == 0 and S == 0: ns_flag = 1 elif N == 0 and S != 0: ns_flag = -1 elif N != 0 and S == 0: ns_flag...
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,730
s877837360
p04019
u063052907
1544830567
Python
Python (3.4.3)
py
Accepted
17
2940
122
# coding: utf-8 S = set(input()) if S==set("NSEW") or S==set("NS") or S==set("EW"): 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,731
s784852410
p04019
u063052907
1544830023
Python
Python (3.4.3)
py
Accepted
18
3060
252
# coding: utf-8 S = input() ans = "Yes" if ("N" in S) and ("S" not in S): ans = "No" elif ("S" in S) and ("N" not in S): ans = "No" elif ("E" in S) and ("W" not in S): ans = "No" elif ("W" in S) and ("E" not 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,732
s557645709
p04019
u001024152
1544725233
Python
Python (3.4.3)
py
Accepted
18
2940
195
S = input() s = set(S) 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,733
s985855930
p04019
u513081876
1544487156
Python
Python (3.4.3)
py
Accepted
18
3064
368
S = input() if S.count('E') >= 1 and S.count('W') >= 1 and S.count('N') >= 1 and S.count('S') >= 1: print('Yes') else: if S.count('E') == S.count('W') == 0 and S.count('N') >= 1 and S.count('S') >= 1: print('Yes') elif S.count('N') == S.count('S') == 0 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,734
s985800007
p04019
u557437077
1544391486
Python
Python (3.4.3)
py
Accepted
17
3064
479
s = input() news = [0, 0, 0, 0] for i in range(len(s)): if s[i] == "N": news[0] += 1 elif s[i] == "E": news[1] += 1 elif s[i] == "W": news[2] += 1 elif s[i] == "S": news[3] += 1 if news[0] > 0 and news[3] == 0: print("No") exit() if news[0] == 0 and news[3] > 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,735
s485557337
p04019
u226108478
1544386887
Python
Python (3.4.3)
py
Accepted
17
3060
468
# -*- coding: utf-8 -*- def main(): s = input() n_count = s.count('N') s_count = s.count('S') e_count = s.count('E') w_count = s.count('W') if n_count > 0 and s_count == 0: print('No') elif s_count > 0 and n_count == 0: print('No') elif e_count > 0 and w_count == 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,736
s776467060
p04019
u785220618
1544237837
Python
Python (3.4.3)
py
Accepted
18
2940
259
s = input() if 'N' in s and 'S' not in s: print('No') exit() elif 'S' in s and 'N' not in s: print('No') exit() elif 'W' in s and 'E' not in s: print('No') exit() elif 'E' in s and 'W' 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,737
s473161751
p04019
u844789719
1543427492
Python
Python (3.4.3)
py
Accepted
17
2940
106
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,738
s147551286
p04019
u693048766
1543259534
Python
Python (3.4.3)
py
Accepted
17
3064
239
ins = input().strip() if not ('S' in ins and 'N' in ins) and ('S' in ins or 'N' in ins): print('No') exit() if not ('E' in ins and 'W' in ins) and ('E' in ins or 'W' in ins): 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,739
s872494531
p04019
u047535298
1543213391
Python
Python (3.4.3)
py
Accepted
17
3064
378
S = input() NWSE = [0, 0, 0, 0] for c in S: if c=="N": NWSE[0]=1 elif c=="W": NWSE[1]=1 elif c=="S": NWSE[2]=1 else: NWSE[3]=1 if (NWSE[0] and not NWSE[1] and NWSE[2] and not NWSE[3]) or (not NWSE[0] and NWSE[1] and not NWSE[2] and NWSE[3]) or (NWSE[0] and NWSE[1] and NW...
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,740
s640986168
p04019
u339443002
1542951071
Python
Python (3.4.3)
py
Accepted
21
3316
333
from collections import defaultdict as dd s = input().strip() coll = dd(int) for el in s: coll[el] += 1 condition = ( min(coll["N"], coll["S"]) == 0 and max(coll["N"], coll["S"]) != 0 or min(coll["E"], coll["W"]) == 0 and max(coll["E"], coll["W"]) != 0) if condition: print("No") else: p...
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,741
s392451808
p04019
u505420467
1541903923
Python
Python (3.4.3)
py
Accepted
17
3060
325
s=list(input()) if s.count('W')>0 and s.count('E')>0 and s.count('N')>0 and s.count('S')>0: print("Yes") elif s.count('W')>0 and s.count('E')>0 and s.count('N')==0 and s.count('S')==0: print('Yes') elif s.count('W')==0 and s.count('E')==0 and s.count('N')>0 and s.count('S')>0: print('Yes') else: print("...
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,742
s521627098
p04019
u398846051
1541815389
Python
Python (3.4.3)
py
Accepted
18
2940
107
S = input() n = "N" in S s = "S" in S e = "E" in S w = "W" 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,743
s178920200
p04019
u214617707
1541641913
Python
Python (3.4.3)
py
Accepted
18
3060
313
S = input() rec = {"N": 0, "W": 0, "S": 0, "E": 0} for i in S: rec[i] += 1 if rec["N"] > 0 and rec["S"] == 0: print("No") elif rec["N"] == 0 and rec["S"] > 0: print("No") elif rec["W"] > 0 and rec["E"] == 0: print("No") elif rec["W"] == 0 and rec["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,744
s108133122
p04019
u427344224
1540907646
Python
Python (3.4.3)
py
Accepted
17
3064
380
S = input() n = S.count("N") s = S.count("S") e = S.count("E") w = S.count("W") home = False if n and s: if e and w: print("Yes") elif not e and not w: print("Yes") else: print("No") elif not n and not s: if e and w: print("Yes") elif not e and not w: print...
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,745
s301735145
p04019
u323680411
1540775340
Python
Python (3.4.3)
py
Accepted
18
3064
553
from sys import stdin def main() -> None: s = next_str() x = set() y = set() for c in s: if c == "N" or c == "S": y.add(c) if c == "W" or c == "E": x.add(c) if len(x) % 2 != 0 or len(y) % 2 != 0: print("No") else: print("Yes") def nex...
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,746
s159876782
p04019
u724892495
1540351317
Python
Python (3.4.3)
py
Accepted
17
3060
278
S = list({i for i in input()}) if len(S)==1 or len(S)==3: print("No") exit() elif len(S)==4: print("Yes") exit() else: if ('E' in S and 'W' in S) or ('N' in S and 'S' in S): print("Yes") exit() else: print("No") exit()
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,747
s497360043
p04019
u138486156
1540259252
Python
Python (3.4.3)
py
Accepted
17
2940
213
x = input() n = x.count("N") w = x.count("W") s = x.count("S") e = x.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: 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,748
s955595365
p04019
u533885955
1540144432
Python
Python (3.4.3)
py
Accepted
17
3064
371
news = str(input()) news = list(news) cn = news.count('N') ce = news.count('E') cw = news.count('W') cs = news.count('S') if cn > 0 and ce > 0 and cw > 0 and cs > 0 : print("Yes") elif cn == cs == 0: if cw > 0 and ce > 0: print("Yes") else: print("No") elif cw == ce == 0: if cn > 0 and cs > 0: print...
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,749
s424637572
p04019
u879870653
1539304335
Python
Python (3.4.3)
py
Accepted
18
3064
201
S = list(input()) w = 0 e = 0 n = 0 s = 0 if "W" in S : w = 1 if "E" in S : e = 1 if "N" in S : n = 1 if "S" in S : s = 1 if w == e and n == 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,750
s459713492
p04019
u333139319
1539111458
Python
Python (3.4.3)
py
Accepted
17
3060
265
s = input() a = -1 b = -1 c = -1 d = -1 for i in range(len(s)): if s[i] == "W": a = 1 elif s[i] == "E": b = 1 elif s[i] == "S": c = 1 else: d = 1 if a * b == 1 and c * d == 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,751
s503960801
p04019
u589087860
1539043610
Python
Python (3.4.3)
py
Accepted
17
3060
291
st = list(input()) #print(s) n = 0 s = 0 w = 0 e = 0 for i in range(len(st)): if st[i] == 'N': n = 1 elif st[i] == 'S': s = 1 elif st[i] == 'W': w = 1 elif st[i] == 'E': e = 1 if w == e and n == 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,752
s538784182
p04019
u711295009
1538926045
Python
Python (3.4.3)
py
Accepted
17
3064
616
listS=list(input()) if "N" in listS and "S" in listS: if "W" in listS: if "E" in listS: print("Yes") else: print("No") elif "E" in listS: if "W" in listS: print("Yes") else: print("No") else: print("Yes") elif "W" in l...
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,753
s681063374
p04019
u457901067
1538796985
Python
Python (3.4.3)
py
Accepted
17
3064
280
S = input() Count = {"N":0, "W":0, "S":0, "E":0} for ch in S: Count[ch] += 1 if max(Count["N"], Count["S"]) > 0 and min(Count["N"], Count["S"]) == 0: print("No") elif max(Count["E"], Count["W"]) > 0 and min(Count["E"], 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,754
s710122390
p04019
u603234915
1538775572
Python
Python (3.4.3)
py
Accepted
17
2940
155
s = list(input()) v = [i in s for i in ['S', 'N']] h = [i in s for i in ['E', 'W']] if sum(v) == 1 or sum(h) == 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,755
s766075176
p04019
u111421568
1538607895
Python
Python (3.4.3)
py
Accepted
17
3064
286
string = input() w = 0 e = 0 s = 0 n = 0 for i in range(len(string)): if string[i] == 'W': w = 1 elif string[i] == 'E': e = 1 elif string[i] == 'S': s = 1 else: n = 1 if w == e and s == n: 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,756
s851889900
p04019
u064408584
1538531690
Python
Python (3.4.3)
py
Accepted
18
3060
197
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,757
s616951003
p04019
u940102677
1538442834
Python
Python (3.4.3)
py
Accepted
17
3060
98
a = list(input()) print("No" if (("N" in a) ^ ("S" in a)) or (("W" in a) ^ ("E" in a)) 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,758
s242129814
p04019
u099918199
1538237224
Python
Python (3.4.3)
py
Accepted
17
3060
358
hoge = str(input()) list_hoge = list(hoge) n = list_hoge.count("N") s = list_hoge.count("S") e = list_hoge.count("E") w = list_hoge.count("W") ans = "Yes" if n+s != 0: if n == 0 or s == 0: ans ="No" else: pass else: pass if e+w != 0: if e == 0 or w == 0: ans = "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,759
s996509036
p04019
u177040005
1537581870
Python
Python (3.4.3)
py
Accepted
17
3064
384
S = input() SENW = ['S','N','E','W'] dic = {} for s in SENW: dic[s] = 0 for s in S: dic[s] += 1 ch = 0 if dic['S'] > 0: if dic['N'] == 0: ch = 1 if dic['N'] > 0: if dic['S'] == 0: ch = 1 if dic['E'] > 0: if dic['W'] == 0: ch = 1 if dic['W'] > 0: if dic['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,760
s396793711
p04019
u115682115
1537437236
Python
Python (3.4.3)
py
Accepted
20
3316
321
from collections import Counter s = Counter(input()) if s["N"]>=1 and s["S"]>=1 and s["W"]>=1 and s["E"]>=1: print('Yes') exit() elif s["N"]>=1 and s["S"]>=1 and s["W"]==0 and s["E"]==0: print('Yes') exit() elif s["N"]==0 and s["S"]==0 and s["W"]>=1 and s["E"]>=1: 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,761
s904569491
p04019
u932465688
1537384559
Python
Python (3.4.3)
py
Accepted
17
3064
437
S = input() T = set(S) if (len(T) == 4): print('Yes') elif (len(T) == 1 or len(T) == 3): print('No') else: if ('N' in T): if ('S' in T): print('Yes') else: print('No') elif ('S' in T): if ('N' in T): print('Yes') else: print('No') elif ('W' in T): if ('E' in T): ...
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,762
s878897861
p04019
u177398299
1537311494
Python
Python (3.4.3)
py
Accepted
19
3064
129
s = set(input()) if len(s) == 4 or (len(s) == 2 and (s == {'S', 'N'} 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,763
s131482530
p04019
u366644013
1537054209
Python
Python (3.4.3)
py
Accepted
17
2940
157
s = set(input()) ans = 0 if len(s) == 4: ans = 1 elif len(s) == 2: if set("NS") == s or set("EW") == s: ans = 1 print("Yes" if 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,764
s079430318
p04019
u745087332
1536995513
Python
Python (3.4.3)
py
Accepted
17
3060
376
# coding:utf-8 INF = float('inf') def inpl(): return list(map(int, input().split())) S = input() S_li = list(S) direction = ('N', 'W', 'S', 'E') judge = [] for di in direction: if di in S_li: judge.append(1) else: judge.append(0) if judge[0] ^ judge[2] == 1: print('No') elif judge[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,765
s232330476
p04019
u624475441
1536990897
Python
Python (3.4.3)
py
Accepted
17
2940
72
s = input() print(['Yes','No'][('N'in s)^('S'in s)|('E'in s)^('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,766
s854919867
p04019
u624475441
1536990530
Python
Python (3.4.3)
py
Accepted
17
2940
76
s = input() print(['No','Yes'][('W'in s)==('E'in s)and('N'in s)==('S'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,767
s567511163
p04019
u017810624
1536947611
Python
Python (3.4.3)
py
Accepted
17
2940
110
s=list(input()) if int('N' in s)==int('S' in s) and int('W' in s)==int('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,768
s661112470
p04019
u761989513
1536711890
Python
Python (3.4.3)
py
Accepted
17
3060
243
s = input() if "N" in s and not "S" in s: print("No") exit() elif not "N" in s and "S" in s: print("No") exit() elif "W" in s and not "E" in s: print("No") exit() elif not "W" in s and "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,769
s615920591
p04019
u631277801
1536590584
Python
Python (3.4.3)
py
Accepted
17
3064
593
import sys stdin = sys.stdin def li(): return [int(x) for x in stdin.readline().split()] def li_(): return [int(x)-1 for x in stdin.readline().split()] def lf(): return [float(x) for x in stdin.readline().split()] def ls(): return stdin.readline().split() def ns(): return stdin.readline().rstrip() def lc(): return lis...
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,770