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
s421173356
p04019
u306950978
1589063980
Python
Python (3.4.3)
py
Accepted
17
3060
240
s = input() kita = s.count("N") mina = s.count("S") nisi = s.count("W") higa = s.count("E") if kita + mina != 0 and kita*mina == 0: print("No") exit() if nisi + higa != 0 and nisi*higa == 0: print("No") exit() print("Yes")
p04019
<span class="lang-en"> <p>Score : <var>200</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip. At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <...
SENW
Yes
1,200,271
s371356394
p04019
u443996531
1589055862
Python
Python (3.4.3)
py
Accepted
20
3064
361
s = input() dirset = set() for i in s: dirset.add(i) if "N" in dirset and "S" in dirset: if ("E" in dirset and "W" in dirset) or (not "E" in dirset and not "W" in dirset): print("Yes") else: print("No") elif "E" in dirset and "W" in dirset: if not "N" in dirset and not "S" in dirset: 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,272
s605401816
p04019
u114954806
1589049738
Python
Python (3.4.3)
py
Accepted
18
3064
257
def main(): S=set(list(input())) flag=0 if len(S)%2: flag=1 if ('N' in S and ('W' in S or 'E' in S)) or ('S' in S and ('W' in S or 'E' in S)): flag=1 if len(S)==4: flag=0 print('No' if flag else 'Yes') 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,273
s580877256
p04019
u952467214
1589033787
Python
Python (3.4.3)
py
Accepted
21
3316
333
s = input() #sys.stdin.readlineは最後が改行 from collections import Counter c = Counter(s) if c['N'] >0 and c['S']==0: print('No') exit() if c['S'] >0 and c['N']==0: print('No') exit() if c['W'] >0 and c['E']==0: print('No') exit() if c['E'] >0 and c['W']==0: print('No') exit() print('Yes'...
p04019
<span class="lang-en"> <p>Score : <var>200</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip. At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <...
SENW
Yes
1,200,274
s502203476
p04019
u288430479
1588982260
Python
Python (3.4.3)
py
Accepted
17
3060
262
s = input() if "N" in s: if "S" not in s : print("No") exit() if "E" in s: if "W" not in s: print("No") exit() if "S" in s: if "N" 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,275
s365381590
p04019
u987326700
1588906426
Python
Python (3.4.3)
py
Accepted
17
3060
232
s = input() nwse = [0]*4 for i in s: if i=="N": nwse[0] =1 elif i=="W": nwse[1] =1 elif i=="S": nwse[2]=1 else: nwse[3]=1 if nwse[0]==nwse[2] and nwse[1]==nwse[3]: 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,276
s195728283
p04019
u057964173
1588903950
Python
Python (3.4.3)
py
Accepted
17
2940
205
import sys def input(): return sys.stdin.readline().strip() def resolve(): s=set(input()) ans='No' if s==set('NSWE') or s==set('NS') or s==set('WE'): ans='Yes' print(ans) resolve()
p04019
<span class="lang-en"> <p>Score : <var>200</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip. At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <...
SENW
Yes
1,200,277
s741917947
p04019
u057964173
1588903823
Python
Python (3.4.3)
py
Accepted
17
2940
211
import sys def input(): return sys.stdin.readline().strip() def resolve(): s=set(input()) ans='No' if s=={'N','S','W','E'} or s=={'N','S'} or s=={'W','E'}: ans='Yes' print(ans) resolve()
p04019
<span class="lang-en"> <p>Score : <var>200</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip. At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <...
SENW
Yes
1,200,278
s751106791
p04019
u057964173
1588889284
Python
Python (3.4.3)
py
Accepted
18
3060
396
import sys def input(): return sys.stdin.readline().strip() def resolve(): s=input() ans='No' if 'N' in s and 'S' in s and 'W' in s and 'E' in s: ans='Yes' elif 'N' in s and 'S' in s and \ 'W' not in s and 'E' not in s: ans='Yes' elif 'N' not in s and 'S' not in s and\ ...
p04019
<span class="lang-en"> <p>Score : <var>200</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip. At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <...
SENW
Yes
1,200,279
s320903051
p04019
u560867850
1588886873
Python
Python (3.4.3)
py
Accepted
21
3436
281
from collections import Counter S = Counter(input()) if "N" in S and "S" in S and "E" not in S and "W" not in S or \ "N" not in S and "S" not in S and "E" in S and "W" in S or \ "N" in S and "S" in S and "E" in S and "W" in S: print("Yes") else: print("No")
p04019
<span class="lang-en"> <p>Score : <var>200</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip. At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <...
SENW
Yes
1,200,280
s195333375
p04019
u188745744
1588886771
Python
Python (3.4.3)
py
Accepted
18
3060
204
A = set(list(input())) if len(A) == 2 and("S" in A and "N" in A ): print("Yes") elif len(A) == 2 and ("W" in A and "E" in A): print("Yes") elif len(A) == 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,281
s565666224
p04019
u434872492
1588718619
Python
Python (3.4.3)
py
Accepted
17
3064
440
S=input() N=len(S) x=dict() for i in range(N): s = S[i] x[s]=s if "N" in x: if "S" in x: pass else: print("No") exit() if "S" in x: if "N" in x: pass else: print("No") exit() if "W" in x: if "E" in x: pass 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,282
s553312036
p04019
u475675023
1588700173
Python
Python (3.4.3)
py
Accepted
17
2940
212
s=input() if 'N' in s and not 'S' in s: print('No') elif 'S' in s and not 'N' in s: print('No') elif 'W' in s and not 'E' in s: print('No') elif 'E' in s and not 'W' in s: print('No') else: print('Yes')
p04019
<span class="lang-en"> <p>Score : <var>200</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip. At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <...
SENW
Yes
1,200,283
s414756024
p04019
u798260206
1588650964
Python
Python (3.4.3)
py
Accepted
17
2940
125
s = input() if (s.count('N')>0)^(s.count('S')>0) or (s.count('E')>0)^(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,284
s884964923
p04019
u428891594
1588631086
Python
Python (3.4.3)
py
Accepted
18
3064
493
#!/usr/bin/env python3 def main(): S = input() s = len([1 for _ in S if _ == 'S']) n = len([1 for _ in S if _ == 'N']) e = len([1 for _ in S if _ == 'E']) w = len([1 for _ in S if _ == 'W']) if (s > 0 and n > 0) or (s == n == 0): flag1 = True else: flag1 = False if (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,285
s156467187
p04019
u078349616
1588624941
Python
Python (3.4.3)
py
Accepted
17
3064
297
S = input() e = S.count("E") w = S.count("W") n = S.count("N") s = S.count("S") ew_flag = False ns_flag = False if (e > 0 and w > 0) or (e == 0 and w == 0): ew_flag = True if (n > 0 and s > 0) or (n == 0 and s == 0): ns_flag = True if ew_flag and ns_flag: 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,286
s801822368
p04019
u318127926
1588614329
Python
Python (3.4.3)
py
Accepted
17
2940
125
s = input() if (s.count('N')>0)^(s.count('S')>0) or (s.count('E')>0)^(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,287
s861766866
p04019
u847165882
1588567091
Python
Python (3.4.3)
py
Accepted
24
3444
331
import collections S=str(input()) List=list(set(S)) List.sort() flag=0 if len(List)%2==0: if len(List)//2==1: if List[0]=="E" and List[1]=="W": flag=1 elif List[0]=="N" and List[1]=="S": flag=1 elif len(List)//2==2: flag=1 print("Yes" if flag==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,288
s317989412
p04019
u865383026
1588544733
Python
Python (3.4.3)
py
Accepted
17
2940
120
S = list(sorted(set(input()))) print('Yes' if S == ['E', 'N', 'S', 'W'] or S == ['E', 'W'] or S == ['N', '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,289
s099362968
p04019
u614181788
1588525658
Python
Python (3.4.3)
py
Accepted
17
3064
321
s = list(input()) ans = 1 cE = s.count("E") cW = s.count("W") cS = s.count("S") cN = s.count("N") if cE >=1: if cW == 0: ans = 0 if cW >=1: if cE == 0: ans = 0 if cN >=1: if cS == 0: ans = 0 if cS >=1: if cN == 0: ans = 0 if ans == 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,290
s917672452
p04019
u103902792
1588447509
Python
Python (3.4.3)
py
Accepted
17
2940
155
s = input() def f(a,b): return (a in s and b not in s) or (b in s and a not in s) if f('W', 'E') or f('N', '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,291
s655325222
p04019
u553070631
1588388656
Python
Python (3.4.3)
py
Accepted
17
2940
111
t=input() n='N' in t w='W' in t s='S' in t e='E' in t if n==s and 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,292
s310002701
p04019
u253681061
1588382514
Python
Python (3.4.3)
py
Accepted
17
3060
199
s = input() N = s.count("N") W = s.count("W") S = s.count("S") E = s.count("E") if (N == S == 0 or (N > 0 and S > 0)) and (E == W == 0 or (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,293
s158108269
p04019
u201234972
1588357351
Python
Python (3.4.3)
py
Accepted
22
3316
328
from collections import Counter def main(): S = Counter(input()) ans = "Yes" if S["N"] > 0 or S["S"] > 0: if S["N"] == 0 or S["S"] == 0: ans = "No" if S["W"] > 0 or S["E"] > 0: if S["W"] == 0 or S["E"] == 0: ans = "No" print(ans) if __name__ == '__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,294
s053998595
p04019
u156815136
1588353884
Python
Python (3.4.3)
py
Accepted
40
5404
1,146
from statistics import median #import collections #aa = collections.Counter(a) # list to list || .most_common(2)で最大の2個とりだせるお a[0][0] from fractions import gcd from itertools import combinations # (string,3) 3回 from collections import deque from collections import defaultdict import bisect # # d = m - k[i] - k[j] # ...
p04019
<span class="lang-en"> <p>Score : <var>200</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip. At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <...
SENW
Yes
1,200,295
s442923682
p04019
u846226907
1588341943
Python
Python (3.4.3)
py
Accepted
18
3064
506
import sys input = sys.stdin.readline MOD = 1000000007 S = input()[:-1] x = [0,0,0,0] for i in range(len(S)): if S[i] == 'N': x[0]+=1 if S[i] == 'S': x[1]+=1 if S[i] == 'E': x[2]+=1 if S[i] == 'W': x[3]+=1 if x.count(0) == 0: print("Yes") exit() else: if...
p04019
<span class="lang-en"> <p>Score : <var>200</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip. At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <...
SENW
Yes
1,200,296
s775931041
p04019
u638902622
1588334117
Python
Python (3.4.3)
py
Accepted
21
3316
1,634
import sys ## io ## def IS(): return sys.stdin.readline().rstrip() def II(): return int(IS()) def MII(): return list(map(int, IS().split())) def MIIZ(): return list(map(lambda x: x-1, MII())) ## dp ## def DD2(d1,d2,init=0): return [[init]*d2 for _ in range(d1)] def DD3(d1,d2,d3,init=0): return [DD2(d2,d3,init) for _ in...
p04019
<span class="lang-en"> <p>Score : <var>200</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip. At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <...
SENW
Yes
1,200,297
s951630410
p04019
u578694888
1588320714
Python
Python (3.4.3)
py
Accepted
18
2940
140
# -*- coding: utf-8 -*- s=set(list(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,298
s142413392
p04019
u797550216
1588306677
Python
Python (3.4.3)
py
Accepted
17
3064
363
s = input() angle = {'N':0, 'W':0, 'S':0, 'E':0} for i in s: angle[i] += 1 if angle['N'] > 0 and angle['S'] == 0: print('No') exit() if angle['S'] > 0 and angle['N'] == 0: print('No') exit() if angle['W'] > 0 and angle['E'] == 0: print('No') exit() if angle['E'] > 0 and angle['W'] == ...
p04019
<span class="lang-en"> <p>Score : <var>200</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip. At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <...
SENW
Yes
1,200,299
s662266140
p04019
u349444371
1588293292
Python
Python (3.4.3)
py
Accepted
17
3064
208
S=input() if (("S" not in S) and ("N" in S)) or (("S" in S) and ("N" not in S)): print("No") elif (("W" not in S) and ("E" in S)) or (("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,300
s548169478
p04019
u230621983
1588182505
Python
Python (3.4.3)
py
Accepted
18
3064
202
s = input() N = s.count('N') W = s.count('W') S = s.count('S') E = s.count('E') ans = 'No' if (N >= 1 and S >= 1) or (N == S == 0): if (W >= 1 and E >= 1) or (W == E == 0): 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,301
s508900759
p04019
u329706129
1588168494
Python
Python (3.4.3)
py
Accepted
18
3064
256
def c(S, a): return S.count(a) S = input() n, w, s, e = c(S, 'N'), c(S, 'W'), c(S, 'S'), c(S, 'E') if ((n > 0 and s == 0) or (s > 0 and n == 0)): print('No') elif ((w > 0 and e == 0) or (e > 0 and w == 0)): print('No') else: print('Yes')
p04019
<span class="lang-en"> <p>Score : <var>200</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip. At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <...
SENW
Yes
1,200,302
s487746989
p04019
u141410514
1588111409
Python
Python (3.4.3)
py
Accepted
18
3060
208
s = list(input()) ss = set(s) if (("W" in ss and "E" not in ss) or ("S" in ss and "N" not in ss) or ("E" in ss and "W" not in ss) or ("N" in ss and "S" not in ss)): 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,303
s299122700
p04019
u102242691
1588043382
Python
Python (3.4.3)
py
Accepted
19
3064
378
s = list(input()) s = set(s) s = list(s) 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 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") elif "N" not in s and "S" not in s and "W" not in ...
p04019
<span class="lang-en"> <p>Score : <var>200</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip. At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <...
SENW
Yes
1,200,304
s762077275
p04019
u309141201
1588019863
Python
Python (3.4.3)
py
Accepted
17
3060
384
# import collections S = input() # CS = collections.Counter(S) # print(CS) cn = S.count('N') ce = S.count('E') cs = S.count('S') cw = S.count('W') # print(cn, cs, cw, ce) if cn > 0 and cs > 0 and ce == 0 and cw == 0: print('Yes') elif cn == 0 and cs == 0 and ce > 0 and cw > 0: print('Yes') elif cn > 0 and cs > ...
p04019
<span class="lang-en"> <p>Score : <var>200</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip. At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <...
SENW
Yes
1,200,305
s818203755
p04019
u276204978
1587968638
Python
Python (3.4.3)
py
Accepted
17
2940
176
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,306
s038321035
p04019
u641446860
1587929718
Python
Python (3.4.3)
py
Accepted
18
3060
188
S = input() n, s, w, e = 0, 0, 0, 0 if 'N' in S: n = 1 if 'S' in S: s = 1 if 'W' in S: w = 1 if 'E' in S: e = 1 if n == s and 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,307
s902358077
p04019
u156815136
1587928915
Python
Python (3.4.3)
py
Accepted
39
5276
1,054
from statistics import median #import collections #aa = collections.Counter(a) # list to list || .most_common(2)で最大の2個とりだせるお a[0][0] from fractions import gcd from itertools import combinations # (string,3) 3回 from collections import deque from collections import defaultdict import bisect # # d = m - k[i] - k[j] # ...
p04019
<span class="lang-en"> <p>Score : <var>200</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip. At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <...
SENW
Yes
1,200,308
s096765044
p04019
u193264896
1587912106
Python
Python (3.4.3)
py
Accepted
18
3064
433
import sys read = sys.stdin.buffer.read readline = sys.stdin.buffer.readline readlines = sys.stdin.buffer.readlines sys.setrecursionlimit(10 ** 8) INF = float('inf') MOD = 10 ** 9 + 7 def main(): S = set(input()) bl = False if S=={'E', 'W', 'N', 'S'}: bl = True if S=={'E', 'W'}: bl=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,309
s728786472
p04019
u487594898
1587872131
Python
Python (3.4.3)
py
Accepted
17
3060
143
S = input() A =["W" in S ,"E" in S ,"S" in S ,"N" in S ] if A ==[1,1,1,1] or A ==[0,0,1,1] or A ==[1,1,0,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,310
s858374913
p04019
u506910932
1587868292
Python
Python (3.4.3)
py
Accepted
17
3064
272
s = input() d = [False for _ in range(4)] for c in s: if c == 'N': d[0] = True elif c == 'S': d[1] = True elif c == 'W': d[2] = True else: d[3] = True if d[0] ^ d[1] or d[2] ^ d[3]: 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,311
s552706484
p04019
u981767024
1587818380
Python
Python (3.4.3)
py
Accepted
18
3064
446
# 2020/04/24 # AtCoder Grand Contest 003 - A # Input s = input() d = dict() d['N'] = 0 d['W'] = 0 d['S'] = 0 d['E'] = 0 for i in range(len(s)): d[s[i]] = d[s[i]] + 1 nsflg = False if (d['N'] == 0 and d['S'] == 0) or (d['N'] > 0 and d['S'] > 0): nsflg = True weflg = False if (d['W'] == 0 and d['E'] == 0) or...
p04019
<span class="lang-en"> <p>Score : <var>200</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip. At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <...
SENW
Yes
1,200,312
s422184976
p04019
u276115223
1587753836
Python
Python (3.4.3)
py
Accepted
18
2940
245
# AGC 003: A – Wanna go back home S = input() canReturn = 'Yes' if (('N' in S and 'S' not in S) or ('N' not in S and 'S' in S)) \ or (('E' in S and 'W' not in S) or ('E' not in S and 'W' in S)): canReturn = 'No' print(canReturn)
p04019
<span class="lang-en"> <p>Score : <var>200</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip. At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <...
SENW
Yes
1,200,313
s888021531
p04019
u528470578
1587689319
Python
Python (3.4.3)
py
Accepted
19
3060
255
S = list(input()) nc = S.count("N") sc = S.count("S") ec = S.count("E") wc = S.count("W") for i, j in zip([nc, ec], [sc, wc]): if i == 0 and j == 0: continue elif i == 0 or j == 0: print("No") break 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,314
s955400948
p04019
u898999125
1587655000
Python
Python (3.4.3)
py
Accepted
17
3064
164
S=set(list(input())) n=0 s=0 e=0 w=0 if 'N' in S: n=1 if 'S' in S: s=1 if 'E' in S: e=1 if 'W' in S: w=1 if (n^s)|(e^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,315
s075891580
p04019
u898999125
1587654707
Python
Python (3.4.3)
py
Accepted
17
3060
229
s=set(list(input())) ns=0 ew=0 if 'N' in s and 'S' in s: ns=1 elif 'N' not in s and 'S' not in s: ns=1 if 'E' in s and 'W' in s: ew=1 elif 'E' not in s and 'W' not in s: ew=1 if ns&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,316
s683160765
p04019
u535171899
1587609268
Python
Python (3.4.3)
py
Accepted
19
3060
267
s = list(input()) set_s = sorted(set(s)) if len(set_s)%2==1: print('No') if len(set_s)==4: print('Yes') if len(set_s)==2: if list(set_s)==['N','S']: print('Yes') elif list(set_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,317
s474552210
p04019
u735335967
1587606422
Python
Python (3.4.3)
py
Accepted
18
3064
396
S = input() n = 0 w = 0 s = 0 e = 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 else: e += 1 if n > 0 and w > 0 and s > 0 and e > 0: print("Yes") elif n > 0 and s > 0 and w == 0 and e == 0: print("Yes") elif w ...
p04019
<span class="lang-en"> <p>Score : <var>200</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip. At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <...
SENW
Yes
1,200,318
s489499191
p04019
u167908302
1587604937
Python
Python (3.4.3)
py
Accepted
17
3060
268
# coding:utf-8 S = input() n = S.count('N') s = S.count('S') e = S.count('E') w = S.count('W') # print(n, s, e, w) if (n == 0 and s != 0) or (n != 0 and s == 0): print('No') elif (e == 0 and w != 0) or (e != 0 and w == 0): print('No') else: print('Yes')
p04019
<span class="lang-en"> <p>Score : <var>200</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip. At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <...
SENW
Yes
1,200,319
s631124837
p04019
u485566817
1587442041
Python
Python (3.4.3)
py
Accepted
18
3060
263
s = input() ns = 0 we = 0 if "N" in s and "S" in s: ns = 1 elif "N" not in s and "S" not in s: ns = 1 if "W" in s and "E" in s: we = 1 elif "W" not in s and "E" not in s: we = 1 if ns == 1 and we == 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,320
s690394283
p04019
u368563078
1587440175
Python
Python (3.4.3)
py
Accepted
17
3060
260
S = 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 not 'W' in S and not 'E' in S: print('Yes') elif 'E' in S and 'W' in S and not 'N' in S and not '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,321
s545593739
p04019
u620868411
1587436428
Python
Python (3.4.3)
py
Accepted
17
3060
227
s = set(list(input())) if len(s)==4: print("Yes") exit() elif len(s)==2: if "N" in s and "S" in s: print("Yes") exit() elif "E" in s and "W" 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,322
s480591534
p04019
u985125584
1587436412
Python
Python (3.4.3)
py
Accepted
17
2940
221
S = input() if 'N' in S or 'S' in S: if 'S' not in S or 'N' not in S: print('No') exit() if 'E' in S or 'W' in S: if 'W' not in S or '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,323
s786434552
p04019
u114641312
1587419522
Python
Python (3.4.3)
py
Accepted
21
3316
1,033
# from math import factorial,sqrt,ceil,gcd # from itertools import permutations as permus from collections import deque,Counter # import re # from functools import lru_cache # 簡単メモ化 @lru_cache(maxsize=1000) # from decimal import Decimal, getcontext # # getcontext().prec = 1000 # # eps = Decimal(10) ** (-100) # import ...
p04019
<span class="lang-en"> <p>Score : <var>200</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip. At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <...
SENW
Yes
1,200,324
s185616551
p04019
u266569040
1587418148
Python
Python (3.4.3)
py
Accepted
20
3316
586
import collections S = list(input()) def judge(S): if "N" in S and "S" in S: if "W" in S and "E" in S: judge = "Yes" return judge elif "W" not in S and "E" not in S: judge = "Yes" return judge else: judge = "No" return ...
p04019
<span class="lang-en"> <p>Score : <var>200</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip. At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <...
SENW
Yes
1,200,325
s737650719
p04019
u461833298
1587349295
Python
Python (3.4.3)
py
Accepted
17
2940
175
S = input() S = set(S) flg=True for x,y in ['NS', 'SN', 'EW', 'WE']: if (x in S) and (y not in S): flg=False break ans = 'Yes' if flg else 'No' print(ans)
p04019
<span class="lang-en"> <p>Score : <var>200</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip. At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <...
SENW
Yes
1,200,326
s923023899
p04019
u461833298
1587349101
Python
Python (3.4.3)
py
Accepted
17
3064
254
S = input() flg=True if ('N' in S) and ('S' not in S): flg=False if ('S' in S) and ('N' not in S): flg=False if ('W' in S) and ('E' not in S): flg=False if ('E' in S) and ('W' not in S): flg=False ans = 'Yes' if flg else 'No' print(ans)
p04019
<span class="lang-en"> <p>Score : <var>200</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip. At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <...
SENW
Yes
1,200,327
s239290941
p04019
u086503932
1587334168
Python
Python (3.4.3)
py
Accepted
18
3064
278
S = input() a = S.count('N') b = S.count('S') c = S.count('E') d = S.count('W') if a*b*c*d > 0: print('Yes') elif a*b > 0 and c==0 and d==0: print('Yes') elif c*d >0 and a==0 and b==0: print('Yes') elif a==0 and b==0 and c==0 and 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,328
s365093219
p04019
u306516971
1587310520
Python
Python (3.4.3)
py
Accepted
17
3064
247
A = input() if (A.count("N") > 0 and A.count("S") == 0) or (A.count("N") == 0 and A.count("S") > 0): print("No") elif (A.count("W") > 0 and A.count("E") == 0) or (A.count("W") == 0 and A.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,329
s106396654
p04019
u057993957
1587263847
Python
Python (3.4.3)
py
Accepted
17
2940
139
S = input() condition1 = ('S' in S) == ('N' in S) condition2 = ('E' in S) == ('W' in S) print('Yes' if condition1 and condition2 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,330
s442906149
p04019
u579699847
1587253637
Python
Python (3.4.3)
py
Accepted
26
3896
395
import bisect,collections,copy,heapq,itertools,math,operator,string def I(): return int(input()) def S(): return input() def LI(): return list(map(int,input().split())) def LS(): return list(input().split()) ################################################## S = S() condition1 = ('S' in S) == ('N' in S) condition2 = ('...
p04019
<span class="lang-en"> <p>Score : <var>200</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip. At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <...
SENW
Yes
1,200,331
s712382308
p04019
u371132735
1587252444
Python
Python (3.4.3)
py
Accepted
17
3060
309
# agc003_a.py S = input() direct = [0]*4 for i in S: if i == "W": direct[0] = 1 elif i == "E": direct[1] = 1 elif i == "S": direct[2] = 1 elif i == "N": direct[3] = 1 if direct[0] == direct[1] and direct[3] == direct[2]: 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,332
s731590357
p04019
u579699847
1587247792
Python
Python (3.4.3)
py
Accepted
26
3892
504
import bisect,collections,copy,heapq,itertools,math,operator,string def I(): return int(input()) def S(): return input() def LI(): return list(map(int,input().split())) def LS(): return list(input().split()) ################################################## S = S() ans = 1 if 'S' in S: if not 'N' in S: 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,333
s358632707
p04019
u879266613
1587245867
Python
Python (3.4.3)
py
Accepted
18
2940
266
S = input() S = set(S) if 'N' in S and 'S' in S: pass elif 'N' not in S and 'S' not in S: pass else: print('No') exit() if 'E' in S and 'W' in S: pass elif 'E' not in S and 'W' not in S: pass else: 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,334
s863465014
p04019
u148551245
1587223319
Python
Python (3.4.3)
py
Accepted
17
3060
220
t = input() n = t.count('N') s = t.count('S') w = t.count('W') e = t.count('E') if ((n == 0 and s == 0) or (n > 0 and s > 0)) and\ ((w == 0 and e == 0) or (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,335
s722695331
p04019
u994307795
1587219127
Python
Python (3.4.3)
py
Accepted
19
3060
131
s = input() for i, j in zip('NWSE', 'SENW'): if i in s and j not in s: print('No') break 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,336
s352586848
p04019
u962330718
1587172431
Python
Python (3.4.3)
py
Accepted
18
3060
196
S=input() if len(set(S))%2==1: print('No') elif len(set(S))==4: print('Yes') else: if 'S' in S and 'N' in S or '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,337
s485996562
p04019
u746428948
1587153394
Python
Python (3.4.3)
py
Accepted
18
3064
305
S = input() N = len(S) n=0 e=0 w=0 s=0 for i in range(N): if S[i]=='N': n+=1 elif S[i]=='W': w+=1 elif S[i]=='E': e+=1 elif S[i]=='S': s+=1 ok = True if n>0 and s==0: ok=False elif n==0 and s>0: ok=False elif w==0 and e>0: ok=False elif w>0 and e==0: ok=False if ok: 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,338
s822226863
p04019
u252729807
1587101639
Python
Python (3.4.3)
py
Accepted
17
3060
268
s = 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,339
s252577063
p04019
u215630013
1587088280
Python
Python (3.4.3)
py
Accepted
17
3060
188
s = input() d = {'S':0,'N':0,'E':0,'W':0} for i in s: d[i] += 1 ns = (d['S'] > 0) == (d['N'] > 0) ew = (d['E'] > 0) == (d['W'] > 0) if ns and 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,340
s280308007
p04019
u803617136
1587081099
Python
Python (3.4.3)
py
Accepted
21
3316
335
from collections import defaultdict s = input() move = defaultdict(int) ans = 'Yes' for c in s: move[c] += 1 if move['N'] > 0 and move['S'] == 0: ans = 'No' if move['S'] > 0 and move['N'] == 0: ans = 'No' if move['W'] > 0 and move['E'] == 0: ans = 'No' if move['E'] > 0 and move['W'] == 0: 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,341
s153231496
p04019
u301624971
1587066040
Python
Python (3.4.3)
py
Accepted
18
3064
410
def myAnswer(S:list)->str: dic ={"W":0,"N":0,"E":0,"S":0} for s in S: dic[s]+=1 if(min(dic["W"],dic["E"])==0 and max(dic["W"],dic["E"])>=1): return "No" elif(min(dic["N"],dic["S"])==0 and max(dic["N"],dic["S"])>=1): return "No" else: return "Yes" def modelAnswer(): tmp=1 def m...
p04019
<span class="lang-en"> <p>Score : <var>200</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip. At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <...
SENW
Yes
1,200,342
s082541183
p04019
u368796742
1587054818
Python
Python (3.4.3)
py
Accepted
21
3060
236
s = list(input()) if len(set(s)) == 4: print("Yes") elif len(set(s)) == 2: if "N" in s and "S" in s: print("Yes") elif "W" in s and "E" in s: print("Yes") else: print("No") else: print("No")
p04019
<span class="lang-en"> <p>Score : <var>200</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip. At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <...
SENW
Yes
1,200,343
s597839091
p04019
u340781749
1587009464
Python
Python (3.4.3)
py
Accepted
17
3064
212
def solve(s): for dirs in ('NS', 'SN', 'EW', 'WE'): d, o = dirs[0], dirs[1] if d in s and o not in s: return False return True s = input() print('Yes' if solve(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,344
s981042739
p04019
u286754585
1587006032
Python
Python (3.4.3)
py
Accepted
17
3060
214
s=input() if ((s.count("S")>=1 and s.count("N")==0) or (s.count("N")>=1 and s.count("S")==0) or (s.count("W")>=1 and s.count("E")==0) or (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,345
s432478580
p04019
u572373398
1587002831
Python
Python (3.4.3)
py
Accepted
20
3316
322
from collections import Counter s = input() c = Counter(s) if len(c) == 4: print('Yes') elif len(c) == 3: print('No') elif len(c) == 1: print('No') elif len(c) == 2: if c['N'] > 0 and c['S'] > 0: print('Yes') elif c['W'] > 0 and c['E'] > 9: 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,346
s934300668
p04019
u024782094
1587000426
Python
Python (3.4.3)
py
Accepted
18
2940
110
i=set(input()) if i=={"E","N","S","W"} or i=={"N","S"} or i=={"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,347
s314579534
p04019
u159994501
1586987200
Python
Python (3.4.3)
py
Accepted
18
3060
266
S = set(list(input())) if 'N' in S and 'S' not in S: print('No') exit() if 'W' in S and 'E' not in S: print('No') exit() if 'S' in S and 'N' not in S: print('No') exit() if '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,348
s551991908
p04019
u373047809
1586973268
Python
Python (3.4.3)
py
Accepted
18
2940
88
i=input() n,s,w,e=map(lambda x: min(1,i.count(x)),"NSWE") print("YNeos"[(n^s)|(w^e)::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,349
s424563202
p04019
u373047809
1586973198
Python
Python (3.4.3)
py
Accepted
17
2940
103
i = input() n, s, w, e = map(lambda x: min(1, i.count(x)), "NSWE") print(["Yes","No"][(n ^ s)|(w ^ 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,350
s927489662
p04019
u877415670
1586958423
Python
Python (3.4.3)
py
Accepted
17
3060
127
s=list(input()) if set(s)=={'S','N'} or set(s)=={'W','E'} or set(s)=={'S','N','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,351
s885301040
p04019
u651109406
1586958058
Python
Python (3.4.3)
py
Accepted
18
3060
296
s = input() dicts = {'N':0, 'S':0, 'W':0, 'E':0} for i in s: dicts[i] += 1 if dicts['N'] != 0 and dicts['S'] == 0 or dicts['N'] == 0 and dicts['S'] != 0: print('No') elif dicts['W'] != 0 and dicts['E'] == 0 or dicts['W'] == 0 and dicts['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,352
s578004407
p04019
u982749462
1586921087
Python
Python (3.4.3)
py
Accepted
17
3064
411
s = input() if s.count('N') >= 1 and s.count('S') >= 1: if s.count('W') >= 1 and s.count('E') >= 1: print('Yes') exit() elif s.count('W') ==0 and s.count('E') == 0: print('Yes') exit() elif s.count('N') == 0 and s.count('S') == 0: if s.count('W') >= 1 and s.count('E') >= 1: print('Yes') 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,353
s826343052
p04019
u541610817
1586813690
Python
Python (3.4.3)
py
Accepted
17
3064
302
S = input() x = y = 0 n = w = s = e = 0 for c in S: if c == 'N': n += 1 elif c == 'W': w += 1 elif c == 'S': s += 1 else: e += 1 if (n == 0 and s > 0) or (s == 0 and n > 0): y = 1 if (w == 0 and e > 0) or (e == 0 and w > 0): 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,354
s236716985
p04019
u818349438
1586797815
Python
Python (3.4.3)
py
Accepted
20
3188
219
s = input() cnt = {'N':0,'S':0,'E':0,'W':0} ok = True for x in s: cnt[x] +=1 if ((cnt['N'] >0)^(cnt['S']>0)) == 1:ok = False if ((cnt['E'] >0)^(cnt['W']>0)) == 1:ok = False if ok: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,355
s434271399
p04019
u996434204
1586720885
Python
Python (3.4.3)
py
Accepted
17
2940
202
s = set(list(input())) if len(s) == 4: print("Yes") elif len(s) == 2: if "S" in s and "N" in s or "E" in s and 'W' in s: print("Yes") else: print("No") else: print("No")
p04019
<span class="lang-en"> <p>Score : <var>200</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip. At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <...
SENW
Yes
1,200,356
s770732582
p04019
u486251525
1586701681
Python
Python (3.4.3)
py
Accepted
17
3060
255
S = input() North = S.count("N") South = S.count("S") East = S.count("E") West = S.count("W") if ((North > 0 and South > 0) or (North == 0 and South == 0)) and ((East > 0 and West > 0) or (East == 0 and West == 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,357
s950889446
p04019
u021916304
1586667353
Python
Python (3.4.3)
py
Accepted
17
2940
128
s = input() sn = not ('N' in s)^('S' in s) ew = not ('E' in s)^('W' in s) if sn and 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,358
s181332143
p04019
u396210538
1586650785
Python
Python (3.4.3)
py
Accepted
18
3060
270
s = list(input()) # print(s) d = {} for i in range(len(s)): d[s[i]] = d.get(s[i], 0)+1 # print(d) ans = 0 if 'N' in d: ans += 1 if 'S' in d: ans -= 1 if 'E' in d: ans += 100 if 'W' in d: ans -= 100 if ans == 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,359
s839369570
p04019
u013202780
1586646724
Python
Python (3.4.3)
py
Accepted
17
2940
110
i=set(input()) if i=={"E","N","S","W"} or i=={"N","S"} or i=={"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,360
s180593764
p04019
u426572476
1586639694
Python
Python (3.4.3)
py
Accepted
39
5308
3,158
import sys import heapq import re from itertools import permutations from bisect import bisect_left, bisect_right from collections import Counter, deque from fractions import gcd from math import factorial, sqrt from functools import lru_cache, reduce INF = 1 << 60 mod = 1000000007 sys.setrecursionlimit(10 ** 7) 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,361
s278293796
p04019
u867848444
1586623381
Python
Python (3.4.3)
py
Accepted
21
3316
259
from collections import defaultdict s=input() cnt=defaultdict(lambda :0) for i in s: cnt[i]+=1 if cnt['N']*cnt['S']==0 and (cnt['N']+cnt['S'])>0: print('No') elif cnt['E']*cnt['W']==0 and (cnt['E']+cnt['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,362
s838412637
p04019
u867826040
1586358590
Python
Python (3.4.3)
py
Accepted
17
2940
180
s = set(input()) if ("W" in s and not "E" in s) or ("E" in s and not "W" in s) or ("N" in s and not "S" in s) or ("S" in s and not "N" 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,363
s481933434
p04019
u060793972
1586344133
Python
Python (3.4.3)
py
Accepted
17
2940
117
s = input() if not(('N' in s) ^ ('S' in s)) and not(('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,364
s895086117
p04019
u060793972
1586343715
Python
Python (3.4.3)
py
Accepted
17
2940
116
s = input() if not(('N' in s) ^ ('S' in s)) and not(('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,365
s480748155
p04019
u279493135
1586335068
Python
Python (3.4.3)
py
Accepted
59
5712
885
import sys, re from collections import deque, defaultdict, Counter from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians from itertools import accumulate, permutations, combinations, product from operator import itemgetter, mul from copy import deepcopy from string import ascii_lowercase, ascii_uppercase...
p04019
<span class="lang-en"> <p>Score : <var>200</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip. At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <...
SENW
Yes
1,200,366
s243291580
p04019
u460009487
1586227344
Python
Python (3.4.3)
py
Accepted
17
3064
340
s = list(input()) s_set = set(s) s_unique = list(s_set) s_unique.sort() s_unique_len = len(s_unique) if s_unique_len == 4: print('Yes') elif s_unique_len == 2: if s_unique[0] == 'E' and s_unique[1] == 'W': print('Yes') elif s_unique[0] == 'N' and s_unique[1] == '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,367
s351211960
p04019
u644972721
1586153240
Python
Python (3.4.3)
py
Accepted
17
3060
212
s = list(input()) v = ["N", "W", "S", "E"] a, b = 0, 0 for i in range(4): if v[i] in s: if i % 2 == 0: a += 1 else: b += 1 print("Yes" if a % 2 == b % 2 == 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,368
s260359972
p04019
u760961723
1586140507
Python
Python (3.4.3)
py
Accepted
18
3064
251
K = input() K_S =K.count("S") K_N =K.count("N") K_W =K.count("W") K_E =K.count("E") if ((K_S != 0) and (K_N == 0)) or \ ((K_E != 0) and (K_W == 0)) or \ ((K_N != 0) and (K_S == 0)) or \ ((K_W != 0) and (K_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,369
s324444224
p04019
u328755070
1586131820
Python
Python (3.4.3)
py
Accepted
17
3060
295
S = list(input()) S.sort() flag = 1 if 'N' in S: if 'S' not in S: flag = 0 if 'S' in S: if 'N' not in S: flag = 0 if 'E' in S: if 'W' not in S: flag = 0 if 'W' in S: if 'E' not in S: flag = 0 if flag: 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,370