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
s635522805
p04019
u545368057
1586124202
Python
Python (3.4.3)
py
Accepted
19
3060
257
S = input() s = S.count("S") w = S.count("W") e = S.count("E") n = S.count("N") if s == 0 and n > 0: print("No") elif n == 0 and s > 0: print("No") elif e == 0 and w > 0: print("No") elif 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,371
s552858312
p04019
u452512115
1586093974
Python
Python (3.4.3)
py
Accepted
18
3060
314
S = input() d = {} for s in S: d[s] = True if 'N' in d: if 'S' not in d: print("No") exit() if "S" in d: if 'N' not in d: print("No") exit() if "E" in d: if "W" not in d: print("No") exit() if "W" in d: if "E" not in d: 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,372
s099653817
p04019
u392319141
1586088175
Python
Python (3.4.3)
py
Accepted
22
3316
200
from collections import Counter S = Counter(input()) def isNotOk(): WE = (S['W'] > 0) ^ (S['E'] > 0) NS = (S['N'] > 0) ^ (S['S'] > 0) return WE or NS print('No' if isNotOk() 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,373
s277354122
p04019
u716530146
1586087739
Python
Python (3.4.3)
py
Accepted
21
3444
445
#!/usr/bin/env python3 import sys, math, itertools, collections, bisect input = lambda: sys.stdin.buffer.readline().rstrip().decode('utf-8') inf = float('inf') ;mod = 10**9+7 mans = inf ;ans = 0 ;count = 0 ;pro = 1 S = input() C = collections.Counter(S) if (C["N"] and not C["S"]) or ((not C["N"]) and C["S"]) or (C["W...
p04019
<span class="lang-en"> <p>Score : <var>200</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip. At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <...
SENW
Yes
1,200,374
s450924065
p04019
u599114793
1586087532
Python
Python (3.4.3)
py
Accepted
17
2940
301
s = input() if "N" in s: if "S" not in s: print("No") exit() if "S" in s: if "N" not in s: print("No") exit() if "W" in s: if "E" not in s: print("No") exit() if "E" in s: if "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,375
s824782087
p04019
u861141787
1586087396
Python
Python (3.4.3)
py
Accepted
17
2940
215
s = set(input()) if "S" not in s and "N" in s: print("No") elif "S" in s and "N" not in s: print("No") elif "W" not in s and "E" 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,376
s611331545
p04019
u241159583
1586086869
Python
Python (3.4.3)
py
Accepted
18
3060
244
S = list(input()) ans = "Yes" if S.count("W") > 0: if "E" not in S: ans = "No" if S.count("E") > 0: if "W" not in S: ans = "No" if S.count("N") > 0: if "S" not in S: ans = "No" if S.count("S") > 0: if "N" 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,377
s454671449
p04019
u981931040
1586086766
Python
Python (3.4.3)
py
Accepted
18
3064
396
S = input() Flags = [False] * 4 for s in S: if "N" == s: Flags[0] =True elif "S" == s: Flags[1] =True elif "W" == s: Flags[2] =True elif "E" == s: Flags[3] =True if all(Flags) or (Flags[0] and Flags[1] and not Flags[2] and not Flags[3]) or \ (Flags[2] and Flags[3...
p04019
<span class="lang-en"> <p>Score : <var>200</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip. At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <...
SENW
Yes
1,200,378
s026179499
p04019
u367130284
1586086735
Python
Python (3.4.3)
py
Accepted
22
3316
202
from collections import* s=input() c=Counter(s) if (c["S"]==0 and c["N"]>0) or (c["N"]==0 and c["S"]>0) or (c["E"]==0 and c["W"]>0) or (c["W"]==0 and c["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,379
s641026881
p04019
u426649993
1586086538
Python
Python (3.4.3)
py
Accepted
17
2940
254
if __name__ == "__main__": s = input() p = set(s) if len(p) % 2 == 1: print('No') exit() if 'S' in p and 'N' in p: print('Yes') elif 'W' in p and 'E' in p: 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,380
s338640114
p04019
u852690916
1586086531
Python
Python (3.4.3)
py
Accepted
18
3060
154
S=input() n=w=s=e=0 for c in S: if c =='N': n=1 elif c=='W': w=1 elif c=='S': s=1 elif c=='E': e=1 print('Yes' if n==s and w==e 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,381
s607541576
p04019
u141610915
1586086486
Python
PyPy2 (5.6.0)
py
Accepted
40
28396
262
import sys input = sys.stdin.readline S = list(input())[: -1] n = S.count("N") > 0 e = S.count("E") > 0 s = S.count("S") > 0 w = S.count("W") > 0 if n and s or (n == 0 and (s == 0)): if e and w or (e == 0 and (w == 0)): print("Yes") exit(0) print("No")
p04019
<span class="lang-en"> <p>Score : <var>200</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip. At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <...
SENW
Yes
1,200,382
s171346525
p04019
u463775490
1586086475
Python
Python (3.4.3)
py
Accepted
17
3060
192
s = list(input()) if ('W' in s and 'E' not in s) or\ ('N' in s and 'S' not in s) or\ ('W' not in s and 'E' in s) or\ ('N' not in s and 'S' 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,383
s960701798
p04019
u761320129
1586086325
Python
Python (3.4.3)
py
Accepted
17
3060
224
S = input() if 'N' in S and 'S' not in S: print('No') elif 'S' in S and 'N' not in S: print('No') elif 'W' in S and 'E' not in S: print('No') elif 'E' in S and 'W' not in S: print('No') else: print('Yes')
p04019
<span class="lang-en"> <p>Score : <var>200</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip. At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <...
SENW
Yes
1,200,384
s056294722
p04019
u490553751
1585939360
Python
Python (3.4.3)
py
Accepted
21
3316
337
#template from collections import Counter def inputlist(): return [int(j) for j in input().split()] #template S = list(input()) c = Counter(S) news = ['N','E','W','S'] sa = set(S) if sa == {'N','S'} or sa == {'E','W'}: print("Yes") exit() for i in range(4): if c[news[i]] == 0: print("No") ex...
p04019
<span class="lang-en"> <p>Score : <var>200</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip. At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <...
SENW
Yes
1,200,385
s333597401
p04019
u896726004
1585771485
Python
Python (3.4.3)
py
Accepted
17
3060
224
S = input() n = 'N' in S s = 'S' in S e = 'E' in S w = 'W' in S if (n and s) or (n==False and s==False): if (e and w) or (e==False and w==False): 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,386
s260478016
p04019
u959225525
1585709712
Python
Python (3.4.3)
py
Accepted
17
3064
373
s=input() if s.count("N")==0 and s.count("S")==0: if s.count("W")>=1 and s.count("E")>=1: print("Yes") exit() if s.count("W")==0 and s.count("E")==0: if s.count("N")>=1 and s.count("S")>=1: print("Yes") exit() if s.count("W")>=1 and s.count("E")>=1 and s.count("N")>=1 and s.co...
p04019
<span class="lang-en"> <p>Score : <var>200</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip. At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <...
SENW
Yes
1,200,387
s408149255
p04019
u969848070
1585616861
Python
Python (3.4.3)
py
Accepted
17
3064
320
a = input() v = 0 h = 0 if a.count('W') >=1: if a.count('E') ==0: print('No') exit() if a.count('E') >=1: if a.count('W') ==0: print('No') exit() if a.count('N')>= 1: if a.count('S') ==0: print('No') exit() if a.count('S')>= 1: if a.count('N')==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,388
s097045071
p04019
u426764965
1585491536
Python
Python (3.4.3)
py
Accepted
17
3060
160
S = str(input()) ans = True if ('N' in S) ^ ('S' in S) == 1: ans = False if ('E' in S) ^ ('W' in S) == 1: ans = False if ans: print('Yes') else: print('No')
p04019
<span class="lang-en"> <p>Score : <var>200</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip. At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <...
SENW
Yes
1,200,389
s704833530
p04019
u622045059
1585434642
Python
Python (3.4.3)
py
Accepted
39
5300
2,130
import math import fractions import bisect import collections import itertools import heapq import string import sys import copy from decimal import * from collections import deque sys.setrecursionlimit(10**7) MOD = 10**9+7 INF = float('inf') #無限大 def gcd(a,b):return fractions.gcd(a,b) #最大公約数 def lcm(a,b):return (a*b) ...
p04019
<span class="lang-en"> <p>Score : <var>200</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip. At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <...
SENW
Yes
1,200,390
s067593624
p04019
u454524105
1585171656
Python
Python (3.4.3)
py
Accepted
21
3316
352
from collections import Counter s = [s for s in input()] cnt = Counter(s) if "N" in cnt.keys() or "S" in cnt.keys(): if "N" not in cnt.keys() or "S" not in cnt.keys(): print("No") exit() if "W" in cnt.keys() or "E" in cnt.keys(): if "W" not in cnt.keys() or "E" not in cnt.keys(): 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,391
s991150011
p04019
u127499732
1585118084
Python
Python (3.4.3)
py
Accepted
20
3316
266
def main(): from collections import Counter s = list(input()) a = 'E' in s b = 'W' in s c = 'N' in s d = 'S' in s if not (a ^ b) and not (c ^ d): 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,392
s304223427
p04019
u089142196
1585013271
Python
Python (3.4.3)
py
Accepted
18
3064
307
S=input() ans="No" n=0 w=0 e=0 s=0 tate=0 yoko=0 for str in S: if str=="N": n +=1 elif str=="E": e +=1 elif str=="S": s +=1 else: w +=1 if (n>0 and s>0) or (n==0 and s==0): tate=True if (e>0 and w>0) or (e==0 and w==0): yoko=True if tate and yoko: 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,393
s802689674
p04019
u609814378
1584970598
Python
Python (3.4.3)
py
Accepted
17
3064
362
S = 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("N") != 0 and S.count("S") != 0) and (S.count("W") == 0 and S.count("E") == 0): print("Yes") elif S.count("N") != 0 and S.count("S") != 0 and S.count("W") != 0 and S.count("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,394
s735936907
p04019
u556589653
1584900452
Python
Python (3.4.3)
py
Accepted
19
3064
344
S = input() if S.count("S") >= 1 and S.count("W") >= 1 and S.count("E") >= 1 and S.count("N") >= 1: print("Yes") elif S.count("S") >= 1 and S.count("W") == 0 and S.count("E") == 0 and S.count("N") >= 1: print("Yes") elif S.count("S") == 0 and S.count("W") >= 1 and S.count("E") >= 1 and S.count("N") == 0: print("Y...
p04019
<span class="lang-en"> <p>Score : <var>200</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip. At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <...
SENW
Yes
1,200,395
s952366416
p04019
u923270446
1584883906
Python
Python (3.4.3)
py
Accepted
17
2940
175
s = input() if ("S" in s and not "N" in s) or ("N" in s and not "S" in s) or ("E" in s and not "W" in s) or ("W" in s and not "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,396
s117657469
p04019
u152891327
1584812131
Python
Python (3.4.3)
py
Accepted
19
3060
227
S = input() bit = 0 for i in S: if i == 'N': bit |= 1 elif i == 'E': bit |= 2 elif i == 'S': bit |= 4 elif i == 'W': bit |= 8 if bit == 15: break if bit % 5 == 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,397
s619276568
p04019
u022979415
1584640179
Python
Python (3.4.3)
py
Accepted
20
3064
658
def main(): direction = input() now = [0, 0] dir_count = {"N": 0, "E": 0, "S": 0, "W": 0} for d in direction: dir_count[d] += 1 if d == "N": now[0] += 1 elif d == "E": now[1] += 1 elif d == "S": now[0] -= 1 else: now...
p04019
<span class="lang-en"> <p>Score : <var>200</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip. At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <...
SENW
Yes
1,200,398
s367442264
p04019
u218757284
1584631234
Python
Python (3.4.3)
py
Accepted
17
3064
329
st = input() sn = len(st) n, s, e, w = 0, 0, 0, 0 for i in range(sn): if st[i] == "N": n += 1 if st[i] == "S": s += 1 if st[i] == "E": e += 1 if st[i] == "W": w += 1 false = (n > 0 and s == 0) or (s > 0 and n == 0) or (e > 0 and w == 0) or (w > 0 and e == 0) if false: print("No") else: pri...
p04019
<span class="lang-en"> <p>Score : <var>200</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip. At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <...
SENW
Yes
1,200,399
s642568865
p04019
u346812984
1584477466
Python
Python (3.4.3)
py
Accepted
22
3316
348
from collections import Counter S = list(input()) c = Counter(S) flag1 = False flag2 = False if "S" in c and "N" in c: flag1 = True elif "S" not in c and "N" not in c: flag1 = True if "W" in c and "E" in c: flag2 = True elif "W" not in c and "E" not in c: flag2 = True if flag1 and flag2: 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,400
s500457762
p04019
u561083515
1584408469
Python
Python (3.4.3)
py
Accepted
21
3316
201
from collections import Counter S = Counter(list(input())) if ((S["N"] and S["S"]) or not(S["N"] or S["S"])) and ((S["W"] and S["E"]) or not(S["W"] or S["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,401
s789567498
p04019
u020390084
1584298937
Python
Python (3.4.3)
py
Accepted
19
3188
659
#!/usr/bin/env python3 import sys # input = sys.stdin.readline def INT(): return int(input()) def MAP(): return map(int,input().split()) def LI(): return list(map(int,input().split())) def main(): travel_plan = input() S = 0 W = 0 N = 0 E = 0 for t in travel_plan: if t == "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,402
s208763862
p04019
u414699019
1584275903
Python
Python (3.4.3)
py
Accepted
17
2940
148
S=input() L=[S.count("N"),S.count("S"),S.count("W"),S.count("E")] if L[0:2].count(0)==1 or L[2:].count(0)==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,403
s395597819
p04019
u893063840
1584232842
Python
Python (3.4.3)
py
Accepted
17
2940
194
s = input() if "N" in s and "S" not in s\ or "S" in s and "N" not in s\ or "E" in s and "W" not in s\ or "W" in s and "E" not in s: ans = "No" else: ans = "Yes" print(ans)
p04019
<span class="lang-en"> <p>Score : <var>200</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip. At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <...
SENW
Yes
1,200,404
s629540326
p04019
u021548497
1584150028
Python
Python (3.4.3)
py
Accepted
18
3064
286
s = input() count = [0, 0, 0, 0] for i in range(len(s)): if s[i] == "N": count[0] = 1 if s[i] == "S": count[1] = 1 if s[i] == "W": count[2] = 1 if s[i] == "E": count[3] = 1 if (count[0] + count[1])%2 or (count[2] + count[3])%2: print("No") else: print("Yes")
p04019
<span class="lang-en"> <p>Score : <var>200</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip. At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <...
SENW
Yes
1,200,405
s304539163
p04019
u970809473
1584131967
Python
Python (3.4.3)
py
Accepted
17
3060
182
ss = input() n = 1 w = 1 s = 1 e = 1 if "N" in ss: n = -1 if "W" in ss: w = -1 if "S" in ss: s = -1 if "E" in ss: e = -1 if n*s + w*e > 0: print("Yes") else: print("No")
p04019
<span class="lang-en"> <p>Score : <var>200</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip. At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <...
SENW
Yes
1,200,406
s368451940
p04019
u751843916
1584086509
Python
Python (3.4.3)
py
Accepted
17
2940
107
s="".join(sorted(set([str(i) for i in input()]))) print("Yes" if s=="ENSW" or s=="EW" or s=="NS" 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,407
s575795458
p04019
u367130284
1584026073
Python
Python (3.4.3)
py
Accepted
18
2940
173
i=input() if ("N" in i and "S" not in i) or ("W" in i and "E" not in i) or ("W" not in i and "E" in i) or ("N" not in i and "S" in i): print("No") else: print("Yes")
p04019
<span class="lang-en"> <p>Score : <var>200</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip. At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <...
SENW
Yes
1,200,408
s720342533
p04019
u426649993
1583932139
Python
Python (3.4.3)
py
Accepted
17
3060
338
if __name__ == "__main__": s = input() s = set(s) if len(s) == 4: print('Yes') elif len(s) == 3 or len(s) == 1: print('No') elif len(s) == 2: if 'W' in s and 'E' in s: print('Yes') elif 'N' in s and 'S' in s: print('Yes') else: ...
p04019
<span class="lang-en"> <p>Score : <var>200</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip. At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <...
SENW
Yes
1,200,409
s415616237
p04019
u151107315
1583905638
Python
Python (3.4.3)
py
Accepted
17
3060
220
S = input() l = list(set(S)) if len(l) == 0: print("Yes") elif len(l) % 2 == 1 : print("No") else : if ("N" in l and "S" in l) or ("W" in l and "E" in l) : print("Yes") else : print("No")
p04019
<span class="lang-en"> <p>Score : <var>200</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip. At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <...
SENW
Yes
1,200,410
s317599753
p04019
u672898046
1583870873
Python
Python (3.4.3)
py
Accepted
18
2940
118
s = set(list(input())) if s=={'N','W','S','E'} or s=={'N','S'} or s=={'W','E'}: print('Yes') else: print('No')
p04019
<span class="lang-en"> <p>Score : <var>200</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip. At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <...
SENW
Yes
1,200,411
s071040056
p04019
u672475305
1583860828
Python
Python (3.4.3)
py
Accepted
17
2940
118
s = set(list(input())) if s=={'N','W','S','E'} or s=={'N','S'} or s=={'W','E'}: print('Yes') else: print('No')
p04019
<span class="lang-en"> <p>Score : <var>200</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip. At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <...
SENW
Yes
1,200,412
s230479498
p04019
u071680334
1583836681
Python
Python (3.4.3)
py
Accepted
17
3064
407
def main(): s = input().rstrip() N, W, S, E = 0, 0, 0, 0 for c in s: if c == "N": N += 1 if c == "W": W += 1 if c == "S": S += 1 if c == "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): ...
p04019
<span class="lang-en"> <p>Score : <var>200</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip. At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <...
SENW
Yes
1,200,413
s047707119
p04019
u693716675
1583552888
Python
Python (3.4.3)
py
Accepted
17
3060
290
s = input() sets = set() for v in s: sets.add(v) ans = "Yes" if "N" in sets and "S" not in sets: ans = "No" if "S" in sets and "N" not in sets: ans = "No" if "E" in sets and "W" not in sets: ans = "No" if "W" in sets and "E" not in sets: 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,414
s002189001
p04019
u950708010
1583446486
Python
Python (3.4.3)
py
Accepted
18
3060
311
def solve(): s = input() can = True isn = "N" in s isw = "W" in s iss = "S" in s ise = "E" in s if isn or iss: if isn and iss: pass else: print("No") exit() if isw or ise: if isw and ise: pass else: print("No") exit() print("Yes") solve()
p04019
<span class="lang-en"> <p>Score : <var>200</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip. At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <...
SENW
Yes
1,200,415
s132118113
p04019
u606523772
1583421659
Python
Python (3.4.3)
py
Accepted
20
3188
344
S = input() dic_S = {} flag = True for i in range(len(S)): if S[i] in dic_S: dic_S[S[i]] += 1 else: dic_S[S[i]] = 1 dic_ans = {"N":"S", "W":"E", "S":"N", "E":"W"} for k, v in dic_S.items(): if v>=1: if dic_ans[k] not in dic_S: flag = False break 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,416
s684466940
p04019
u189487046
1583383907
Python
Python (3.4.3)
py
Accepted
17
2940
244
s = list(input()) if ((s.count('S') >= 1 and s.count('N') >= 1) or (s.count('S') == 0 and s.count('N') == 0)) and ((s.count('W') >= 1 and s.count('E') >= 1) or (s.count('W') == 0 and s.count('E') == 0)): print('Yes') else: print('No')
p04019
<span class="lang-en"> <p>Score : <var>200</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip. At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <...
SENW
Yes
1,200,417
s661648184
p04019
u912115033
1583359164
Python
Python (3.4.3)
py
Accepted
17
2940
225
s = input() if 'N' in s and 'S' not in s: print('No') elif 'N' not in s and 'S' in s: print('No') elif 'W' in s and 'E' not in s: print('No') elif 'W' not in s and '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,418
s515519697
p04019
u729417323
1583102277
Python
Python (3.4.3)
py
Accepted
17
2940
133
# --*-coding:utf-8-*-- S = input() T = set(s for s in S) print('No' if ('S' in T)^('N' in T) or ('E' in T)^('W' in T) 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,419
s851400595
p04019
u217627525
1582752991
Python
Python (3.4.3)
py
Accepted
18
3064
232
s=input() ans="Yes" cn=s.count("N") cs=s.count("S") ce=s.count("E") cw=s.count("W") if cn==0 and cs!=0: ans="No" elif cn!=0 and cs==0: ans="No" elif cw==0 and ce!=0: ans="No" elif cw!=0 and ce==0: ans="No" print(ans)
p04019
<span class="lang-en"> <p>Score : <var>200</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip. At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <...
SENW
Yes
1,200,420
s272768840
p04019
u002459665
1582698371
Python
Python (3.4.3)
py
Accepted
17
3064
332
S = input() n = 0 w = 0 s = 0 e = 0 for si in S: if si == 'N': n += 1 elif si == 'W': w += 1 elif si == 'S': s += 1 else: e += 1 ans = False if (n and s) or (not n and not s): if (w and e) or (not w and not e): ans = True if ans: print('Yes') else: ...
p04019
<span class="lang-en"> <p>Score : <var>200</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip. At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <...
SENW
Yes
1,200,421
s581759126
p04019
u732412551
1582496697
Python
Python (3.4.3)
py
Accepted
17
2940
99
S=input() print("YNeos"[(S.find("N")>=0)^(S.find("S")>=0) or (S.find("W")>=0)^(S.find("E")>=0)::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,422
s968107096
p04019
u814986259
1582081073
Python
Python (3.4.3)
py
Accepted
23
3444
398
import collections S = input() table = collections.defaultdict(int) for x in S: table[x] += 1 N = False W = False E = False S = False if table["N"] > 0: N = True if table["W"] > 0: W = True if table["E"] > 0: E = True if table["S"] > 0: S = True if (N and S) or ((N or S) == False): if (E an...
p04019
<span class="lang-en"> <p>Score : <var>200</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip. At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <...
SENW
Yes
1,200,423
s346951696
p04019
u835924161
1582034161
Python
Python (3.4.3)
py
Accepted
17
3064
422
s=str(input()) if s.count("W")==0 and s.count("E")==0 and s.count("S")==0 and s.count("N")==0: print("Yes") elif s.count("W")>0 and s.count("E")>0 and s.count("S")==0 and s.count("N")==0: print("Yes") elif s.count("W")==0 and s.count("E")==0 and s.count("S")>0 and s.count("N")>0: print("Yes") elif s.count("...
p04019
<span class="lang-en"> <p>Score : <var>200</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip. At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <...
SENW
Yes
1,200,424
s812503283
p04019
u305366205
1582033127
Python
Python (3.4.3)
py
Accepted
17
2940
224
s = input() if 'N' in s and 'S' not in s: print('No') elif 'S' in s and 'N' not in s: print('No') elif 'W' in s and 'E' not in s: print('No') elif 'E' in s and 'W' not in s: print('No') else: print("Yes")
p04019
<span class="lang-en"> <p>Score : <var>200</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip. At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <...
SENW
Yes
1,200,425
s531340498
p04019
u202570162
1582029776
Python
Python (3.4.3)
py
Accepted
17
2940
171
s=list(input()) t=set(s) flag=True if len(t)==3 or len(t)==1: flag=False if len(t)==2: if t!={'N','S'} and t!={'W','E'}: flag=False print('Yes' if flag else 'No')
p04019
<span class="lang-en"> <p>Score : <var>200</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip. At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <...
SENW
Yes
1,200,426
s041723161
p04019
u994988729
1582029693
Python
Python (3.4.3)
py
Accepted
20
3316
306
from collections import defaultdict S = input() d = defaultdict(int) for s in S: d[s] += 1 ans = "Yes" if d["N"] > 0 and d["S"] == 0: ans = "No" if d["S"] > 0 and d["N"] == 0: ans = "No" if d["W"] > 0 and d["E"] == 0: ans = "No" if d["E"] > 0 and d["W"] == 0: ans = "No" print(ans)
p04019
<span class="lang-en"> <p>Score : <var>200</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip. At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <...
SENW
Yes
1,200,427
s745939793
p04019
u977661421
1582029642
Python
Python (3.4.3)
py
Accepted
17
3064
335
# -*- coding: utf-8 -*- s = list(str(input())) tmp = list(set(s)) tmp.sort() if len(tmp) == 2 and ((tmp[0] == 'E' and s[1] == 'W') or (tmp[0] == 'N' and tmp[1] == 'S')): print("Yes") elif len(tmp) == 4: print("Yes") else: print("No") """ if len(set(s)) == 1 or len(set(s)) == 3: 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,428
s398099603
p04019
u426649993
1582029487
Python
Python (3.4.3)
py
Accepted
17
3060
439
if __name__ == "__main__": s = input() tmp = set(s) if 'N' in tmp: if 'S' not in tmp: print('No') exit() if 'S' in tmp: if 'N' not in tmp: print('No') exit() if 'E' in tmp: if 'W' not in tmp: 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,429
s060275917
p04019
u225388820
1582029424
Python
Python (3.4.3)
py
Accepted
17
2940
107
s=input() S,E,W,N="S" in s,"E" in s,"W" in s,"N" in s if S^N or 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,430
s790041200
p04019
u312025627
1582029306
Python
Python (3.4.3)
py
Accepted
17
2940
273
def main(): S = input() we = ("W" in S and "E" in S) or ("W" not in S and "E" not in S) ns = ("N" in S and "S" in S) or ("N" not in S and "S" not in S) if we and ns: 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,431
s302690381
p04019
u305366205
1582029283
Python
Python (3.4.3)
py
Accepted
17
3064
304
s = input() if s.count('N') > 0 and s.count('S') == 0: print('No') exit() if s.count('S') > 0 and s.count('N') == 0: print('No') exit() if s.count('W') > 0 and s.count('E') == 0: print('No') exit() if s.count('E') > 0 and s.count('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,432
s163608741
p04019
u504836877
1582029256
Python
Python (3.4.3)
py
Accepted
19
3060
219
S = input() ans = "Yes" if "N" in S and "S" not in S: ans = "No" if "S" in S and "N" not in S: ans = "No" if "W" in S and "E" not in S: ans = "No" if "E" in S and "W" 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,433
s137360591
p04019
u062068953
1582008138
Python
Python (3.4.3)
py
Accepted
17
3064
209
S=input() x=set(S) if len(x)%2==1: print('No') else: if len(x)==4: print('Yes') else: if (('N' in S) and ('S' in S)) or (('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,434
s950535270
p04019
u126823513
1581991215
Python
Python (3.4.3)
py
Accepted
17
3060
265
s = input() if not(s.count('N') > 0 and s.count('S') > 0 or s.count('N') == 0 and s.count('S') == 0): print('No') elif not(s.count('W') > 0 and s.count('E') > 0 or s.count('W') == 0 and s.count('E') == 0): print('No') else: print('Yes')
p04019
<span class="lang-en"> <p>Score : <var>200</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip. At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <...
SENW
Yes
1,200,435
s834378497
p04019
u644360640
1581988420
Python
Python (3.4.3)
py
Accepted
17
3064
278
s = input() n_count = (1 if s.count('N')>=1 else 0) s_count = (1 if s.count('S')>=1 else 0) w_count = (1 if s.count('W')>=1 else 0) e_count = (1 if s.count('E')>=1 else 0) ns = not(n_count ^ s_count) we = not(w_count ^ e_count) if 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,436
s110779583
p04019
u749770850
1581896714
Python
Python (3.4.3)
py
Accepted
18
3064
377
s = input() if s.count("N") >= 1 and s.count("W") >= 1 and s.count("S") >= 1 and s.count("E") >= 1 : print("Yes") exit() if s.count("N") >= 1 and s.count("S") >= 1 and s.count("N") + s.count("S") == len(s): print("Yes") exit() elif s.count("W") >= 1 and s.count("E") >= 1 and s.count("W") + s.count("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,437
s326429163
p04019
u268792407
1581729436
Python
Python (3.4.3)
py
Accepted
18
3060
258
s=input() if "N" in s: if "S" not in s: print("No") exit() if "S" in s: if "N" not in s: print("No") exit() if "W" in s: if "E" not in s: print("No") exit() if "E" in s: if "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,438
s763614016
p04019
u995062424
1581278772
Python
Python (3.4.3)
py
Accepted
17
3060
237
S = set(input()) NS = {"N", "S"} EW = {"E", "W"} if(len(S)%2 != 0): print("No") else: if(len(S) == 4): print("Yes") else: if(NS == S or EW == 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,439
s788816611
p04019
u428132025
1581224521
Python
Python (3.4.3)
py
Accepted
17
3064
481
s = input() chk = [0, 0, 0, 0] for c in s: if c == 'N': chk[0] += 1 elif c == 'S': chk[1] += 1 elif c == 'W': chk[2] += 1 else: chk[3] += 1 if chk[0] > 0: if chk[1] == 0: print("No") exit() if chk[1] > 0: if chk[0] == 0: print("No") ...
p04019
<span class="lang-en"> <p>Score : <var>200</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip. At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <...
SENW
Yes
1,200,440
s094339742
p04019
u267300160
1581194848
Python
Python (3.4.3)
py
Accepted
17
3060
173
S = sorted(set(list(input()))) if S == ["E","N","S","W"]: print("Yes") elif S == ["E","W"]: print("Yes") elif S == ["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,441
s778998752
p04019
u620755587
1581113217
Python
Python (3.4.3)
py
Accepted
17
3064
231
s = input() n = s.count("N") ss = s.count("S") w = s.count("W") e = s.count("E") if (n == 0 and ss > 0) or (ss == 0 and n > 0): print("No") exit() if (w == 0 and e > 0) or (e == 0 and 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,442
s220742744
p04019
u353855427
1580968885
Python
Python (3.4.3)
py
Accepted
17
2940
128
S = input() S_set = set(S) if S_set == set("WE") or S_set == set("NS") or S_set == set("WENS"): 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,443
s888513575
p04019
u242031676
1580945614
Python
Python (3.4.3)
py
Accepted
18
3060
144
n, e, w, s = [0]*4 for i in input(): if i=="N": n=1 if i=="E": e=1 if i=="W": w=1 if i=="S": s=1 print("YNeos"[n!=s or e!=w::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,444
s221464510
p04019
u060505280
1580942607
Python
Python (3.4.3)
py
Accepted
18
3064
312
S = input() d = {'N': 0, 'W': 0, 'S': 0, 'E': 0} prev = 'null' for s_i in S: d[s_i] = 1 if sum(d.values()) == 4: break y = False x = False if (d['N'] and d['S']) or not(d['N'] or d['S']): y = True if (d['W'] and d['E']) or not(d['W'] or d['E']): x = True print('Yes' if y and x 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,445
s311945347
p04019
u328510800
1580919406
Python
Python (3.4.3)
py
Accepted
17
3060
207
import sys s = input() south = 'S' in s north = 'N' in s east = 'E' in s west = 'W' in s f = lambda x, y : x and not y or y and not x if f(south, north) or f(west, east): 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,446
s465016568
p04019
u328510800
1580919163
Python
Python (3.4.3)
py
Accepted
17
3060
235
import sys s = input() south = s.count('S') north = s.count('N') east = s.count('E') west = s.count('W') f = lambda x, y : x == 0 and y != 0 or x != 0 and y == 0 if f(south, north) or f(west, east): 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,447
s875717904
p04019
u361381049
1580874184
Python
Python (3.4.3)
py
Accepted
17
3064
362
s = input() ans = 'Yes' n = 0 w = 0 sow = 0 e = 0 #print(s) for i in range(len(s)): if s[i] == 'N': n += 1 elif s[i] == 'W': w += 1 elif s[i] == 'S': sow += 1 else: e += 1 if (n == 0 and sow != 0) or (n != 0 and sow == 0): ans = 'No' if (w == 0 and e != 0) or (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,448
s535914411
p04019
u436611990
1580800961
Python
Python (3.4.3)
py
Accepted
17
3064
302
S = input() compass = list(S) vertical = [] width = [] if "N" in compass: vertical.append(1) if "S" in compass: vertical.append(-1) if "W" in compass: width.append(1) if "E" in compass: width.append(-1) if sum(vertical) == 0 and sum(width) == 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,449
s378678086
p04019
u648212584
1580764608
Python
Python (3.4.3)
py
Accepted
21
3316
441
import sys #input = sys.stdin.buffer.readline import collections def main(): S = str(input()) c = collections.Counter(S) c = c.keys() if len(c) == 4: print("Yes") elif len(c) == 2: if ("S" in c and "N" in c): print("Yes") elif ("W" in c and "E" in c): ...
p04019
<span class="lang-en"> <p>Score : <var>200</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip. At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <...
SENW
Yes
1,200,450
s938351468
p04019
u503111914
1580668331
Python
Python (3.4.3)
py
Accepted
17
2940
238
s = input() print("No" if (s.count("N") == 0 and s.count("S") > 0)\ or (s.count("S") == 0 and s.count("N") > 0)\ or (s.count("W") == 0 and s.count("E") > 0)\ or (s.count("E") == 0 and s.count("W") > 0)\ 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,451
s228043724
p04019
u620755587
1580512493
Python
Python (3.4.3)
py
Accepted
17
3060
262
s = input() no = False if (s.count("N") == 0 and s.count("S") > 0)\ or (s.count("N") > 0 and s.count("S") == 0)\ or (s.count("W") == 0 and s.count("E") > 0)\ or (s.count("W") > 0 and s.count("E") == 0): no = True if no: 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,452
s413988509
p04019
u762420987
1580510666
Python
Python (3.4.3)
py
Accepted
17
2940
186
S = set(input()) if (("W" in S and "E" in S) or ("W" not in S and "E" not in S)) and (("N" in S and "S" in S) or ("N" not in S and "S" not in S)): print("Yes") else: print("No")
p04019
<span class="lang-en"> <p>Score : <var>200</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip. At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <...
SENW
Yes
1,200,453
s025721168
p04019
u328510800
1580256854
Python
Python (3.4.3)
py
Accepted
18
3064
250
import sys s = input() south = s.count('S') north = s.count('N') east = s.count('E') west = s.count('W') f = lambda x, y : x == 0 and y != 0 if f(south, north) or f(north, south) or f(east, west) or f(west, east): 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,454
s502055338
p04019
u102242691
1580183546
Python
Python (3.4.3)
py
Accepted
17
3060
530
s = list(input()) if s.count("N") == 0 and s.count("S") > 0: print("No") elif s.count("S") == 0 and s.count("N") > 0: print("No") elif s.count("W") == 0 and s.count("E") > 0: print("No") elif s.count("E") == 0 and s.count("W") > 0: print("No") else: print("Yes") """ if s.count("N") > 0 and s.cou...
p04019
<span class="lang-en"> <p>Score : <var>200</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip. At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <...
SENW
Yes
1,200,455
s445406567
p04019
u683134447
1580053922
Python
Python (3.4.3)
py
Accepted
17
3060
135
s = list(input()) a = ('N' in s) + ('S' in s) b = ('W' in s) + ('E' in s) if a == 1 or 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,456
s446247401
p04019
u970197315
1579740904
Python
Python (3.4.3)
py
Accepted
18
3064
433
# A - Wanna go back home ss=input() n=ss.count('N') w=ss.count('W') s=ss.count('S') e=ss.count('E') ns=False if n>0 and s>0: ns=True elif n==0 and s>0: ns=False elif n>0 and s==0: ns=False elif n==0 and s==0: ns=True we=False if w>0 and e>0: we=True elif w==0 and e>0: we=False elif w>0 and e==...
p04019
<span class="lang-en"> <p>Score : <var>200</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip. At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <...
SENW
Yes
1,200,457
s186696184
p04019
u626468554
1579651268
Python
Python (3.4.3)
py
Accepted
20
3064
273
S = list(input()) ans = True if ("N" in S) and not("S" in S): ans = False if ("S" in S) and not("N" in S): ans = False if ("W" in S) and not("E" in S): ans = False if ("E" in S) and not("W" in S): ans = False if ans: print("Yes") else: print("No")
p04019
<span class="lang-en"> <p>Score : <var>200</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip. At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <...
SENW
Yes
1,200,458
s719990306
p04019
u798818115
1579059560
Python
Python (3.4.3)
py
Accepted
19
3060
285
# coding: utf-8 # Your code here! S=input() if "E" in S or "W" in S: if "E" in S and "W" in S: pass else: print("No") exit() if "N" in S or "S" in S: if "N" in S and "S" 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,459
s580860277
p04019
u273010357
1579031137
Python
Python (3.4.3)
py
Accepted
17
2940
114
s = input() s = set(s) if s==set('WE') or s==set('SN') or s==set('SNWE'): 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,460
s693142753
p04019
u861141787
1578975186
Python
Python (3.4.3)
py
Accepted
18
3064
410
s = input() dir = [0 for i in range(4)] for i in range(len(s)): if s[i] == "N": dir[0] += 1 elif s[i] == "W": dir[1] += 1 elif s[i] == "S": dir[2] += 1 elif s[i] == "E": dir[3] += 1 if 0 not in dir: print("Yes") elif dir.count(0) == 3: print("No") elif dir[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,461
s726744376
p04019
u747703115
1578856488
Python
Python (3.4.3)
py
Accepted
17
2940
110
s = input() if (('N' in s) ^ ('S' in s)) or (('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,462
s659466253
p04019
u690781906
1578783552
Python
Python (3.4.3)
py
Accepted
17
3060
210
s = list(input()) if len(set(s)) == 4: print('Yes') elif len(set(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,463
s746050477
p04019
u614875193
1578609351
Python
Python (3.4.3)
py
Accepted
17
3060
124
S=set(sorted(list(input()))) if S=={'E','N','S','W'} or S=={'N','S'} or S=={'E','W'}: print('Yes') else: print('No')
p04019
<span class="lang-en"> <p>Score : <var>200</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke lives on an infinite two-dimensional plane. He is going on an <var>N</var>-day trip. At the beginning of Day <var>1</var>, he is at home. His plan is described in a string <var>S</var> of length <...
SENW
Yes
1,200,464
s152803402
p04019
u386089355
1578589322
Python
Python (3.4.3)
py
Accepted
17
3064
244
s = input() flag = [0, 0] if ("N" in s and "S" in s) or ("N" not in s and "S" not in s): flag[0] = 1 if ("W" in s and "E" in s) or ("W" not in s and "E" not in s): flag[1] = 1 if sum(flag) == 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,465
s352328127
p04019
u027929618
1578545912
Python
Python (3.4.3)
py
Accepted
17
2940
105
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,466
s141002336
p04019
u314050667
1578421993
Python
Python (3.4.3)
py
Accepted
17
3064
252
s = input() N,W,S,E = s.count("N"),s.count("W"),s.count("S"),s.count("E") cond = 1 if N == 0 and S > 0: cond = 0 if S == 0 and N > 0: cond = 0 if W == 0 and E > 0: cond = 0 if E == 0 and W > 0: cond = 0 if cond: 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,467
s506719889
p04019
u080364835
1578238535
Python
Python (3.4.3)
py
Accepted
17
2940
123
s = set(input()) move = [{'N', 'S', 'E', 'W'}, {'N', 'S'}, {'E', 'W'}] if s in move: 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,468
s397808584
p04019
u080364835
1578238250
Python
Python (3.4.3)
py
Accepted
18
3188
242
sl = list(input()) move = len(set(sl)) if move == 4: print('Yes') elif move == 2: if ('N' in set(sl) and 'S' in set(sl)) or ('E' in set(sl) and 'W' in set(sl)): 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,469
s939674825
p04019
u256464928
1578194491
Python
Python (3.4.3)
py
Accepted
18
2940
214
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,470