node_ids
listlengths
4
1.4k
edge_index
listlengths
1
2.22k
text
listlengths
4
1.4k
source
stringlengths
14
427k
[ 7, 0, 13, 4, 13, 14, 2, 17, 13, 14, 40, 17, 13, 4, 13, 17, 14, 2, 17, 13, 14, 40, 17, 13, 4, 13, 17, 4, 13, 17, 14, 2, 17, 13, 4, 13, 17, 4, 13, 17, 14, 2, 17, 13, 4, 13, 17, 14, 2, 17, 13, 14, 40, 17, 13, ...
[ [ 72, 2 ], [ 73, 8 ], [ 73, 12 ], [ 73, 19 ], [ 73, 23 ], [ 73, 33 ], [ 73, 43 ], [ 73, 50 ], [ 73, 54 ], [ 73, 64 ], [ 72, 73 ] ]
[ "S = input()\n\nif \"N\" in S:\n if \"S\" not in S:\n print(\"No\")\n elif \"E\" in S:\n if \"W\" not in S:\n print(\"No\")\n else:\n print(\"Yes\")\n else:\n if \"W\" in S:\n print(\"No\")\n else:\n print(\"Yes\")\n\n\nelse:\n ...
S = input() if "N" in S: if "S" not in S: print("No") elif "E" in S: if "W" not in S: print("No") else: print("Yes") else: if "W" in S: print("No") else: print("Yes") else: if "S" in S: print("No") eli...
[ 7, 15, 0, 13, 4, 13, 14, 2, 2, 2, 2, 17, 13, 2, 17, 13, 2, 40, 17, 13, 40, 17, 13, 2, 2, 2, 17, 13, 2, 17, 13, 2, 40, 17, 13, 40, 17, 13, 4, 13, 17, 4, 13, 17, 10, 4, 13 ]
[ [ 45, 3 ], [ 46, 12 ], [ 46, 15 ], [ 46, 19 ], [ 46, 22 ], [ 46, 27 ], [ 46, 30 ], [ 46, 34 ], [ 46, 37 ], [ 45, 46 ] ]
[ "from collections import Counter\n\nS = input()\nif ((\"N\" in S and \"S\" in S) or (\"N\" not in S and \"S\" not in S)) and ((\"E\" in S and \"W\" in S) or (\"E\" not in S and \"W\" not in S)):\n print(\"Yes\")\nelse:\n print(\"No\")", "from collections import Counter", "S = input()", "S", "input()",...
from collections import Counter S = input() if (("N" in S and "S" in S) or ("N" not in S and "S" not in S)) and (("E" in S and "W" in S) or ("E" not in S and "W" not in S)): print("Yes") else: print("No")
[ 7, 0, 13, 4, 13, 0, 13, 2, 39, 17, 17, 28, 13, 4, 13, 4, 13, 13, 14, 2, 18, 13, 13, 17, 0, 18, 13, 17, 17, 14, 2, 18, 13, 13, 17, 0, 18, 13, 17, 17, 14, 2, 18, 13, 13, 17, 0, 18, 13, 17, 17, 0, 18, 13, 17, ...
[ [ 79, 2 ], [ 82, 6 ], [ 13, 12 ], [ 80, 17 ], [ 80, 21 ], [ 12, 22 ], [ 28, 25 ], [ 83, 26 ], [ 80, 32 ], [ 12, 33 ], [ 39, 36 ], [ 83, 37 ], [ 80, 43 ], [ ...
[ "s = input()\nflag = [0] * 4\nfor i in range(len(s)):\n if s[i] == \"N\":\n flag[0] = 1\n elif s[i] == \"S\":\n flag[1] = 1\n elif s[i] == \"W\":\n flag[2] = 1\n else:\n flag[3] = 1\nif flag[0] == flag[1] and flag[2] == flag[3]:\n print(\"Yes\")\nelse:\n print(\"No\")", "s = input()", "s", "...
s = input() flag = [0] * 4 for i in range(len(s)): if s[i] == "N": flag[0] = 1 elif s[i] == "S": flag[1] = 1 elif s[i] == "W": flag[2] = 1 else: flag[3] = 1 if flag[0] == flag[1] and flag[2] == flag[3]: print("Yes") else: print("No")
[ 7, 0, 13, 4, 13, 0, 13, 4, 18, 13, 13, 17, 0, 13, 4, 18, 13, 13, 17, 0, 13, 4, 18, 13, 13, 17, 0, 13, 4, 18, 13, 13, 17, 14, 2, 2, 2, 2, 13, 17, 2, 13, 17, 2, 2, 13, 17, 2, 13, 17, 2, 2, 2, 13, 17, 2, 13,...
[ [ 81, 2 ], [ 72, 6 ], [ 82, 9 ], [ 75, 13 ], [ 82, 16 ], [ 78, 20 ], [ 82, 23 ], [ 84, 27 ], [ 82, 30 ], [ 73, 38 ], [ 79, 41 ], [ 73, 45 ], [ 79, 48 ], [ 7...
[ "S = input()\n\nN_cnt = S.count('N')\nW_cnt = S.count('W')\nS_cnt = S.count('S')\nE_cnt = S.count('E')\n\nif ((N_cnt > 0 and S_cnt > 0) or (N_cnt == 0 and S_cnt == 0)) \\\n\tand ((W_cnt > 0 and E_cnt > 0) or (W_cnt == 0 and E_cnt == 0)):\n\tprint('Yes')\nelse:\n\tprint('No')", "S = input()", "S", "input()", ...
S = input() N_cnt = S.count('N') W_cnt = S.count('W') S_cnt = S.count('S') E_cnt = S.count('E') if ((N_cnt > 0 and S_cnt > 0) or (N_cnt == 0 and S_cnt == 0)) \ and ((W_cnt > 0 and E_cnt > 0) or (W_cnt == 0 and E_cnt == 0)): print('Yes') else: print('No')
[ 7, 0, 13, 4, 13, 4, 13, 4, 13, 4, 13, 14, 2, 2, 4, 13, 13, 17, 2, 4, 13, 13, 17, 14, 2, 2, 4, 13, 13, 17, 2, 4, 13, 13, 17, 14, 2, 2, 13, 39, 17, 17, 2, 13, 39, 17, 17, 14, 2, 13, 39, 17, 17, 17, 17, 4, 1...
[ [ 59, 2 ], [ 60, 16 ], [ 60, 21 ], [ 60, 28 ], [ 60, 33 ], [ 60, 38 ], [ 60, 43 ], [ 60, 49 ], [ 59, 60 ] ]
[ "s = sorted(list(set(input())))\n\nif len(s) == 1 or len(s)==3: ans = \"No\"\nelif len(s) == 2 or len(s)==4:\n if s == [\"N\",\"S\"] or s == [\"E\", \"W\"]: ans = \"Yes\"\n elif s == [\"E\", \"N\", \"S\", \"W\"]: ans = \"Yes\"\n else: ans = \"No\"\nprint(ans)", "s = sorted(list(set(input())))", "s", ...
s = sorted(list(set(input()))) if len(s) == 1 or len(s)==3: ans = "No" elif len(s) == 2 or len(s)==4: if s == ["N","S"] or s == ["E", "W"]: ans = "Yes" elif s == ["E", "N", "S", "W"]: ans = "Yes" else: ans = "No" print(ans)
[ 7, 15, 0, 13, 4, 18, 4, 18, 13, 13, 13, 14, 2, 2, 2, 2, 2, 17, 13, 40, 17, 13, 2, 2, 17, 13, 40, 17, 13, 2, 2, 17, 13, 40, 17, 13, 2, 2, 17, 13, 40, 17, 13, 4, 13, 17, 4, 13, 17, 10, 4, 13 ]
[ [ 50, 3 ], [ 51, 18 ], [ 51, 21 ], [ 51, 25 ], [ 51, 28 ], [ 51, 32 ], [ 51, 35 ], [ 51, 39 ], [ 51, 42 ], [ 50, 51 ] ]
[ "from sys import stdin\nS = stdin.readline().rstrip()\nif ('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):\n print(\"No\")\nelse:\n print('Yes')", "from sys import stdin", "S = stdin.readline().rstrip()", "S", "stdin.readline().rs...
from sys import stdin S = stdin.readline().rstrip() if ('N' in S and 'S' not in S) or ('S' in S and 'N' not in S) or ('W' in S and 'E' not in S)or ('E' in S and 'W' not in S): print("No") else: print('Yes')
[ 7, 0, 13, 4, 13, 0, 13, 17, 14, 2, 2, 17, 13, 2, 17, 13, 0, 13, 17, 14, 2, 2, 17, 13, 2, 17, 13, 0, 13, 17, 14, 13, 4, 13, 17, 4, 13, 17, 10, 17, 13, 10, 17, 13, 10, 17, 13, 10, 4, 13 ]
[ [ 48, 2 ], [ 45, 6 ], [ 49, 12 ], [ 49, 15 ], [ 42, 17 ], [ 49, 23 ], [ 49, 26 ], [ 39, 28 ], [ 39, 40 ], [ 42, 43 ], [ 45, 46 ], [ 48, 49 ] ]
[ "S = input()\nans = True\nif ('S' in S) ^ ('N' in S):\n ans = False\nif ('W' in S) ^ ('E' in S):\n ans = False\nif ans:\n print('Yes')\nelse:\n print('No')", "S = input()", "S", "input()", "input", "ans = True", "ans", "True", "if ('S' in S) ^ ('N' in S):\n ans = False", "('S' in S)...
S = input() ans = True if ('S' in S) ^ ('N' in S): ans = False if ('W' in S) ^ ('E' in S): ans = False if ans: print('Yes') else: print('No')
[ 7, 12, 13, 29, 4, 13, 4, 13, 12, 13, 29, 4, 13, 13, 4, 18, 4, 13, 13, 12, 13, 29, 4, 13, 4, 13, 12, 13, 29, 4, 13, 4, 13, 12, 13, 29, 4, 13, 4, 13, 13, 0, 13, 4, 13, 0, 13, 17, 13, 17, 13, 17, 13, 17, 28, 1...
[ [ 130, 42 ], [ 158, 44 ], [ 154, 46 ], [ 160, 48 ], [ 148, 50 ], [ 133, 52 ], [ 56, 55 ], [ 131, 60 ], [ 158, 60 ], [ 131, 64 ], [ 158, 64 ], [ 55, 65 ], [ 163, 68 ...
[ "def i():\n\treturn int(input())\ndef i2():\n\treturn map(int,input().split())\ndef s():\n\treturn str(input())\ndef l():\n\treturn list(input())\ndef intl():\n\treturn list(int(k) for k in input().split())\n\ns = s()\n\ncn,cs,ce,cw = 0,0,0,0\nfor i in range(len(s)):\n\tif s[i] == \"N\":\n\t\tcn = 1\n\telif s[i] ==...
def i(): return int(input()) def i2(): return map(int,input().split()) def s(): return str(input()) def l(): return list(input()) def intl(): return list(int(k) for k in input().split()) s = s() cn,cs,ce,cw = 0,0,0,0 for i in range(len(s)): if s[i] == "N": cn = 1 elif s[i] == "S": cs = 1 elif s[i] == "E":...
[ 7, 0, 13, 4, 13, 4, 13, 14, 2, 2, 17, 13, 2, 17, 13, 14, 2, 2, 17, 13, 2, 17, 13, 4, 13, 17, 14, 2, 40, 17, 13, 40, 17, 13, 4, 13, 17, 4, 13, 17, 14, 2, 40, 17, 13, 40, 17, 13, 14, 2, 2, 17, 13, 2, 17, 13, ...
[ [ 77, 2 ], [ 78, 11 ], [ 78, 14 ], [ 78, 19 ], [ 78, 22 ], [ 78, 30 ], [ 78, 33 ], [ 78, 44 ], [ 78, 47 ], [ 78, 52 ], [ 78, 55 ], [ 78, 63 ], [ 78, 66 ], [ ...
[ "x = list(input())\nif 'N' in x and 'S' in x:\n if 'E' in x and 'W' in x:\n print('Yes')\n elif 'E' not in x and 'W' not in x:\n print('Yes')\n else:\n print('No')\nelif 'N' not in x and 'S' not in x:\n if 'E' in x and 'W' in x:\n print('Yes')\n elif 'E' not in x and 'W' not in x:\n print('Yes')...
x = list(input()) if 'N' in x and 'S' in x: if 'E' in x and 'W' in x: print('Yes') elif 'E' not in x and 'W' not in x: print('Yes') else: print('No') elif 'N' not in x and 'S' not in x: if 'E' in x and 'W' in x: print('Yes') elif 'E' not in x and 'W' not in x: print('Yes') else: prin...
[ 7, 0, 13, 39, 17, 17, 17, 17, 28, 13, 4, 13, 14, 2, 13, 17, 0, 18, 13, 17, 17, 14, 2, 13, 17, 0, 18, 13, 17, 17, 14, 2, 13, 17, 0, 18, 13, 17, 17, 14, 2, 13, 17, 0, 18, 13, 17, 17, 14, 2, 2, 2, 18, 13, 17, ...
[ [ 133, 2 ], [ 10, 9 ], [ 9, 14 ], [ 20, 17 ], [ 134, 18 ], [ 9, 23 ], [ 29, 26 ], [ 134, 27 ], [ 9, 32 ], [ 38, 35 ], [ 134, 36 ], [ 9, 41 ], [ 47, 44 ], [ ...
[ "Count = [0,0,0,0]\nfor j in input():\n if j == 'N':\n Count[0] +=1\n elif j == 'S':\n Count[1] +=1\n elif j == 'W':\n Count[2] +=1\n elif j == 'E':\n Count[3] +=1\n\nif (Count[0] > 0 and Count[1] > 0) and (Count[2] > 0 and Count[3] > 0):\n print(\"Yes\")\nelif (Count[0] =...
Count = [0,0,0,0] for j in input(): if j == 'N': Count[0] +=1 elif j == 'S': Count[1] +=1 elif j == 'W': Count[2] +=1 elif j == 'E': Count[3] +=1 if (Count[0] > 0 and Count[1] > 0) and (Count[2] > 0 and Count[3] > 0): print("Yes") elif (Count[0] == 0 and Count[1] == ...
[ 7, 15, 13, 0, 13, 18, 18, 13, 13, 13, 0, 13, 4, 18, 4, 13, 13, 17, 0, 13, 4, 18, 13, 13, 17, 0, 13, 4, 18, 13, 13, 17, 0, 13, 4, 18, 13, 13, 17, 0, 13, 4, 18, 13, 13, 17, 14, 2, 2, 2, 13, 17, 2, 13, 17, 40,...
[ [ 94, 4 ], [ 100, 11 ], [ 95, 15 ], [ 91, 19 ], [ 101, 22 ], [ 103, 26 ], [ 101, 29 ], [ 88, 33 ], [ 101, 36 ], [ 97, 40 ], [ 101, 43 ], [ 92, 50 ], [ 104, 53 ], ...
[ "import sys\ninput = sys.stdin.readline\n\nA = input().rstrip('\\n')\n\nN = A.count(\"N\")\nS = A.count(\"S\")\nW = A.count(\"W\")\nE = A.count(\"E\")\n\nif (N == 0 or S == 0) and N + S != 0:\n print(\"No\")\n exit()\nif (W == 0 or E == 0) and W + E != 0:\n print(\"No\")\n exit()\nprint(\"Yes\")", "im...
import sys input = sys.stdin.readline A = input().rstrip('\n') N = A.count("N") S = A.count("S") W = A.count("W") E = A.count("E") if (N == 0 or S == 0) and N + S != 0: print("No") exit() if (W == 0 or E == 0) and W + E != 0: print("No") exit() print("Yes")
[ 7, 0, 13, 4, 13, 0, 13, 17, 0, 13, 17, 13, 13, 28, 13, 13, 14, 2, 13, 17, 0, 13, 17, 14, 2, 13, 17, 0, 13, 17, 14, 2, 13, 17, 0, 13, 17, 14, 2, 13, 17, 0, 13, 17, 0, 13, 2, 2, 2, 2, 13, 13, 17, 2, 2, 13, ...
[ [ 98, 2 ], [ 113, 6 ], [ 113, 9 ], [ 113, 11 ], [ 113, 12 ], [ 15, 14 ], [ 99, 14 ], [ 14, 18 ], [ 95, 21 ], [ 14, 25 ], [ 110, 28 ], [ 14, 32 ], [ 104, 35 ], [...
[ "S=input()\nn=w=s=e=0\nfor c in S:\n if c=='N':\n n+=1\n elif c=='W':\n w+=1\n elif c=='S':\n s+=1\n elif c=='E':\n e+=1\nok=(n==s==0 or (n>0 and s>0)) and (w==e==0 or (w>0 and e>0))\nans=\"Yes\" if ok else \"No\"\nprint(ans)", "S=input()", "S", "input()", "input", ...
S=input() n=w=s=e=0 for c in S: if c=='N': n+=1 elif c=='W': w+=1 elif c=='S': s+=1 elif c=='E': e+=1 ok=(n==s==0 or (n>0 and s>0)) and (w==e==0 or (w>0 and e>0)) ans="Yes" if ok else "No" print(ans)
[ 7, 15, 13, 12, 13, 0, 13, 4, 13, 4, 13, 0, 13, 4, 18, 13, 13, 13, 0, 13, 4, 13, 4, 18, 13, 13, 4, 13, 8, 2, 2, 2, 2, 4, 18, 13, 13, 17, 17, 2, 4, 18, 13, 13, 17, 17, 2, 2, 4, 18, 13, 13, 17, 17, 2, 4, 18,...
[ [ 7, 6 ], [ 13, 12 ], [ 6, 17 ], [ 20, 19 ], [ 12, 24 ], [ 19, 35 ], [ 19, 42 ], [ 19, 50 ], [ 19, 57 ], [ 19, 66 ], [ 19, 73 ], [ 19, 81 ], [ 19, 88 ], [ 1...
[ "import collections\n\n\ndef main():\n s = list(input())\n c = collections.Counter(s)\n keys = list(c.keys())\n print(\"Yes\" if ((keys.count(\"S\") == 0 and keys.count(\"N\") == 0) or (keys.count(\"S\") == 1 and keys.count(\"N\") == 1)) and (\n (keys.count(\"E\") == 0 and keys.count(\"W\") == 0)...
import collections def main(): s = list(input()) c = collections.Counter(s) keys = list(c.keys()) print("Yes" if ((keys.count("S") == 0 and keys.count("N") == 0) or (keys.count("S") == 1 and keys.count("N") == 1)) and ( (keys.count("E") == 0 and keys.count("W") == 0) or (keys.count("E") == 1 a...
[ 7, 15, 0, 13, 4, 13, 0, 13, 4, 13, 12, 17, 28, 13, 13, 0, 18, 13, 13, 17, 14, 2, 18, 13, 17, 17, 14, 2, 18, 13, 17, 17, 4, 13, 17, 4, 13, 14, 2, 18, 13, 17, 17, 14, 2, 18, 13, 17, 17, 4, 13, 17, 4, 13, 14, ...
[ [ 92, 3 ], [ 95, 7 ], [ 14, 13 ], [ 93, 13 ], [ 19, 16 ], [ 96, 17 ], [ 13, 18 ], [ 96, 23 ], [ 96, 29 ], [ 96, 40 ], [ 96, 46 ], [ 96, 57 ], [ 96, 63 ], [ ...
[ "from collections import defaultdict\ns = input()\nd = defaultdict(lambda: 0)\nfor c in s:\n d[c] += 1\n\nif d[\"N\"] > 0:\n if d[\"S\"] == 0:\n print(\"No\")\n exit()\nif d[\"S\"] > 0:\n if d[\"N\"] == 0:\n print(\"No\")\n exit()\nif d[\"W\"] > 0:\n if d[\"E\"] == 0:\n print(\"No\"...
from collections import defaultdict s = input() d = defaultdict(lambda: 0) for c in s: d[c] += 1 if d["N"] > 0: if d["S"] == 0: print("No") exit() if d["S"] > 0: if d["N"] == 0: print("No") exit() if d["W"] > 0: if d["E"] == 0: print("No") exit() if d["E"] > 0: if d["...
[ 7, 0, 13, 4, 13, 4, 13, 8, 2, 2, 2, 2, 2, 17, 13, 40, 17, 13, 2, 2, 17, 13, 40, 17, 13, 2, 2, 17, 13, 40, 17, 13, 2, 2, 17, 13, 40, 17, 13, 17, 17, 10, 4, 13 ]
[ [ 42, 2 ], [ 43, 14 ], [ 43, 17 ], [ 43, 21 ], [ 43, 24 ], [ 43, 28 ], [ 43, 31 ], [ 43, 35 ], [ 43, 38 ], [ 42, 43 ] ]
[ "s=input()\nprint('No' if 'N' in s and 'S' not in s or 'S' in s and 'N' not in s or 'W' in s and 'E' not in s or 'E' in s and 'W' not in s else 'Yes')", "s=input()", "s", "input()", "input", "print('No' if 'N' in s and 'S' not in s or 'S' in s and 'N' not in s or 'W' in s and 'E' not in s or 'E' in s and ...
s=input() print('No' if 'N' in s and 'S' not in s or 'S' in s and 'N' not in s or 'W' in s and 'E' not in s or 'E' in s and 'W' not in s else 'Yes')
[ 7, 15, 13, 12, 13, 12, 13, 0, 13, 4, 13, 4, 13, 0, 13, 17, 14, 2, 2, 2, 13, 17, 2, 13, 17, 2, 13, 17, 0, 13, 17, 4, 13, 13, 4, 13, 10, 12, 13, 10, 12, 13 ]
[ [ 9, 8 ], [ 38, 12 ], [ 15, 14 ], [ 8, 20 ], [ 8, 23 ], [ 8, 26 ], [ 30, 29 ], [ 29, 33 ], [ 14, 33 ], [ 41, 35 ] ]
[ "import sys\ndef input(): return sys.stdin.readline().strip()\n\ndef resolve():\n s=set(input())\n ans='No'\n if s=={'N','S','W','E'} or s=={'N','S'} or s=={'W','E'}:\n ans='Yes'\n print(ans)\nresolve()", "import sys", "sys", "def input(): return sys.stdin.readline().strip()", "input", ...
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()
[ 7, 0, 13, 4, 13, 0, 13, 17, 14, 2, 4, 18, 13, 13, 17, 40, 4, 18, 13, 13, 17, 0, 13, 17, 14, 2, 40, 4, 18, 13, 13, 17, 4, 18, 13, 13, 17, 0, 13, 17, 14, 2, 4, 18, 13, 13, 17, 40, 4, 18, 13, 13, 17, 0, 13, 17...
[ [ 91, 2 ], [ 76, 6 ], [ 92, 12 ], [ 92, 18 ], [ 85, 22 ], [ 92, 29 ], [ 92, 34 ], [ 88, 38 ], [ 92, 44 ], [ 92, 50 ], [ 79, 54 ], [ 92, 61 ], [ 92, 66 ], [ ...
[ "S = input()\nres = \"Yes\"\nif S.count('N') and not S.count('S'):\n res = \"No\"\nif not S.count('N') and S.count('S'):\n res = \"No\"\nif S.count('E') and not S.count('W'):\n res = \"No\"\nif not S.count('E') and S.count('W'):\n res = \"No\"\nprint(res)", "S = input()", "S", "input()", "input"...
S = input() res = "Yes" if S.count('N') and not S.count('S'): res = "No" if not S.count('N') and S.count('S'): res = "No" if S.count('E') and not S.count('W'): res = "No" if not S.count('E') and S.count('W'): res = "No" print(res)
[ 7, 0, 13, 4, 13, 4, 13, 14, 2, 2, 17, 13, 40, 17, 13, 4, 13, 17, 14, 2, 2, 17, 13, 40, 17, 13, 4, 13, 17, 14, 2, 2, 17, 13, 40, 17, 13, 4, 13, 17, 14, 2, 2, 17, 13, 40, 17, 13, 4, 13, 17, 4, 13, 17, 10, 4, ...
[ [ 55, 2 ], [ 56, 11 ], [ 56, 14 ], [ 56, 22 ], [ 56, 25 ], [ 56, 33 ], [ 56, 36 ], [ 56, 44 ], [ 56, 47 ], [ 55, 56 ] ]
[ "S=list(input())\nif 'N' in S and 'S' not in S:\n print('No')\nelif 'S' in S and 'N' not in S:\n print('No')\nelif 'W' in S and 'E' not in S:\n print('No')\nelif 'E' in S and 'W' not in S:\n print('No')\nelse:\n print('Yes')", "S=list(input())", "S", "list(input())", "list", "input()", "i...
S=list(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')
[ 7, 0, 13, 4, 13, 13, 14, 2, 4, 13, 13, 17, 4, 13, 17, 14, 2, 4, 13, 13, 17, 14, 2, 2, 17, 13, 2, 17, 13, 4, 13, 17, 14, 2, 2, 17, 13, 2, 17, 13, 4, 13, 17, 4, 13, 17, 4, 13, 17, 10, 4, 13 ]
[ [ 50, 2 ], [ 51, 10 ], [ 51, 19 ], [ 51, 25 ], [ 51, 28 ], [ 51, 36 ], [ 51, 39 ], [ 50, 51 ] ]
[ "S=set(x for x in input())\nif len(S)==4:\n print('Yes')\nelif len(S)==2:\n if 'W' in S and 'E' in S:\n print('Yes')\n elif 'N' in S and 'S' in S:\n print('Yes')\n else:\n print('No')\nelse:\n print('No') ", "S=set(x for x in input())", "S", "set(x for x in input())", "set", "x", "if len(...
S=set(x for x in input()) if len(S)==4: print('Yes') elif len(S)==2: if 'W' in S and 'E' in S: print('Yes') elif 'N' in S and 'S' in S: print('Yes') else: print('No') else: print('No')
[ 7, 15, 13, 12, 13, 12, 13, 0, 13, 4, 13, 0, 13, 17, 14, 2, 2, 2, 2, 17, 13, 2, 17, 13, 2, 17, 13, 2, 17, 13, 0, 13, 17, 14, 2, 2, 2, 2, 17, 13, 2, 17, 13, 40, 17, 13, 40, 17, 13, 0, 13, 17, 14, 2, 2, 2, 4...
[ [ 9, 8 ], [ 78, 10 ], [ 13, 12 ], [ 8, 20 ], [ 8, 23 ], [ 8, 26 ], [ 8, 29 ], [ 32, 31 ], [ 8, 39 ], [ 8, 42 ], [ 8, 45 ], [ 8, 48 ], [ 51, 50 ], [ 8, 5...
[ "import sys\ndef input(): return sys.stdin.readline().strip()\n\ndef resolve():\n s=input()\n ans='No'\n if 'N' in s and 'S' in s and 'W' in s and 'E' in s:\n ans='Yes'\n elif 'N' in s and 'S' in s and \\\n 'W' not in s and 'E' not in s:\n ans='Yes'\n elif 'N' not in s and 'S...
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\ ...
[ 7, 0, 13, 4, 13, 4, 13, 0, 13, 4, 13, 13, 14, 2, 4, 13, 13, 17, 14, 2, 2, 2, 4, 13, 13, 17, 2, 17, 13, 2, 17, 13, 14, 2, 2, 2, 4, 13, 13, 17, 2, 17, 13, 2, 17, 13, 10, 4, 13, 10, 4, 13 ]
[ [ 50, 2 ], [ 47, 8 ], [ 51, 11 ], [ 48, 16 ], [ 51, 16 ], [ 48, 24 ], [ 51, 24 ], [ 48, 28 ], [ 51, 28 ], [ 48, 31 ], [ 51, 31 ], [ 48, 38 ], [ 51, 38 ], [ ...
[ "l = list(input())\nl=set(l)\n\nif len(l)==4: print('Yes')\nelif len(l)==2 and 'N' in l and 'S' in l: print('Yes')\nelif len(l)==2 and 'E' in l and 'W' in l: print('Yes')\nelse: print('No')", "l = list(input())", "l", "list(input())", "list", "input()", "input", "l=set(l)", "l", "set(l)", "set",...
l = list(input()) l=set(l) if len(l)==4: print('Yes') elif len(l)==2 and 'N' in l and 'S' in l: print('Yes') elif len(l)==2 and 'E' in l and 'W' in l: print('Yes') else: print('No')
[ 7, 15, 13, 12, 13, 29, 4, 18, 4, 18, 18, 13, 13, 13, 13, 12, 13, 29, 4, 13, 4, 13, 12, 13, 41, 28, 13, 4, 18, 4, 13, 13, 4, 4, 13, 13, 29, 13, 12, 13, 15, 0, 13, 4, 13, 4, 13, 0, 13, 4, 13, 13, 28, 13, 13, ...
[ [ 123, 21 ], [ 27, 26 ], [ 123, 30 ], [ 26, 35 ], [ 43, 42 ], [ 123, 46 ], [ 49, 48 ], [ 54, 53 ], [ 42, 53 ], [ 59, 56 ], [ 48, 57 ], [ 53, 58 ], [ 48, 67 ], [...
[ "import sys\n# sys.setrecursionlimit(100000)\n\n\ndef input():\n return sys.stdin.readline().strip()\n\n\ndef input_int():\n return int(input())\n\n\ndef input_int_list():\n return [int(i) for i in input().split()]\n\n\ndef main():\n from collections import defaultdict\n S = list(input())\n d = de...
import sys # sys.setrecursionlimit(100000) def input(): return sys.stdin.readline().strip() def input_int(): return int(input()) def input_int_list(): return [int(i) for i in input().split()] def main(): from collections import defaultdict S = list(input()) d = defaultdict(int) for s...
[ 7, 0, 13, 4, 13, 0, 13, 4, 13, 28, 13, 13, 4, 18, 13, 13, 13, 0, 13, 4, 13, 13, 14, 2, 4, 13, 13, 17, 4, 13, 17, 14, 2, 4, 13, 13, 17, 14, 2, 2, 2, 18, 13, 17, 17, 2, 18, 13, 17, 17, 2, 2, 18, 13, 17, 17, ...
[ [ 98, 2 ], [ 104, 6 ], [ 11, 10 ], [ 99, 10 ], [ 105, 14 ], [ 10, 16 ], [ 101, 18 ], [ 105, 21 ], [ 102, 26 ], [ 105, 26 ], [ 102, 35 ], [ 105, 35 ], [ 102, 42 ],...
[ "S=input()\na=set()\nfor s in S:\n a.add(s)\na=list(a)\nif len(a)==4:\n print('Yes')\nelif len(a)==2:\n if (a[0]=='N' or a[0]=='S') and (a[1]=='N' or a[1]=='S'):\n print('Yes')\n elif (a[0]=='E' or a[0]=='W') and (a[1]=='E' or a[1]=='W'):\n print('Yes')\n else:\n print('No')\nelse:\n print('No')", ...
S=input() a=set() for s in S: a.add(s) a=list(a) if len(a)==4: print('Yes') elif len(a)==2: if (a[0]=='N' or a[0]=='S') and (a[1]=='N' or a[1]=='S'): print('Yes') elif (a[0]=='E' or a[0]=='W') and (a[1]=='E' or a[1]=='W'): print('Yes') else: print('No') else: print('No')
[ 7, 0, 13, 4, 13, 0, 13, 4, 18, 13, 13, 17, 0, 13, 4, 18, 13, 13, 17, 0, 13, 4, 18, 13, 13, 17, 0, 13, 4, 18, 13, 13, 17, 14, 2, 2, 2, 2, 13, 17, 2, 13, 17, 2, 13, 17, 2, 13, 17, 4, 13, 17, 14, 2, 2, 2, 2,...
[ [ 97, 2 ], [ 100, 6 ], [ 98, 9 ], [ 106, 13 ], [ 98, 16 ], [ 103, 20 ], [ 98, 23 ], [ 94, 27 ], [ 98, 30 ], [ 101, 38 ], [ 104, 41 ], [ 107, 44 ], [ 95, 47 ], [...
[ "# import collections\nS = input()\n# CS = collections.Counter(S)\n# print(CS)\ncn = S.count('N')\nce = S.count('E')\ncs = S.count('S')\ncw = S.count('W')\n# print(cn, cs, cw, ce)\nif cn > 0 and cs > 0 and ce == 0 and cw == 0:\n print('Yes')\nelif cn == 0 and cs == 0 and ce > 0 and cw > 0:\n print('Yes')\neli...
# 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 > ...
[ 7, 12, 13, 0, 13, 4, 13, 4, 13, 0, 13, 4, 18, 13, 13, 17, 0, 13, 4, 18, 13, 13, 17, 0, 13, 4, 18, 13, 13, 17, 0, 13, 4, 18, 13, 13, 17, 14, 2, 2, 13, 17, 2, 13, 17, 4, 13, 17, 29, 14, 2, 2, 13, 17, 2, 13, ...
[ [ 5, 4 ], [ 11, 10 ], [ 4, 13 ], [ 18, 17 ], [ 4, 20 ], [ 25, 24 ], [ 4, 27 ], [ 32, 31 ], [ 4, 34 ], [ 10, 40 ], [ 17, 43 ], [ 10, 52 ], [ 17, 55 ], [ 24, ...
[ "def resolve():\n S = str(input())\n n = S.count('N')\n s = S.count('S')\n w = S.count('W')\n e = S.count('E')\n if n > 0 and s == 0:\n print('No')\n return\n if n == 0 and s > 0:\n print('No')\n return\n if w > 0 and e == 0:\n print('No')\n return\n...
def resolve(): S = str(input()) n = S.count('N') s = S.count('S') w = S.count('W') e = S.count('E') if n > 0 and s == 0: print('No') return if n == 0 and s > 0: print('No') return if w > 0 and e == 0: print('No') return if w == 0 and e ...
[ 7, 15, 13, 12, 13, 0, 13, 4, 13, 4, 13, 0, 13, 4, 13, 13, 14, 2, 4, 13, 13, 39, 17, 17, 4, 13, 17, 14, 2, 2, 13, 4, 13, 39, 17, 17, 2, 13, 4, 13, 39, 17, 17, 4, 13, 17, 14, 2, 4, 13, 13, 17, 4, 13, 17, 4, ...
[ [ 7, 6 ], [ 13, 12 ], [ 6, 15 ], [ 12, 20 ], [ 12, 30 ], [ 12, 37 ], [ 12, 50 ], [ 66, 63 ] ]
[ "import collections\n\ndef main():\n S = list(input())\n Sset = set(S)\n if len(Sset) in [1, 3]:\n print('No')\n elif Sset == set(['S', 'N']) or Sset == set(['W', 'E']):\n print('Yes')\n elif len(Sset) == 4:\n print('Yes')\n else:\n print('No')\n\nif __name__ == \"__mai...
import collections def main(): S = list(input()) Sset = set(S) if len(Sset) in [1, 3]: print('No') elif Sset == set(['S', 'N']) or Sset == set(['W', 'E']): print('Yes') elif len(Sset) == 4: print('Yes') else: print('No') if __name__ == "__main__": main()
[ 7, 15, 13, 0, 13, 4, 13, 4, 13, 0, 13, 17, 0, 13, 4, 18, 13, 13, 13, 14, 2, 2, 18, 13, 17, 18, 13, 17, 17, 14, 40, 18, 13, 17, 18, 13, 17, 0, 13, 17, 14, 2, 2, 18, 13, 17, 18, 13, 17, 17, 14, 40, 18, 13, 17, ...
[ [ 77, 4 ], [ 65, 10 ], [ 74, 13 ], [ 78, 18 ], [ 75, 23 ], [ 75, 26 ], [ 75, 32 ], [ 75, 35 ], [ 68, 38 ], [ 75, 44 ], [ 75, 47 ], [ 75, 53 ], [ 75, 56 ], [ ...
[ "import collections\ns = list(input())\nans = \"Yes\"\nc = collections.Counter(s)\n\nif c[\"N\"] * c[\"S\"] == 0:\n if c[\"N\"] != c[\"S\"]:\n ans = \"No\"\nif c[\"W\"] * c[\"E\"] == 0:\n if c[\"W\"] != c[\"E\"]:\n ans = \"No\"\n\nprint(ans)", "import collections", "collections", "s = list...
import collections s = list(input()) ans = "Yes" c = collections.Counter(s) if c["N"] * c["S"] == 0: if c["N"] != c["S"]: ans = "No" if c["W"] * c["E"] == 0: if c["W"] != c["E"]: ans = "No" print(ans)
[ 7, 0, 13, 4, 13, 4, 13, 14, 2, 2, 2, 17, 13, 2, 17, 13, 2, 17, 13, 4, 13, 17, 4, 13, 17, 10, 4, 13 ]
[ [ 26, 2 ], [ 27, 12 ], [ 27, 15 ], [ 27, 18 ], [ 26, 27 ] ]
[ "s = set(input())\nif {\"N\",\"S\"} == s or {\"W\",\"E\"} == s or {\"N\",\"S\",\"W\",\"E\"} == s:\n print(\"Yes\")\nelse:\n print(\"No\")", "s = set(input())", "s", "set(input())", "set", "input()", "input", "if {\"N\",\"S\"} == s or {\"W\",\"E\"} == s or {\"N\",\"S\",\"W\",\"E\"} == s:\n pri...
s = set(input()) if {"N","S"} == s or {"W","E"} == s or {"N","S","W","E"} == s: print("Yes") else: print("No")
[ 7, 0, 13, 4, 18, 4, 13, 13, 0, 13, 17, 14, 2, 2, 2, 4, 18, 13, 13, 17, 4, 18, 13, 13, 17, 17, 40, 2, 4, 18, 13, 13, 17, 4, 18, 13, 13, 17, 17, 0, 13, 17, 14, 2, 2, 2, 4, 18, 13, 13, 17, 4, 18, 13, 13, 17, ...
[ [ 83, 2 ], [ 80, 9 ], [ 84, 17 ], [ 84, 22 ], [ 84, 30 ], [ 84, 35 ], [ 89, 40 ], [ 84, 48 ], [ 84, 53 ], [ 84, 61 ], [ 84, 66 ], [ 86, 71 ], [ 87, 76 ], [ ...
[ "S = input().strip()\nf = True\nif S.count(\"N\")*S.count(\"S\") == 0 and S.count(\"N\")+S.count(\"S\") != 0:\n f = False\nif S.count(\"E\")*S.count(\"W\") == 0 and S.count(\"E\")+S.count(\"W\") != 0:\n f = False\nprint(\"Yes\" if f else \"No\")", "S = input().strip()", "S", "input().strip()", "().str...
S = input().strip() f = True if S.count("N")*S.count("S") == 0 and S.count("N")+S.count("S") != 0: f = False if S.count("E")*S.count("W") == 0 and S.count("E")+S.count("W") != 0: f = False print("Yes" if f else "No")
[ 7, 0, 13, 4, 13, 0, 13, 21, 22, 17, 17, 22, 17, 17, 22, 17, 17, 22, 17, 17, 28, 13, 13, 14, 40, 18, 13, 13, 0, 18, 13, 13, 17, 14, 2, 2, 18, 13, 17, 18, 13, 17, 40, 2, 18, 13, 17, 18, 13, 17, 14, 2, 2, 18, 13...
[ [ 77, 2 ], [ 80, 6 ], [ 22, 21 ], [ 78, 21 ], [ 29, 25 ], [ 81, 26 ], [ 21, 27 ], [ 32, 29 ], [ 81, 30 ], [ 21, 31 ], [ 81, 37 ], [ 81, 40 ], [ 81, 45 ], [ ...
[ "S = input()\n\nmoved = {\"N\": False, \"W\": False, \"S\": False, \"E\": False}\nfor s in S:\n if not moved[s]:\n moved[s] = True\n\nif (moved[\"N\"] and moved[\"S\"]) or not (moved[\"N\"] or moved[\"S\"]):\n if (moved[\"W\"] and moved[\"E\"]) or not (moved[\"W\"] or moved[\"E\"]):\n print(\"Ye...
S = input() moved = {"N": False, "W": False, "S": False, "E": False} for s in S: if not moved[s]: moved[s] = True if (moved["N"] and moved["S"]) or not (moved["N"] or moved["S"]): if (moved["W"] and moved["E"]) or not (moved["W"] or moved["E"]): print("Yes") else: print("No") else:...
[ 7, 0, 13, 4, 13, 0, 13, 17, 0, 13, 17, 0, 13, 17, 0, 13, 17, 0, 13, 4, 13, 13, 28, 13, 4, 13, 13, 14, 2, 18, 13, 13, 17, 0, 13, 17, 14, 2, 18, 13, 13, 17, 0, 13, 17, 14, 2, 18, 13, 13, 17, 0, 13, 17, 14, 2,...
[ [ 118, 2 ], [ 139, 6 ], [ 121, 9 ], [ 127, 12 ], [ 142, 15 ], [ 130, 18 ], [ 119, 21 ], [ 24, 23 ], [ 131, 26 ], [ 119, 30 ], [ 23, 31 ], [ 133, 34 ], [ 119, 39 ]...
[ "S = input()\nn = 0\nw = 0\ns = 0\ne = 0\nx = len(S)\nfor i in range(x):\n if S[i] == 'N':\n n += 1\n elif S[i] == 'W':\n w += 1\n elif S[i] == 'S':\n s += 1\n elif S[i] == 'E':\n e += 1\n\nif n == 0 and s == 0:\n if e * w != 0:\n print('Yes')\n else:\n pr...
S = input() n = 0 w = 0 s = 0 e = 0 x = len(S) for i in range(x): if S[i] == 'N': n += 1 elif S[i] == 'W': w += 1 elif S[i] == 'S': s += 1 elif S[i] == 'E': e += 1 if n == 0 and s == 0: if e * w != 0: print('Yes') else: print('No') elif n != 0 an...
[ 7, 0, 13, 4, 13, 0, 13, 4, 13, 13, 0, 13, 39, 17, 17, 17, 17, 0, 13, 17, 14, 4, 13, 2, 18, 13, 13, 13, 0, 13, 17, 14, 2, 2, 2, 2, 18, 13, 17, 13, 40, 18, 13, 17, 13, 2, 18, 13, 17, 13, 40, 18, 13, 17, 13, 0...
[ [ 106, 2 ], [ 112, 6 ], [ 107, 9 ], [ 94, 11 ], [ 100, 18 ], [ 95, 25 ], [ 107, 27 ], [ 103, 29 ], [ 95, 37 ], [ 107, 39 ], [ 95, 42 ], [ 107, 44 ], [ 95, 47 ], ...
[ "s=input()\nss=set(s)\na=[\"N\",\"W\",\"S\",\"E\"]\nflg=False\nif all(a[i] in s for i in range(4)):\n flg=True\nif a[0] in s and a[1] not in s and a[2] in s and a[3] not in s:\n flg=True\nif a[0] not in s and a[1] in s and a[2] not in s and a[3] in s:\n flg=True\nif flg:\n print(\"Yes\")\nelse:\n pri...
s=input() ss=set(s) a=["N","W","S","E"] flg=False if all(a[i] in s for i in range(4)): flg=True if a[0] in s and a[1] not in s and a[2] in s and a[3] not in s: flg=True if a[0] not in s and a[1] in s and a[2] not in s and a[3] in s: flg=True if flg: print("Yes") else: print("No")
[ 7, 0, 13, 4, 18, 4, 13, 13, 0, 13, 21, 22, 17, 17, 22, 17, 17, 22, 17, 17, 22, 17, 17, 28, 13, 4, 13, 4, 13, 13, 0, 18, 13, 18, 13, 13, 17, 14, 2, 2, 18, 13, 17, 17, 2, 18, 13, 17, 17, 14, 2, 2, 2, 18, 13, ...
[ [ 128, 2 ], [ 125, 9 ], [ 25, 24 ], [ 129, 29 ], [ 36, 31 ], [ 126, 32 ], [ 129, 34 ], [ 24, 35 ], [ 126, 41 ], [ 126, 46 ], [ 126, 54 ], [ 126, 59 ], [ 126, 65 ]...
[ "S = input().strip()\nC = {\"N\":0,\"S\":0,\"E\":0,\"W\":0}\nfor i in range(len(S)):\n C[S[i]] += 1\nif C[\"N\"]>0 and C[\"S\"]>0:\n if (C[\"E\"]>0 and C[\"W\"]>0) or (C[\"E\"]==0 and C[\"W\"]==0):\n print(\"Yes\")\n else:\n print(\"No\")\nelif C[\"N\"]==0 and C[\"S\"]==0:\n if (C[\"E\"]>0...
S = input().strip() C = {"N":0,"S":0,"E":0,"W":0} for i in range(len(S)): C[S[i]] += 1 if C["N"]>0 and C["S"]>0: if (C["E"]>0 and C["W"]>0) or (C["E"]==0 and C["W"]==0): print("Yes") else: print("No") elif C["N"]==0 and C["S"]==0: if (C["E"]>0 and C["W"]>0) or (C["E"]==0 and C["W"]==0): ...
[ 7, 15, 13, 0, 13, 4, 13, 4, 13, 4, 13, 0, 13, 4, 18, 13, 13, 13, 14, 2, 2, 18, 13, 17, 17, 40, 18, 13, 17, 17, 4, 13, 17, 14, 2, 40, 18, 13, 17, 17, 2, 18, 13, 17, 17, 4, 13, 17, 14, 2, 2, 18, 13, 17, 17, 4...
[ [ 85, 4 ], [ 82, 12 ], [ 86, 17 ], [ 83, 22 ], [ 83, 27 ], [ 83, 37 ], [ 83, 42 ], [ 83, 52 ], [ 83, 57 ], [ 83, 67 ], [ 83, 72 ], [ 82, 83 ], [ 85, 86 ] ]
[ "import collections\nS=list(str(input()))\ncc=collections.Counter(S)\n\nif cc['S']==0 and cc['N']!=0:\n print('No')\nelif cc['S']!=0 and cc['N']==0:\n print('No')\nelif cc['E']==0 and cc['W']!=0:\n print('No')\nelif cc['E']!=0 and cc['W']==0:\n print('No')\nelse:\n print('Yes')", "import ...
import collections S=list(str(input())) cc=collections.Counter(S) if cc['S']==0 and cc['N']!=0: print('No') elif cc['S']!=0 and cc['N']==0: print('No') elif cc['E']==0 and cc['W']!=0: print('No') elif cc['E']!=0 and cc['W']==0: print('No') else: print('Yes')
[ 7, 12, 13, 0, 13, 4, 13, 0, 13, 4, 18, 13, 13, 17, 0, 13, 4, 18, 13, 13, 17, 0, 13, 4, 18, 13, 13, 17, 0, 13, 4, 18, 13, 13, 17, 14, 2, 2, 2, 13, 17, 2, 13, 17, 2, 2, 13, 17, 2, 13, 17, 14, 2, 2, 2, 13, 1...
[ [ 5, 4 ], [ 9, 8 ], [ 4, 11 ], [ 16, 15 ], [ 4, 18 ], [ 23, 22 ], [ 4, 25 ], [ 30, 29 ], [ 4, 32 ], [ 8, 39 ], [ 22, 42 ], [ 8, 46 ], [ 22, 49 ], [ 15, ...
[ "def main():\n s = input()\n\n n_cnt = s.count(\"N\")\n w_cnt = s.count(\"W\")\n s_cnt = s.count(\"S\")\n e_cnt = s.count(\"E\")\n\n if (n_cnt == 0 and s_cnt == 0) or (n_cnt > 0 and s_cnt > 0):\n if (w_cnt == 0 and e_cnt == 0) or (w_cnt > 0 and e_cnt > 0):\n print(\"Yes\")\n ...
def main(): s = input() n_cnt = s.count("N") w_cnt = s.count("W") s_cnt = s.count("S") e_cnt = s.count("E") if (n_cnt == 0 and s_cnt == 0) or (n_cnt > 0 and s_cnt > 0): if (w_cnt == 0 and e_cnt == 0) or (w_cnt > 0 and e_cnt > 0): print("Yes") exit() print("...
[ 7, 0, 13, 4, 13, 14, 2, 2, 2, 2, 2, 2, 17, 13, 2, 17, 13, 40, 2, 17, 13, 40, 2, 17, 13, 2, 2, 2, 2, 17, 13, 2, 17, 13, 40, 2, 17, 13, 40, 2, 17, 13, 2, 2, 2, 2, 17, 13, 2, 17, 13, 2, 17, 13, 2, 17, 13, ...
[ [ 64, 2 ], [ 65, 13 ], [ 65, 16 ], [ 65, 20 ], [ 65, 24 ], [ 65, 30 ], [ 65, 33 ], [ 65, 37 ], [ 65, 41 ], [ 65, 47 ], [ 65, 50 ], [ 65, 53 ], [ 65, 56 ], [ ...
[ "s = input()\n\nif (\n (('N' in s) and ('S' in s) and (not 'W' in s) and (not 'E' in s)) or\n (('W' in s) and ('E' in s) and (not 'N' in s) and (not 'S' in s)) or\n (('N' in s) and ('S' in s) and ('W' in s) and ('E' in s))\n):\n print('Yes')\nelse:\n print('No')", "s = input()", "s", "input()", "input"...
s = input() if ( (('N' in s) and ('S' in s) and (not 'W' in s) and (not 'E' in s)) or (('W' in s) and ('E' in s) and (not 'N' in s) and (not 'S' in s)) or (('N' in s) and ('S' in s) and ('W' in s) and ('E' in s)) ): print('Yes') else: print('No')
[ 7, 0, 13, 4, 13, 4, 13, 0, 13, 39, 17, 17, 13, 39, 17, 17, 0, 13, 17, 13, 17, 28, 13, 13, 14, 2, 13, 13, 0, 13, 17, 28, 13, 13, 14, 2, 13, 13, 0, 13, 17, 14, 2, 40, 13, 17, 40, 13, 17, 4, 13, 17, 14, 2, 40, ...
[ [ 81, 2 ], [ 84, 8 ], [ 78, 12 ], [ 90, 17 ], [ 87, 19 ], [ 23, 22 ], [ 85, 22 ], [ 22, 26 ], [ 82, 27 ], [ 93, 29 ], [ 33, 32 ], [ 79, 32 ], [ 32, 36 ], [ ...
[ "S = str(input())\nvertical,side = ['N', 'S'], ['W', 'E']\n\nans1,ans2 = 0,0\n\nfor l in vertical:\n if l in S:\n ans1 += 1\nfor l in side:\n if l in S:\n ans2 += 1\nif ans1 >= 2 and ans2 >= 2:\n print('Yes')\nelif ans1 >= 2 and ans2 == 0:\n print('Yes')\nelif ans1 == 0 and ans2 >= 2:\n print('Yes')\nels...
S = str(input()) vertical,side = ['N', 'S'], ['W', 'E'] ans1,ans2 = 0,0 for l in vertical: if l in S: ans1 += 1 for l in side: if l in S: ans2 += 1 if ans1 >= 2 and ans2 >= 2: print('Yes') elif ans1 >= 2 and ans2 == 0: print('Yes') elif ans1 == 0 and ans2 >= 2: print('Yes') else: print('No')
[ 7, 0, 13, 4, 13, 14, 2, 2, 17, 13, 40, 17, 13, 4, 13, 17, 14, 2, 2, 17, 13, 40, 17, 13, 4, 13, 17, 14, 2, 2, 17, 13, 40, 17, 13, 4, 13, 17, 14, 2, 2, 17, 13, 40, 17, 13, 4, 13, 17, 4, 13, 17, 10, 4, 13 ]
[ [ 53, 2 ], [ 54, 9 ], [ 54, 12 ], [ 54, 20 ], [ 54, 23 ], [ 54, 31 ], [ 54, 34 ], [ 54, 42 ], [ 54, 45 ], [ 53, 54 ] ]
[ "s = input()\nif 'N' in s and 'S' not in s:\n print('No')\nelif 'S' in s and 'N' not in s:\n print('No')\nelif 'W' in s and 'E' not in s:\n print('No')\nelif 'E' in s and 'W' not in s:\n print('No')\nelse:\n print('Yes')", "s = input()", "s", "input()", "input", "if 'N' in s and 'S' not in ...
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')
[ 7, 0, 13, 4, 13, 14, 2, 2, 2, 2, 4, 18, 13, 13, 17, 17, 2, 4, 18, 13, 13, 17, 17, 2, 4, 18, 13, 13, 17, 17, 2, 4, 18, 13, 13, 17, 17, 4, 13, 17, 14, 2, 2, 2, 2, 4, 18, 13, 13, 17, 17, 2, 4, 18, 13, 13, 17...
[ [ 114, 2 ], [ 115, 12 ], [ 115, 19 ], [ 115, 26 ], [ 115, 33 ], [ 115, 47 ], [ 115, 54 ], [ 115, 61 ], [ 115, 68 ], [ 115, 82 ], [ 115, 89 ], [ 115, 96 ], [ 115, 10...
[ "s=input()\nif s.count(\"N\")>0 and s.count(\"W\")>0 and s.count(\"S\")>0 and s.count(\"E\")>0:\n print(\"Yes\")\nelif s.count(\"N\")==0 and s.count(\"W\")>0 and s.count(\"S\")==0 and s.count(\"E\")>0:\n print(\"Yes\")\nelif s.count(\"N\")>0 and s.count(\"W\")==0 and s.count(\"S\")>0 and s.count(\"E\")==0:\n ...
s=input() if s.count("N")>0 and s.count("W")>0 and s.count("S")>0 and s.count("E")>0: print("Yes") elif s.count("N")==0 and s.count("W")>0 and s.count("S")==0 and s.count("E")>0: print("Yes") elif s.count("N")>0 and s.count("W")==0 and s.count("S")>0 and s.count("E")==0: print("Yes") else: print("No")
[ 7, 0, 13, 4, 13, 14, 2, 2, 2, 17, 13, 2, 17, 13, 2, 2, 17, 13, 2, 17, 13, 4, 13, 17, 4, 13, 17, 10, 4, 13 ]
[ [ 28, 2 ], [ 29, 10 ], [ 29, 13 ], [ 29, 17 ], [ 29, 20 ], [ 28, 29 ] ]
[ "S = input()\nif ('N' in S) == ('S' in S) and ('W' in S) == ('E' in S):\n print(\"Yes\")\nelse:\n print(\"No\")", "S = input()", "S", "input()", "input", "if ('N' in S) == ('S' in S) and ('W' in S) == ('E' in S):\n print(\"Yes\")\nelse:\n print(\"No\")", "('N' in S) == ('S' in S) and ('W' in...
S = input() if ('N' in S) == ('S' in S) and ('W' in S) == ('E' in S): print("Yes") else: print("No")
[ 7, 0, 13, 4, 13, 0, 13, 39, 28, 13, 13, 4, 18, 13, 13, 13, 14, 2, 2, 2, 2, 2, 17, 13, 40, 17, 13, 2, 2, 17, 13, 40, 17, 13, 2, 2, 17, 13, 40, 17, 13, 2, 2, 17, 13, 40, 17, 13, 4, 13, 17, 4, 13, 17, 10, 39, ...
[ [ 58, 2 ], [ 55, 6 ], [ 10, 9 ], [ 59, 9 ], [ 56, 13 ], [ 9, 15 ], [ 56, 23 ], [ 56, 26 ], [ 56, 30 ], [ 56, 33 ], [ 56, 37 ], [ 56, 40 ], [ 56, 44 ], [ 56,...
[ "S=input()\nA=[]\nfor letter in S:\n A.append(letter)\nif ('N' in A and 'S' not in A) or ('S' in A and 'N' not in A) or ('E' in A and 'W' not in A)or ('W' in A and 'E' not in A):\n print('No')\nelse:\n print('Yes')", "S=input()", "S", "input()", "input", "A=[]", "A", "[]", "for letter in S:...
S=input() A=[] for letter in S: A.append(letter) if ('N' in A and 'S' not in A) or ('S' in A and 'N' not in A) or ('E' in A and 'W' not in A)or ('W' in A and 'E' not in A): print('No') else: print('Yes')
[ 7, 0, 13, 4, 13, 0, 13, 4, 18, 13, 13, 17, 0, 13, 4, 18, 13, 13, 17, 0, 13, 4, 18, 13, 13, 17, 0, 13, 4, 18, 13, 13, 17, 14, 2, 2, 13, 17, 2, 13, 17, 14, 2, 2, 13, 17, 2, 13, 17, 4, 13, 17, 14, 2, 2, 13, ...
[ [ 106, 2 ], [ 109, 6 ], [ 107, 9 ], [ 112, 13 ], [ 107, 16 ], [ 103, 20 ], [ 107, 23 ], [ 115, 27 ], [ 107, 30 ], [ 110, 36 ], [ 104, 39 ], [ 116, 44 ], [ 113, 47 ...
[ "s=input()\nN=s.count(\"N\")\nW=s.count(\"W\")\nS=s.count(\"S\")\nE=s.count(\"E\")\nif N==0 and S==0:\n if E==0 and W==0:\n print(\"Yes\")\n elif E>0 and W>0:\n print(\"Yes\")\n else:\n print(\"No\")\nelif N>0 and S>0:\n if E==0 and W==0:\n print(\"Yes\")\n elif E>0 and W>...
s=input() N=s.count("N") W=s.count("W") S=s.count("S") E=s.count("E") if N==0 and S==0: if E==0 and W==0: print("Yes") elif E>0 and W>0: print("Yes") else: print("No") elif N>0 and S>0: if E==0 and W==0: print("Yes") elif E>0 and W>0: print("Yes") else: ...
[ 7, 0, 13, 4, 13, 4, 13, 4, 13, 8, 2, 2, 2, 13, 4, 13, 17, 2, 13, 4, 13, 17, 2, 13, 4, 13, 17, 17, 17, 10, 4, 13 ]
[ [ 30, 2 ], [ 31, 13 ], [ 31, 18 ], [ 31, 23 ], [ 30, 31 ] ]
[ "a = set(input())\nprint(\"Yes\" if a == set(\"NEWS\") or a == set(\"NS\") or a == set(\"EW\") else \"No\")", "a = set(input())", "a", "set(input())", "set", "input()", "input", "print(\"Yes\" if a == set(\"NEWS\") or a == set(\"NS\") or a == set(\"EW\") else \"No\")", "print", "\"Yes\" if a == se...
a = set(input()) print("Yes" if a == set("NEWS") or a == set("NS") or a == set("EW") else "No")
[ 7, 0, 13, 4, 13, 0, 13, 4, 18, 13, 13, 17, 0, 13, 4, 18, 13, 13, 17, 0, 13, 4, 18, 13, 13, 17, 0, 13, 4, 18, 13, 13, 17, 14, 2, 2, 2, 2, 2, 2, 13, 17, 2, 13, 17, 2, 13, 17, 2, 13, 17, 2, 2, 2, 2, 13, 17, ...
[ [ 97, 2 ], [ 94, 6 ], [ 98, 9 ], [ 100, 13 ], [ 98, 16 ], [ 88, 20 ], [ 98, 23 ], [ 91, 27 ], [ 98, 30 ], [ 95, 40 ], [ 101, 43 ], [ 89, 46 ], [ 92, 49 ], [ ...
[ "t = input()\nn = t.count('N')\ns = t.count('S')\nw = t.count('W')\ne = t.count('E')\n\nif (n>0 and s>0 and w>0 and e>0)or(n==0 and s==0 and w>0 and e>0) or (n>0 and s>0 and w==0 and e==0):\n print('Yes')\nelse:\n print('No')", "t = input()", "t", "input()", "input", "n = t.count('N')", "n", "t....
t = input() n = t.count('N') s = t.count('S') w = t.count('W') e = t.count('E') if (n>0 and s>0 and w>0 and e>0)or(n==0 and s==0 and w>0 and e>0) or (n>0 and s>0 and w==0 and e==0): print('Yes') else: print('No')
[ 7, 15, 13, 0, 13, 4, 13, 4, 13, 0, 13, 4, 13, 4, 13, 13, 4, 18, 13, 13, 0, 13, 17, 14, 2, 2, 4, 13, 13, 17, 17, 14, 2, 2, 4, 13, 13, 17, 17, 14, 2, 2, 18, 13, 17, 17, 2, 18, 13, 17, 17, 0, 13, 17, 14, 2, ...
[ [ 92, 4 ], [ 101, 10 ], [ 93, 15 ], [ 102, 18 ], [ 98, 21 ], [ 102, 28 ], [ 102, 36 ], [ 102, 43 ], [ 102, 48 ], [ 95, 52 ], [ 102, 58 ], [ 102, 63 ], [ 89, 67 ],...
[ "import collections\nS=str(input())\n\nList=list(set(S))\nList.sort()\n\nflag=0\nif len(List)%2==0:\n if len(List)//2==1:\n if List[0]==\"E\" and List[1]==\"W\":\n flag=1\n elif List[0]==\"N\" and List[1]==\"S\":\n flag=1\n elif len(List)//2==2:\n flag=1\n ...
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...
[ 7, 0, 13, 4, 13, 0, 13, 4, 13, 13, 0, 13, 8, 2, 17, 13, 4, 18, 13, 13, 17, 17, 0, 13, 8, 2, 17, 13, 4, 18, 13, 13, 17, 17, 0, 13, 8, 2, 17, 13, 4, 18, 13, 13, 17, 17, 0, 13, 8, 2, 17, 13, 4, 18, 13, 13, 1...
[ [ 98, 2 ], [ 101, 6 ], [ 99, 9 ], [ 95, 11 ], [ 102, 15 ], [ 99, 15 ], [ 102, 18 ], [ 99, 18 ], [ 89, 23 ], [ 102, 27 ], [ 99, 27 ], [ 102, 30 ], [ 99, 30 ], [ ...
[ "s = input()\n\ns = list(s)\nsowth = s.count('S') if 'S' in s else 0\neast = s.count('E') if 'E' in s else 0\nnorth = s.count('N') if 'N' in s else 0\nwest = s.count('W') if 'W' in s else 0\n\nif (sowth + north != 0 and sowth * north == 0) or\\\n (west + east != 0 and west * east == 0):\n print('No')\nelse:...
s = input() s = list(s) sowth = s.count('S') if 'S' in s else 0 east = s.count('E') if 'E' in s else 0 north = s.count('N') if 'N' in s else 0 west = s.count('W') if 'W' in s else 0 if (sowth + north != 0 and sowth * north == 0) or\ (west + east != 0 and west * east == 0): print('No') else: print('Yes')...
[ 7, 0, 13, 4, 13, 0, 13, 21, 22, 17, 17, 22, 17, 17, 22, 17, 17, 22, 17, 17, 28, 13, 13, 0, 18, 13, 13, 17, 14, 2, 2, 2, 40, 18, 13, 17, 17, 40, 18, 13, 17, 17, 2, 2, 18, 13, 17, 18, 13, 17, 17, 2, 2, 40, 18, ...
[ [ 79, 2 ], [ 82, 6 ], [ 22, 21 ], [ 80, 21 ], [ 27, 24 ], [ 83, 25 ], [ 21, 26 ], [ 83, 34 ], [ 83, 39 ], [ 83, 45 ], [ 83, 48 ], [ 83, 55 ], [ 83, 60 ], [ ...
[ "s = input()\ncount = {\"N\":0, \"W\":0, \"S\":0, \"E\":0}\nfor i in s:\n count[i] += 1\n\nif ((count[\"N\"] != 0 and count[\"S\"] != 0) or (count[\"N\"] == count[\"S\"] == 0))and ((count[\"W\"] != 0 and count[\"E\"] != 0) or (count[\"W\"] == count[\"E\"] == 0)):\n print(\"Yes\")\n\nelse:\n print(\"No\")",...
s = input() count = {"N":0, "W":0, "S":0, "E":0} for i in s: count[i] += 1 if ((count["N"] != 0 and count["S"] != 0) or (count["N"] == count["S"] == 0))and ((count["W"] != 0 and count["E"] != 0) or (count["W"] == count["E"] == 0)): print("Yes") else: print("No")
[ 7, 0, 13, 4, 13, 0, 13, 4, 18, 13, 13, 17, 0, 13, 4, 18, 13, 13, 17, 0, 13, 4, 18, 13, 13, 17, 0, 13, 4, 18, 13, 13, 17, 0, 13, 17, 14, 2, 40, 13, 17, 40, 13, 17, 14, 2, 2, 40, 13, 17, 40, 13, 17, 2, 2, 13,...
[ [ 116, 2 ], [ 119, 6 ], [ 117, 9 ], [ 104, 13 ], [ 117, 16 ], [ 113, 20 ], [ 117, 23 ], [ 122, 27 ], [ 117, 30 ], [ 110, 34 ], [ 120, 39 ], [ 114, 42 ], [ 105, 48 ...
[ "s=input()\na=s.count(\"N\")\nb=s.count(\"W\")\nc=s.count(\"S\")\nd=s.count(\"E\")\nans=False\nif a!=0 and c!=0:\n if (b!=0 and d!=0) or (b==0 and d==0):\n ans=True\nif a==0 and c==0:\n if (b!=0 and d!=0) or (b==0 and d==0):\n ans=True\nif ans==True:\n print(\"Yes\")\nelse:\n print(\"No\")...
s=input() a=s.count("N") b=s.count("W") c=s.count("S") d=s.count("E") ans=False if a!=0 and c!=0: if (b!=0 and d!=0) or (b==0 and d==0): ans=True if a==0 and c==0: if (b!=0 and d!=0) or (b==0 and d==0): ans=True if ans==True: print("Yes") else: print("No")
[ 7, 0, 13, 4, 13, 0, 13, 4, 13, 28, 13, 13, 4, 18, 13, 13, 13, 14, 2, 4, 13, 13, 17, 4, 13, 17, 14, 2, 4, 13, 13, 17, 14, 2, 2, 17, 13, 2, 17, 13, 4, 13, 17, 14, 2, 2, 17, 13, 2, 17, 13, 4, 13, 17, 4, 13, ...
[ [ 61, 2 ], [ 64, 6 ], [ 11, 10 ], [ 62, 10 ], [ 65, 14 ], [ 10, 16 ], [ 65, 21 ], [ 65, 30 ], [ 65, 36 ], [ 65, 39 ], [ 65, 47 ], [ 65, 50 ], [ 61, 62 ], [ ...
[ "S = input()\nset_ = set()\n\nfor i in S:\n set_.add(i)\n\nif len(set_) == 4:\n print(\"Yes\")\nelif len(set_) == 2:\n if 'N' in set_ and 'S' in set_:\n print(\"Yes\")\n elif 'E' in set_ and 'W' in set_:\n print(\"Yes\")\n else:\n print(\"No\")\nelse:\n print(\"No\")", "S = ...
S = input() set_ = set() for i in S: set_.add(i) if len(set_) == 4: print("Yes") elif len(set_) == 2: if 'N' in set_ and 'S' in set_: print("Yes") elif 'E' in set_ and 'W' in set_: print("Yes") else: print("No") else: print("No")
[ 7, 12, 13, 0, 13, 4, 13, 0, 13, 4, 18, 13, 13, 17, 0, 13, 4, 18, 13, 13, 17, 0, 13, 4, 18, 13, 13, 17, 0, 13, 4, 18, 13, 13, 17, 14, 2, 2, 2, 2, 13, 40, 13, 2, 40, 13, 13, 2, 13, 40, 13, 2, 40, 13, 13, 4, ...
[ [ 5, 4 ], [ 9, 8 ], [ 4, 11 ], [ 16, 15 ], [ 4, 18 ], [ 23, 22 ], [ 4, 25 ], [ 30, 29 ], [ 4, 32 ], [ 8, 40 ], [ 29, 42 ], [ 8, 45 ], [ 29, 46 ], [ 15, ...
[ "def solve():\n S = input()\n n = S.count('N')\n e = S.count('E')\n w = S.count('W')\n s = S.count('S')\n if (n and not s) or (not n and s) or (e and not w) or (not e and w):\n print('No')\n else:\n print('Yes')\n\nif __name__ == \"__main__\":\n solve()", "def solve():\n S...
def solve(): S = input() n = S.count('N') e = S.count('E') w = S.count('W') s = S.count('S') if (n and not s) or (not n and s) or (e and not w) or (not e and w): print('No') else: print('Yes') if __name__ == "__main__": solve()
[ 7, 0, 13, 4, 13, 0, 13, 17, 14, 2, 40, 4, 18, 13, 13, 17, 17, 2, 4, 18, 13, 13, 17, 17, 0, 13, 17, 14, 2, 40, 4, 18, 13, 13, 17, 17, 2, 4, 18, 13, 13, 17, 17, 0, 13, 17, 14, 2, 40, 4, 18, 13, 13, 17, 17, 2,...
[ [ 91, 2 ], [ 103, 6 ], [ 92, 13 ], [ 92, 20 ], [ 94, 25 ], [ 92, 32 ], [ 92, 39 ], [ 97, 44 ], [ 92, 51 ], [ 92, 58 ], [ 100, 63 ], [ 92, 70 ], [ 92, 77 ], [ ...
[ "S=input()\nans='Yes'\nif S.count('N')>=1 and S.count('S')==0:\n ans='No'\nelif S.count('S')>=1 and S.count('N')==0:\n ans='No'\nelif S.count('E')>=1 and S.count('W')==0:\n ans='No'\nelif S.count('W')>=1 and S.count('E')==0:\n ans='No'\nprint(ans)", "S=input()", "S", "input()", "input", "ans='...
S=input() ans='Yes' if S.count('N')>=1 and S.count('S')==0: ans='No' elif S.count('S')>=1 and S.count('N')==0: ans='No' elif S.count('E')>=1 and S.count('W')==0: ans='No' elif S.count('W')>=1 and S.count('E')==0: ans='No' print(ans)
[ 7, 12, 13, 0, 13, 4, 13, 41, 28, 13, 13, 2, 13, 17, 4, 17, 0, 13, 4, 13, 13, 41, 28, 13, 13, 2, 13, 17, 4, 17, 0, 13, 4, 13, 13, 41, 28, 13, 13, 2, 13, 17, 4, 17, 0, 13, 4, 13, 13, 41, 28, 13, 13, 2, 13, 17...
[ [ 5, 4 ], [ 10, 9 ], [ 4, 9 ], [ 9, 12 ], [ 18, 17 ], [ 24, 23 ], [ 4, 23 ], [ 23, 26 ], [ 32, 31 ], [ 38, 37 ], [ 4, 37 ], [ 37, 40 ], [ 46, 45 ], [ 52, ...
[ "#!/usr/bin/env python3\n\ndef main():\n S = input()\n\n s = len([1 for _ in S if _ == 'S'])\n n = len([1 for _ in S if _ == 'N'])\n e = len([1 for _ in S if _ == 'E'])\n w = len([1 for _ in S if _ == 'W'])\n\n if (s > 0 and n > 0) or (s == n == 0):\n flag1 = True\n else:\n flag1 ...
#!/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 ...
[ 7, 15, 13, 12, 13, 29, 4, 13, 4, 13, 12, 13, 29, 4, 13, 4, 13, 13, 4, 18, 4, 13, 13, 12, 13, 0, 13, 4, 13, 29, 4, 13, 18, 13, 39, 4, 13, 13, 12, 13, 29, 4, 13, 13, 4, 18, 4, 13, 13, 0, 13, 4, 13, 0, 13, 17,...
[ [ 27, 26 ], [ 26, 33 ], [ 26, 37 ], [ 170, 50 ], [ 180, 52 ], [ 161, 54 ], [ 155, 57 ], [ 152, 59 ], [ 158, 61 ], [ 149, 63 ], [ 67, 66 ], [ 171, 66 ], [ 66, 70 ]...
[ "# For taking integer inputs.\nimport math\n\n\ndef inp():\n return(int(input()))\n\n\n# For taking List inputs.\ndef inlist():\n return(list(map(int, input().split())))\n\n\n# For taking string inputs. Actually it returns a List of Characters, instead of a string, which is easier to use in Python, because in...
# For taking integer inputs. import math def inp(): return(int(input())) # For taking List inputs. def inlist(): return(list(map(int, input().split()))) # For taking string inputs. Actually it returns a List of Characters, instead of a string, which is easier to use in Python, because in Python, Strings a...
[ 7, 0, 13, 4, 13, 0, 13, 4, 18, 13, 13, 17, 0, 13, 4, 18, 13, 13, 17, 0, 13, 4, 18, 13, 13, 17, 0, 13, 4, 18, 13, 13, 17, 0, 13, 17, 14, 2, 2, 2, 13, 17, 2, 13, 17, 2, 2, 13, 17, 2, 13, 17, 14, 2, 2, 2, 13...
[ [ 97, 2 ], [ 94, 6 ], [ 98, 9 ], [ 85, 13 ], [ 98, 16 ], [ 82, 20 ], [ 98, 23 ], [ 88, 27 ], [ 98, 30 ], [ 100, 34 ], [ 83, 40 ], [ 95, 43 ], [ 83, 47 ], [ ...
[ "s = input()\nN = s.count(\"N\")\nW = s.count(\"W\")\nS = s.count(\"S\")\nE = s.count(\"E\")\nflag = -1\nif (S > 0 and N > 0) or (S == 0 and N == 0) :\n if (E > 0 and W > 0) or (E == 0 and W == 0) :\n flag = 1\nif flag == 1 :\n print(\"Yes\")\nelse :\n print(\"No\")", "s = input()", "s", "inpu...
s = input() N = s.count("N") W = s.count("W") S = s.count("S") E = s.count("E") flag = -1 if (S > 0 and N > 0) or (S == 0 and N == 0) : if (E > 0 and W > 0) or (E == 0 and W == 0) : flag = 1 if flag == 1 : print("Yes") else : print("No")
[ 7, 15, 13, 0, 13, 18, 18, 13, 13, 13, 12, 13, 29, 4, 13, 4, 13, 13, 4, 18, 4, 13, 13, 23, 13, 13, 23, 13, 13, 12, 13, 42, 13, 29, 13, 23, 13, 23, 13, 12, 13, 29, 2, 2, 13, 13, 4, 13, 13, 13, 23, 13, 23, 13, 1...
[ [ 140, 4 ], [ 27, 14 ], [ 24, 17 ], [ 141, 21 ], [ 25, 24 ], [ 28, 27 ], [ 36, 34 ], [ 36, 36 ], [ 38, 38 ], [ 51, 44 ], [ 53, 45 ], [ 147, 47 ], [ 51, 48 ], [ ...
[ "import sys\ninput = sys.stdin.readline\n\ndef linput(ty=int, cvt=list):\n\treturn cvt(map(ty,input().split()))\n\ndef gcd(a: int, b: int):\n\twhile b: a, b = b, a%b\n\treturn a\n\ndef lcm(a: int, b: int):\n\treturn a * b // gcd(a, b)\n\ndef dist(x1,y1,x2,y2):\n\treturn abs(x1-x2)+abs(y1-y2)\n\ndef main():\n\tS = i...
import sys input = sys.stdin.readline def linput(ty=int, cvt=list): return cvt(map(ty,input().split())) def gcd(a: int, b: int): while b: a, b = b, a%b return a def lcm(a: int, b: int): return a * b // gcd(a, b) def dist(x1,y1,x2,y2): return abs(x1-x2)+abs(y1-y2) def main(): S = input().rstrip() res = 1 n...
[ 7, 0, 13, 4, 13, 0, 13, 2, 17, 13, 13, 2, 17, 13, 13, 2, 17, 13, 13, 2, 17, 13, 4, 13, 8, 2, 2, 13, 13, 2, 13, 13, 17, 17, 10, 2, 13, 10, 2, 13, 10, 2, 13, 10, 2, 13, 10, 4, 13 ]
[ [ 47, 2 ], [ 41, 6 ], [ 48, 9 ], [ 44, 10 ], [ 48, 13 ], [ 38, 14 ], [ 48, 17 ], [ 35, 18 ], [ 48, 21 ], [ 42, 27 ], [ 36, 28 ], [ 39, 30 ], [ 45, 31 ], [ 3...
[ "S = input()\nn,w,e,s = 'N' in S, 'W' in S, 'E' in S, 'S' in S\nprint('Yes' if n == s and e == w else 'No')", "S = input()", "S", "input()", "input", "n,w,e,s = 'N' in S, 'W' in S, 'E' in S, 'S' in S", "n", "'N' in S", "'N'", "S", "w", "'W' in S", "'W'", "S", "e", "'E' in S", "'E'", ...
S = input() n,w,e,s = 'N' in S, 'W' in S, 'E' in S, 'S' in S print('Yes' if n == s and e == w else 'No')
[ 7, 0, 13, 4, 13, 4, 13, 4, 13, 0, 13, 39, 39, 17, 17, 39, 17, 17, 39, 17, 17, 17, 17, 14, 2, 40, 4, 13, 13, 17, 40, 4, 13, 13, 17, 4, 13, 17, 4, 13, 28, 13, 13, 0, 13, 17, 28, 13, 13, 14, 2, 13, 13, 0, 13, ...
[ [ 71, 2 ], [ 77, 10 ], [ 72, 28 ], [ 72, 33 ], [ 42, 41 ], [ 78, 41 ], [ 80, 44 ], [ 48, 47 ], [ 72, 47 ], [ 47, 51 ], [ 41, 52 ], [ 74, 54 ], [ 75, 58 ], [ ...
[ "s = list(set(input()))\nl = [[\"N\",\"S\"], [\"W\",\"E\"], [\"N\", \"S\", \"W\", \"E\"]]\nif len(s) != 2 and len(s) != 4:\n print(\"No\")\n exit()\nfor i in l:\n x = 0\n for j in s:\n if j in i:\n x += 1\n if x == len(i):\n print(\"Yes\")\n exit()\nprint(\"No\")", "...
s = list(set(input())) l = [["N","S"], ["W","E"], ["N", "S", "W", "E"]] if len(s) != 2 and len(s) != 4: print("No") exit() for i in l: x = 0 for j in s: if j in i: x += 1 if x == len(i): print("Yes") exit() print("No")
[ 7, 0, 13, 4, 13, 12, 13, 29, 2, 2, 2, 13, 13, 40, 13, 13, 2, 2, 13, 13, 40, 13, 13, 23, 13, 23, 13, 14, 2, 4, 13, 17, 17, 4, 13, 17, 17, 4, 13, 17, 4, 13, 17, 10, 4, 13, 10, 12, 13 ]
[ [ 44, 2 ], [ 24, 11 ], [ 45, 12 ], [ 26, 14 ], [ 45, 15 ], [ 26, 18 ], [ 45, 19 ], [ 24, 21 ], [ 45, 22 ], [ 24, 24 ], [ 26, 26 ], [ 48, 30 ], [ 48, 34 ], [ ...
[ "s = input()\n\ndef f(a,b):\n return (a in s and b not in s) or (b in s and a not in s)\n \nif f('W', 'E') or f('N', 'S'):\n print('No')\nelse:\n print('Yes')\n", "s = input()", "s", "input()", "input", "def f(a,b):\n return (a in s and b not in s) or (b in s and a not in s)\n ", "f", "return (a...
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')
[ 7, 0, 13, 4, 13, 0, 13, 17, 14, 2, 2, 2, 17, 13, 40, 2, 17, 13, 2, 2, 17, 13, 40, 2, 17, 13, 0, 13, 17, 14, 2, 2, 2, 17, 13, 40, 2, 17, 13, 2, 2, 17, 13, 40, 2, 17, 13, 0, 13, 17, 14, 13, 4, 13, 17, 4, 13...
[ [ 62, 2 ], [ 65, 6 ], [ 63, 13 ], [ 63, 17 ], [ 63, 21 ], [ 63, 25 ], [ 68, 27 ], [ 63, 34 ], [ 63, 38 ], [ 63, 42 ], [ 63, 46 ], [ 59, 48 ], [ 59, 60 ], [ ...
[ "s = input()\nans = True\n\nif 'N' in s and not('S' in s) or 'S' in s and not('N' in s):\n ans = False\nif 'E' in s and not('W' in s) or 'W' in s and not('E' in s):\n ans = False\nif ans:\n print(\"Yes\")\nelse:\n print(\"No\")", "s = input()", "s", "input()", "input", "ans = True", "ans", ...
s = input() ans = True if 'N' in s and not('S' in s) or 'S' in s and not('N' in s): ans = False if 'E' in s and not('W' in s) or 'W' in s and not('E' in s): ans = False if ans: print("Yes") else: print("No")
[ 7, 15, 13, 0, 13, 18, 18, 13, 13, 13, 15, 12, 13, 0, 13, 4, 18, 4, 13, 13, 29, 13, 12, 13, 0, 13, 4, 13, 13, 14, 2, 2, 40, 18, 13, 17, 17, 2, 18, 13, 17, 17, 2, 2, 18, 13, 17, 17, 40, 18, 13, 17, 17, 29, 17, ...
[ [ 103, 4 ], [ 15, 14 ], [ 104, 18 ], [ 14, 21 ], [ 26, 25 ], [ 84, 28 ], [ 25, 34 ], [ 25, 39 ], [ 25, 45 ], [ 25, 50 ], [ 25, 60 ], [ 25, 65 ], [ 25, 71 ], [ ...
[ "import sys\ninput = sys.stdin.readline\nfrom collections import Counter\n\n\ndef read():\n S = input().strip()\n return S,\n\n\ndef solve(S):\n D = Counter(S)\n if D[\"N\"] != 0 and D[\"S\"] == 0 or D[\"N\"] == 0 and D[\"S\"] != 0:\n return \"No\"\n if D[\"E\"] != 0 and D[\"W\"] == 0 or D[\"E...
import sys input = sys.stdin.readline from collections import Counter def read(): S = input().strip() return S, def solve(S): D = Counter(S) if D["N"] != 0 and D["S"] == 0 or D["N"] == 0 and D["S"] != 0: return "No" if D["E"] != 0 and D["W"] == 0 or D["E"] == 0 and D["W"] != 0: r...
[ 7, 0, 13, 4, 13, 14, 2, 17, 13, 14, 2, 17, 13, 4, 13, 17, 4, 13, 14, 2, 17, 13, 14, 2, 17, 13, 4, 13, 17, 4, 13, 14, 2, 17, 13, 14, 2, 17, 13, 4, 13, 17, 4, 13, 14, 2, 17, 13, 14, 2, 17, 13, 4, 13, 17, 4, ...
[ [ 61, 2 ], [ 62, 8 ], [ 62, 12 ], [ 62, 21 ], [ 62, 25 ], [ 62, 34 ], [ 62, 38 ], [ 62, 47 ], [ 62, 51 ], [ 61, 62 ] ]
[ "s=input()\nif \"N\" in s:\n if \"S\" in s:\n pass\n else:\n print(\"No\")\n exit()\nif \"E\" in s:\n if \"W\" in s:\n pass\n else:\n print(\"No\")\n exit()\nif \"S\" in s:\n if \"N\" in s:\n pass\n else:\n print(\"No\")\n exit()\nif \...
s=input() if "N" in s: if "S" in s: pass else: print("No") exit() if "E" in s: if "W" in s: pass else: print("No") exit() if "S" in s: if "N" in s: pass else: print("No") exit() if "W" in s: if "E" in s: pass ...
[ 7, 0, 13, 4, 13, 14, 2, 17, 13, 14, 40, 17, 13, 4, 13, 17, 4, 13, 14, 40, 17, 13, 14, 2, 17, 13, 4, 13, 17, 4, 13, 14, 40, 17, 13, 14, 2, 17, 13, 4, 13, 17, 4, 13, 14, 2, 17, 13, 14, 40, 17, 13, 4, 13, 17, ...
[ [ 61, 2 ], [ 62, 8 ], [ 62, 12 ], [ 62, 21 ], [ 62, 25 ], [ 62, 34 ], [ 62, 38 ], [ 62, 47 ], [ 62, 51 ], [ 61, 62 ] ]
[ "s = input()\nif 'E' in s:\n if 'W' not in s:\n print('No')\n exit()\nif 'E' not in s:\n if 'W' in s:\n print('No')\n exit()\nif 'N' not in s:\n if 'S' in s:\n print('No')\n exit()\nif 'N' in s:\n if 'S' not in s:\n print('No')\n exit()\nprint('Yes...
s = input() if 'E' in s: if 'W' not in s: print('No') exit() if 'E' not in s: if 'W' in s: print('No') exit() if 'N' not in s: if 'S' in s: print('No') exit() if 'N' in s: if 'S' not in s: print('No') exit() print('Yes')
[ 7, 0, 13, 4, 13, 0, 13, 4, 18, 13, 13, 17, 13, 4, 18, 13, 13, 17, 13, 4, 18, 13, 13, 17, 13, 4, 18, 13, 13, 17, 14, 2, 2, 2, 13, 17, 2, 13, 17, 2, 2, 13, 17, 2, 13, 17, 4, 13, 17, 14, 2, 2, 2, 13, 17, 2, ...
[ [ 78, 2 ], [ 75, 6 ], [ 79, 9 ], [ 81, 12 ], [ 76, 15 ], [ 79, 15 ], [ 72, 18 ], [ 76, 21 ], [ 79, 21 ], [ 84, 24 ], [ 76, 27 ], [ 79, 27 ], [ 76, 34 ], [ 7...
[ "s = input()\ns,n,e,w = s.count(\"S\"),s.count(\"N\"),s.count(\"E\"),s.count(\"W\")\nif (s > 0 and n == 0) or (s == 0 and n > 0):\n print(\"No\")\nelif (e > 0 and w == 0) or (e == 0 and w > 0):\n print(\"No\")\nelse:\n print(\"Yes\")", "s = input()", "s", "input()", "input", "s,n,e,w = s.count(\"...
s = input() s,n,e,w = s.count("S"),s.count("N"),s.count("E"),s.count("W") if (s > 0 and n == 0) or (s == 0 and n > 0): print("No") elif (e > 0 and w == 0) or (e == 0 and w > 0): print("No") else: print("Yes")
[ 7, 0, 13, 4, 13, 4, 13, 4, 13, 4, 13, 14, 2, 2, 4, 13, 13, 17, 17, 14, 2, 2, 2, 17, 13, 2, 17, 13, 2, 2, 17, 13, 2, 17, 13, 4, 13, 17, 4, 13, 17, 4, 13, 17, 10, 4, 13 ]
[ [ 45, 2 ], [ 46, 16 ], [ 46, 24 ], [ 46, 27 ], [ 46, 31 ], [ 46, 34 ], [ 45, 46 ] ]
[ "s = list(set(list(input())))\n\nif len(s)%2 == 0:\n if (\"N\" in s and\"S\" in s) or (\"E\" in s and \"W\" in s):\n print('Yes')\n else:\n print('No')\nelse:\n print('No')", "s = list(set(list(input())))", "s", "list(set(list(input())))", "list", "set(list(input()))", "set", "l...
s = list(set(list(input()))) if len(s)%2 == 0: if ("N" in s and"S" in s) or ("E" in s and "W" in s): print('Yes') else: print('No') else: print('No')
[ 7, 0, 13, 4, 13, 4, 13, 0, 13, 17, 0, 13, 17, 0, 13, 17, 14, 2, 2, 2, 13, 13, 2, 13, 13, 2, 13, 13, 4, 13, 17, 4, 13, 17, 10, 17, 13, 10, 17, 13, 10, 4, 13, 10, 17, 13 ]
[ [ 41, 2 ], [ 44, 8 ], [ 38, 11 ], [ 35, 14 ], [ 42, 20 ], [ 45, 21 ], [ 42, 23 ], [ 39, 24 ], [ 42, 26 ], [ 36, 27 ], [ 35, 36 ], [ 38, 39 ], [ 41, 42 ], [ ...
[ "# coding: utf-8\nS = set(input())\ni = {'N', 'S'}\nj = {'W', 'E'}\nk = {'N', 'S', 'W', 'E'}\nif S == i or S == j or S == k:\n print('Yes')\nelse:\n print('No')", "S = set(input())", "S", "set(input())", "set", "input()", "input", "i = {'N', 'S'}", "i", "{'N', 'S'}", "j = {'W', 'E'}", "j...
# coding: utf-8 S = set(input()) i = {'N', 'S'} j = {'W', 'E'} k = {'N', 'S', 'W', 'E'} if S == i or S == j or S == k: print('Yes') else: print('No')
[ 7, 0, 13, 4, 13, 4, 13, 0, 13, 2, 17, 13, 13, 2, 17, 13, 13, 2, 17, 13, 13, 2, 17, 13, 4, 13, 8, 2, 2, 13, 13, 2, 13, 13, 17, 17, 10, 2, 13, 10, 4, 13, 10, 2, 13, 10, 2, 13, 10, 2, 13 ]
[ [ 40, 2 ], [ 46, 8 ], [ 41, 11 ], [ 37, 12 ], [ 41, 15 ], [ 43, 16 ], [ 41, 19 ], [ 49, 20 ], [ 41, 23 ], [ 47, 29 ], [ 50, 30 ], [ 44, 32 ], [ 38, 33 ], [ ...
[ "# https://atcoder.jp/contests/agc003/tasks/agc003_a\nS = str(input())\nn,w,e,s = 'N' in S, 'W' in S, 'E' in S, 'S' in S\nprint('Yes' if n == s and e == w else 'No')", "S = str(input())", "S", "str(input())", "str", "input()", "input", "n,w,e,s = 'N' in S, 'W' in S, 'E' in S, 'S' in S", "n", "'N' ...
# https://atcoder.jp/contests/agc003/tasks/agc003_a S = str(input()) n,w,e,s = 'N' in S, 'W' in S, 'E' in S, 'S' in S print('Yes' if n == s and e == w else 'No')
[ 7, 0, 13, 4, 13, 0, 13, 2, 2, 2, 17, 13, 2, 17, 13, 2, 40, 17, 13, 40, 17, 13, 0, 13, 2, 2, 2, 17, 13, 2, 17, 13, 2, 40, 17, 13, 40, 17, 13, 8, 2, 13, 13, 4, 13, 17, 4, 13, 17, 10, 4, 13, 10, 2, 13, 10, 2...
[ [ 50, 2 ], [ 53, 6 ], [ 51, 11 ], [ 51, 14 ], [ 51, 18 ], [ 51, 21 ], [ 56, 23 ], [ 51, 28 ], [ 51, 31 ], [ 51, 35 ], [ 51, 38 ], [ 54, 41 ], [ 57, 42 ], [ ...
[ "S = input()\n\nNS = ((\"S\" in S) & (\"N\" in S)) | ((\"S\" not in S) & (\"N\" not in S))\nEW = ((\"E\" in S) & (\"W\" in S)) | ((\"E\" not in S) & (\"W\" not in S))\n\nprint(\"Yes\") if NS & EW else print(\"No\")", "S = input()", "S", "input()", "input", "NS = ((\"S\" in S) & (\"N\" in S)) | ((\"S\" not...
S = input() NS = (("S" in S) & ("N" in S)) | (("S" not in S) & ("N" not in S)) EW = (("E" in S) & ("W" in S)) | (("E" not in S) & ("W" not in S)) print("Yes") if NS & EW else print("No")
[ 7, 15, 0, 13, 4, 13, 0, 13, 4, 13, 13, 14, 40, 2, 4, 13, 13, 17, 17, 4, 13, 17, 4, 13, 14, 2, 4, 13, 13, 17, 4, 13, 17, 14, 2, 2, 17, 13, 2, 17, 13, 4, 13, 17, 14, 2, 2, 17, 13, 2, 17, 13, 4, 13, 17, 4, 1...
[ [ 62, 3 ], [ 59, 7 ], [ 63, 10 ], [ 60, 16 ], [ 63, 28 ], [ 63, 37 ], [ 63, 40 ], [ 63, 48 ], [ 63, 51 ], [ 59, 60 ], [ 62, 63 ] ]
[ "from collections import Counter\ns = input()\nC = Counter(s)\nif len(C) % 2 != 0:\n print('No')\n exit()\nelse:\n if len(s) == 4:\n print('Yes')\n else:\n if 'N' in s and 'S' in s:\n print('Yes')\n elif 'E' in s and 'W' in s:\n print('Yes')\n else:\n ...
from collections import Counter s = input() C = Counter(s) if len(C) % 2 != 0: print('No') exit() else: if len(s) == 4: print('Yes') else: if 'N' in s and 'S' in s: print('Yes') elif 'E' in s and 'W' in s: print('Yes') else: print('No')
[ 7, 0, 13, 4, 13, 4, 13, 4, 13, 14, 4, 13, 2, 13, 4, 13, 4, 13, 13, 4, 13, 17, 4, 13, 17, 10, 4, 13 ]
[ [ 26, 2 ], [ 27, 13 ], [ 26, 27 ] ]
[ "s = set(list(input()))\nif any(s==set(list(cand)) for cand in ['NS','EW','NEWS']):\n print('Yes')\nelse:\n print('No')", "s = set(list(input()))", "s", "set(list(input()))", "set", "list(input())", "list", "input()", "input", "if any(s==set(list(cand)) for cand in ['NS','EW','NEWS']):\n ...
s = set(list(input())) if any(s==set(list(cand)) for cand in ['NS','EW','NEWS']): print('Yes') else: print('No')
[ 7, 0, 13, 4, 13, 4, 13, 4, 13, 14, 2, 2, 2, 17, 13, 2, 17, 13, 2, 2, 17, 13, 2, 17, 13, 4, 13, 17, 4, 13, 17, 10, 4, 13 ]
[ [ 32, 2 ], [ 33, 14 ], [ 33, 17 ], [ 33, 21 ], [ 33, 24 ], [ 32, 33 ] ]
[ "# -*- coding: utf-8 -*-\n\ns=set(list(input()))\n\nif ('N' in s)==('S' in s) and ('W' in s)==('E' in s):\n print(\"Yes\")\nelse:\n print(\"No\")", "s=set(list(input()))", "s", "set(list(input()))", "set", "list(input())", "list", "input()", "input", "if ('N' in s)==('S' in s) and ('W' in s)...
# -*- 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")
[ 7, 15, 0, 13, 4, 13, 4, 13, 0, 13, 4, 13, 13, 0, 13, 17, 14, 2, 4, 13, 13, 17, 0, 13, 17, 14, 2, 4, 13, 13, 17, 14, 2, 2, 17, 13, 2, 17, 13, 0, 13, 17, 14, 2, 2, 17, 13, 2, 17, 13, 0, 13, 17, 4, 13, 13, 1...
[ [ 60, 3 ], [ 66, 9 ], [ 61, 12 ], [ 57, 14 ], [ 67, 20 ], [ 61, 20 ], [ 63, 23 ], [ 67, 29 ], [ 61, 29 ], [ 67, 35 ], [ 61, 35 ], [ 67, 38 ], [ 61, 38 ], [ ...
[ "from collections import Counter\nS = list(input())\nS = Counter(S)\nans = \"No\"\nif len(S) == 4:\n ans = \"Yes\"\nelif len(S) == 2:\n if \"N\" in S and \"S\" in S:\n ans = \"Yes\"\n if \"W\" in S and \"E\" in S:\n ans = \"Yes\"\nprint(ans)\n", "from collections import Counter", "S = lis...
from collections import Counter S = list(input()) S = Counter(S) ans = "No" if len(S) == 4: ans = "Yes" elif len(S) == 2: if "N" in S and "S" in S: ans = "Yes" if "W" in S and "E" in S: ans = "Yes" print(ans)
[ 7, 0, 13, 4, 13, 4, 13, 0, 13, 17, 0, 13, 17, 0, 13, 17, 0, 13, 17, 28, 13, 13, 14, 2, 13, 17, 0, 13, 17, 14, 2, 13, 17, 0, 13, 17, 14, 2, 13, 17, 0, 13, 17, 14, 2, 13, 17, 0, 13, 17, 14, 2, 2, 2, 2, 2, 1...
[ [ 98, 2 ], [ 110, 8 ], [ 104, 11 ], [ 89, 14 ], [ 92, 17 ], [ 21, 20 ], [ 99, 20 ], [ 20, 24 ], [ 113, 27 ], [ 20, 31 ], [ 95, 34 ], [ 20, 38 ], [ 107, 41 ], [ ...
[ "a=list(input())\n\nn = 0\n\ns = 0\n\ne = 0\n\nw = 0\n\nfor i in a:\n if i == 'N':\n n += 1\n elif i == 'S':\n s += 1\n elif i == 'E':\n e += 1\n elif i == 'W':\n w += 1\n\nif n > 0 and s == 0 or n == 0 and s > 0 or e > 0 and w == 0 or e == 0 and w > 0:\n print('No')\nelse:\n print('Yes')", "a=l...
a=list(input()) n = 0 s = 0 e = 0 w = 0 for i in a: if i == 'N': n += 1 elif i == 'S': s += 1 elif i == 'E': e += 1 elif i == 'W': w += 1 if n > 0 and s == 0 or n == 0 and s > 0 or e > 0 and w == 0 or e == 0 and w > 0: print('No') else: print('Yes')
[ 7, 0, 13, 4, 13, 12, 13, 0, 13, 4, 13, 13, 0, 13, 17, 0, 13, 17, 0, 13, 17, 0, 13, 17, 0, 13, 39, 28, 13, 4, 13, 13, 14, 2, 18, 13, 13, 17, 0, 13, 17, 4, 18, 13, 13, 13, 14, 2, 18, 13, 13, 17, 0, 13, 17, 4,...
[ [ 128, 2 ], [ 9, 8 ], [ 123, 11 ], [ 14, 13 ], [ 17, 16 ], [ 20, 19 ], [ 23, 22 ], [ 26, 25 ], [ 29, 28 ], [ 8, 31 ], [ 123, 35 ], [ 28, 36 ], [ 40, 39 ], [ ...
[ "s = input()\n\n\ndef walk(s):\n ls = len(s)\n nc = 0\n sc = 0\n wc = 0\n ec = 0\n l=[]\n for i in range(ls):\n if s[i] == \"W\":\n wc += 1\n l.append(wc)\n elif s[i] == \"E\":\n ec += 1\n l.append(ec)\n elif s[i] == \"N\":\n ...
s = input() def walk(s): ls = len(s) nc = 0 sc = 0 wc = 0 ec = 0 l=[] for i in range(ls): if s[i] == "W": wc += 1 l.append(wc) elif s[i] == "E": ec += 1 l.append(ec) elif s[i] == "N": nc += 1 l....
[ 7, 12, 13, 0, 13, 4, 13, 14, 2, 2, 2, 2, 2, 40, 4, 18, 13, 13, 17, 17, 40, 4, 18, 13, 13, 17, 17, 2, 4, 18, 13, 13, 17, 17, 2, 4, 18, 13, 13, 17, 17, 2, 2, 2, 2, 4, 18, 13, 13, 17, 17, 2, 4, 18, 13, 13, 1...
[ [ 5, 4 ], [ 4, 16 ], [ 4, 23 ], [ 4, 30 ], [ 4, 37 ], [ 4, 47 ], [ 4, 54 ], [ 4, 61 ], [ 4, 68 ], [ 4, 78 ], [ 4, 85 ], [ 4, 92 ], [ 4, 99 ], [ 117, 114...
[ "def main():\n S = input()\n if (S.count(\"N\") >= 1 and S.count(\"S\") >= 1 and S.count(\"E\") == 0 and S.count(\"W\") == 0)\\\n or (S.count(\"N\") == 0 and S.count(\"S\") == 0 and S.count(\"E\") >= 1 and S.count(\"W\") >= 1)\\\n or (S.count(\"N\") >= 1 and S.count(\"S\") >= 1 and S.count(\"E\") ...
def main(): S = input() if (S.count("N") >= 1 and S.count("S") >= 1 and S.count("E") == 0 and S.count("W") == 0)\ or (S.count("N") == 0 and S.count("S") == 0 and S.count("E") >= 1 and S.count("W") >= 1)\ or (S.count("N") >= 1 and S.count("S") >= 1 and S.count("E") >= 1 and S.count("W") >= 1): ...
[ 7, 0, 13, 4, 13, 0, 13, 4, 18, 13, 13, 17, 0, 13, 4, 18, 13, 13, 17, 0, 13, 4, 18, 13, 13, 17, 0, 13, 4, 18, 13, 13, 17, 14, 2, 2, 2, 13, 13, 17, 2, 2, 13, 13, 17, 4, 13, 17, 14, 2, 2, 2, 2, 13, 13, 17, 2...
[ [ 92, 2 ], [ 98, 6 ], [ 93, 9 ], [ 89, 13 ], [ 93, 16 ], [ 95, 20 ], [ 93, 23 ], [ 86, 27 ], [ 93, 30 ], [ 99, 37 ], [ 90, 38 ], [ 96, 42 ], [ 87, 43 ], [ 9...
[ "S = input()\n\nn = S.count('N')\ns = S.count('S')\nw = S.count('W')\ne = S.count('E')\n\nif n * s > 0 and w * e > 0:\n print('Yes')\nelif n * s > 0 and w == 0 and e == 0:\n print('Yes')\nelif w * e > 0 and n == 0 and s == 0:\n print('Yes')\nelse:\n print('No')", "S = input()", "S", "input()", "...
S = input() n = S.count('N') s = S.count('S') w = S.count('W') e = S.count('E') if n * s > 0 and w * e > 0: print('Yes') elif n * s > 0 and w == 0 and e == 0: print('Yes') elif w * e > 0 and n == 0 and s == 0: print('Yes') else: print('No')
[ 7, 0, 13, 4, 13, 14, 2, 2, 2, 2, 2, 4, 18, 13, 13, 17, 17, 2, 4, 18, 13, 13, 17, 17, 2, 2, 4, 18, 13, 13, 17, 17, 2, 4, 18, 13, 13, 17, 17, 2, 2, 4, 18, 13, 13, 17, 17, 2, 4, 18, 13, 13, 17, 17, 2, 2, 4, ...
[ [ 76, 2 ], [ 77, 13 ], [ 77, 20 ], [ 77, 28 ], [ 77, 35 ], [ 77, 43 ], [ 77, 50 ], [ 77, 58 ], [ 77, 65 ], [ 76, 77 ] ]
[ "S = input()\nif 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:\n print('No')\nelse:\n print('Yes')", "S = input()", "S", "input()", "input", "if S.count('N') > 0 and S.count('S') =...
S = input() if S.count('N') > 0 and S.count('S') == 0 or S.count('N') == 0 and S.count('S') > 0 or S.count('W') > 0 and S.count('E') == 0 or S.count('W') == 0 and S.count('E') > 0: print('No') else: print('Yes')
[ 7, 0, 13, 4, 13, 0, 13, 17, 14, 2, 2, 17, 13, 2, 17, 13, 0, 13, 17, 14, 2, 40, 17, 13, 40, 17, 13, 0, 13, 17, 0, 13, 17, 14, 2, 2, 17, 13, 2, 17, 13, 0, 13, 17, 14, 2, 40, 17, 13, 40, 17, 13, 0, 13, 17, 14,...
[ [ 78, 2 ], [ 72, 6 ], [ 79, 12 ], [ 79, 15 ], [ 66, 17 ], [ 79, 23 ], [ 79, 26 ], [ 81, 28 ], [ 75, 31 ], [ 79, 37 ], [ 79, 40 ], [ 84, 42 ], [ 79, 48 ], [ ...
[ "s = input()\n\nx = False\nif 'N' in s and 'S' in s:\n x = True\nif 'N' not in s and 'S' not in s:\n x = True\ny = False\nif 'W' in s and 'E' in s:\n y = True\nif 'W' not in s and 'E' not in s:\n y = True\n\nif x and y:\n print('Yes')\nelse:\n print('No') ", "s = input()", "s", "input()", ...
s = input() x = False if 'N' in s and 'S' in s: x = True if 'N' not in s and 'S' not in s: x = True y = False if 'W' in s and 'E' in s: y = True if 'W' not in s and 'E' not in s: y = True if x and y: print('Yes') else: print('No')
[ 7, 0, 13, 4, 13, 0, 13, 4, 18, 13, 13, 17, 0, 13, 4, 18, 13, 13, 17, 0, 13, 4, 18, 13, 13, 17, 0, 13, 4, 18, 13, 13, 17, 12, 13, 29, 2, 2, 2, 13, 17, 2, 13, 17, 2, 2, 13, 17, 2, 13, 17, 23, 13, 23, 13, 0, ...
[ [ 90, 2 ], [ 84, 6 ], [ 91, 9 ], [ 81, 13 ], [ 91, 16 ], [ 87, 20 ], [ 91, 23 ], [ 78, 27 ], [ 91, 30 ], [ 52, 39 ], [ 54, 42 ], [ 52, 46 ], [ 54, 49 ], [ 5...
[ "S = input()\n\nn = S.count('N')\nw = S.count('W')\ns = S.count('S')\ne = S.count('E')\n\ndef f(n,s):\n return (n==0 and s==0) or (n>0 and s>0)\n\nb = f(n,s) and f(e,w)\n\nif b:\n print(\"Yes\")\nelse:\n print(\"No\")\n\n\n\n\n", "S = input()", "S", "input()", "input", "n = S.count('N')", "n", "S.c...
S = input() n = S.count('N') w = S.count('W') s = S.count('S') e = S.count('E') def f(n,s): return (n==0 and s==0) or (n>0 and s>0) b = f(n,s) and f(e,w) if b: print("Yes") else: print("No")
[ 7, 0, 13, 4, 13, 4, 13, 14, 2, 2, 2, 2, 17, 13, 40, 17, 13, 2, 17, 13, 40, 17, 13, 4, 13, 17, 14, 2, 2, 2, 40, 17, 13, 2, 17, 13, 40, 17, 13, 2, 17, 13, 4, 13, 17, 14, 2, 2, 2, 2, 17, 13, 2, 17, 13, 2, 17...
[ [ 68, 2 ], [ 69, 13 ], [ 69, 16 ], [ 69, 19 ], [ 69, 22 ], [ 69, 32 ], [ 69, 35 ], [ 69, 38 ], [ 69, 41 ], [ 69, 51 ], [ 69, 54 ], [ 69, 57 ], [ 69, 60 ], [ ...
[ "S = list(input())\n\nif \"N\" in S and \"W\" not in S and \"S\" in S and \"E\" not in S:\n print(\"Yes\")\nelif \"N\" not in S and \"W\" in S and \"S\" not in S and \"E\" in S:\n print(\"Yes\")\nelif \"N\" in S and \"W\" in S and \"S\" in S and \"E\" in S:\n print(\"Yes\")\nelse:\n print(\"No\")", "S...
S = list(input()) if "N" in S and "W" not in S and "S" in S and "E" not in S: print("Yes") elif "N" not in S and "W" in S and "S" not in S and "E" in S: print("Yes") elif "N" in S and "W" in S and "S" in S and "E" in S: print("Yes") else: print("No")
[ 7, 0, 13, 4, 13, 0, 13, 4, 13, 13, 14, 2, 2, 4, 13, 13, 17, 17, 14, 2, 2, 2, 2, 13, 4, 13, 2, 13, 4, 13, 39, 17, 17, 2, 13, 4, 13, 39, 17, 17, 2, 13, 4, 13, 39, 17, 17, 17, 17, 4, 13, 17, 4, 13, 17, 4, 13...
[ [ 62, 2 ], [ 59, 6 ], [ 63, 9 ], [ 60, 15 ], [ 60, 23 ], [ 60, 27 ], [ 60, 34 ], [ 60, 41 ], [ 59, 60 ], [ 62, 63 ] ]
[ "S = input()\n\nS_set = set(S)\nif len(S_set) % 2 == 0:\n if S_set == set() or S_set == set(['N', 'S']) or S_set == set(['E', 'W']) or S_set == set(['N', 'S', 'E', 'W']):\n print('Yes')\n else:\n print('No')\nelse:\n print('No')", "S = input()", "S", "input()", "input", "S_set = set...
S = input() S_set = set(S) if len(S_set) % 2 == 0: if S_set == set() or S_set == set(['N', 'S']) or S_set == set(['E', 'W']) or S_set == set(['N', 'S', 'E', 'W']): print('Yes') else: print('No') else: print('No')
[ 7, 0, 13, 4, 13, 4, 13, 0, 13, 17, 0, 13, 17, 28, 13, 4, 13, 13, 0, 13, 4, 13, 4, 13, 14, 2, 2, 13, 17, 40, 13, 17, 0, 13, 17, 0, 13, 17, 0, 13, 2, 13, 17, 0, 13, 2, 13, 17, 4, 13, 13, 10, 17, 13, 10, 4, ...
[ [ 64, 2 ], [ 52, 8 ], [ 73, 11 ], [ 15, 14 ], [ 65, 17 ], [ 55, 19 ], [ 74, 27 ], [ 62, 27 ], [ 56, 30 ], [ 68, 30 ], [ 58, 33 ], [ 67, 36 ], [ 70, 39 ], [ ...
[ "N = int(input())\nans = 0\nprev = 0\nfor i in range(N):\n a = int(input())\n if prev == 1 and a >= 1:\n ans += 1\n a -= 1\n ans += a // 2\n prev = a % 2\nprint(ans)", "N = int(input())", "N", "int(input())", "int", "input()", "input", "ans = 0", "ans", "0", "prev = 0", "prev", "0"...
N = int(input()) ans = 0 prev = 0 for i in range(N): a = int(input()) if prev == 1 and a >= 1: ans += 1 a -= 1 ans += a // 2 prev = a % 2 print(ans)
[ 7, 0, 13, 4, 13, 4, 13, 41, 28, 13, 4, 13, 13, 4, 4, 13, 4, 13, 0, 13, 13, 0, 13, 17, 0, 13, 17, 28, 13, 4, 13, 13, 14, 2, 13, 40, 18, 13, 13, 17, 0, 13, 17, 0, 18, 13, 13, 17, 0, 13, 2, 18, 13, 13, 17, 0, ...
[ [ 75, 2 ], [ 10, 9 ], [ 76, 12 ], [ 78, 19 ], [ 66, 22 ], [ 84, 25 ], [ 29, 28 ], [ 76, 31 ], [ 85, 34 ], [ 73, 34 ], [ 44, 36 ], [ 79, 37 ], [ 28, 38 ], [ ...
[ "n = int(input())\na = [int(input()) for i in range(n)]\nans = 0\nflag = 0\nfor i in range(n):\n if flag and a[i] >= 1:\n ans += 1\n a[i] -= 1\n flag = a[i] % 2\n ans += a[i] // 2\nprint(ans)", "n = int(input())", "n", "int(input())", "int", "input()", "input", "int(input()) for...
n = int(input()) a = [int(input()) for i in range(n)] ans = 0 flag = 0 for i in range(n): if flag and a[i] >= 1: ans += 1 a[i] -= 1 flag = a[i] % 2 ans += a[i] // 2 print(ans)
[ 7, 0, 13, 4, 13, 4, 13, 41, 28, 13, 4, 13, 13, 4, 4, 13, 4, 13, 0, 13, 13, 0, 13, 17, 0, 13, 17, 28, 13, 13, 14, 2, 13, 17, 0, 13, 17, 9, 0, 13, 2, 2, 13, 13, 17, 0, 13, 2, 2, 13, 13, 17, 4, 13, 13, 10, 1...
[ [ 68, 2 ], [ 10, 9 ], [ 69, 12 ], [ 71, 19 ], [ 56, 22 ], [ 74, 25 ], [ 29, 28 ], [ 72, 28 ], [ 28, 32 ], [ 59, 35 ], [ 62, 39 ], [ 28, 42 ], [ 60, 43 ], [ ...
[ "N = int(input())\nA = [int(input()) for _ in range(N)]\n\ncnt = 0\nremain = 0\nfor a in A:\n if a == 0:\n remain = 0\n continue\n cnt += (a+remain)//2 \n remain = (a+remain)%2\nprint(cnt)", "N = int(input())", "N", "int(input())", "int", "input()", "input", "int(input()) for _ ...
N = int(input()) A = [int(input()) for _ in range(N)] cnt = 0 remain = 0 for a in A: if a == 0: remain = 0 continue cnt += (a+remain)//2 remain = (a+remain)%2 print(cnt)
[ 7, 0, 13, 4, 13, 4, 13, 0, 13, 17, 0, 13, 17, 28, 13, 4, 13, 13, 0, 13, 4, 13, 4, 13, 14, 2, 13, 17, 0, 13, 17, 9, 0, 13, 2, 2, 13, 13, 17, 14, 2, 2, 2, 13, 13, 17, 17, 0, 13, 17, 0, 13, 17, 4, 13, 13, 10...
[ [ 69, 2 ], [ 72, 8 ], [ 57, 11 ], [ 15, 14 ], [ 70, 17 ], [ 75, 19 ], [ 76, 26 ], [ 78, 29 ], [ 63, 33 ], [ 76, 36 ], [ 79, 37 ], [ 58, 37 ], [ 67, 37 ], [ ...
[ "n = int(input())\nans = 0\nbef = 0\nfor _ in range(n):\n a = int(input())\n if a == 0:\n bef = 0\n continue\n ans += (a + bef) // 2\n if (a + bef) % 2 == 1:\n bef = 1\n else:\n bef = 0\nprint(ans)", "n = int(input())", "n", "int(input())", "int", "input()", "input", "ans = 0", "ans...
n = int(input()) ans = 0 bef = 0 for _ in range(n): a = int(input()) if a == 0: bef = 0 continue ans += (a + bef) // 2 if (a + bef) % 2 == 1: bef = 1 else: bef = 0 print(ans)
[ 7, 15, 0, 13, 4, 13, 4, 13, 0, 13, 4, 13, 13, 28, 13, 4, 13, 13, 0, 13, 4, 13, 4, 13, 0, 18, 13, 2, 13, 17, 13, 0, 13, 17, 28, 13, 4, 13, 17, 2, 13, 17, 0, 13, 4, 18, 13, 13, 2, 13, 17, 17, 0, 13, 4, 18, ...
[ [ 117, 3 ], [ 129, 9 ], [ 15, 14 ], [ 118, 17 ], [ 114, 19 ], [ 30, 25 ], [ 130, 26 ], [ 14, 28 ], [ 115, 30 ], [ 108, 32 ], [ 36, 35 ], [ 118, 40 ], [ 120, 43 ],...
[ "# https://atcoder.jp/contests/agc003/tasks/agc003_b\n# 各数字について、その数字の1つ前とその数字だけでできるだけ作る。\n# その数字だけでペアをできるだけ作る。\n# 1については、0のカードが0枚なので、実質無視できる。\nfrom collections import defaultdict\nn = int(input())\nd = defaultdict(int)\nfor i in range(n):\n num = int(input())\n d[i + 1] = num\n\nans = 0\nfor i in range(1, n +...
# https://atcoder.jp/contests/agc003/tasks/agc003_b # 各数字について、その数字の1つ前とその数字だけでできるだけ作る。 # その数字だけでペアをできるだけ作る。 # 1については、0のカードが0枚なので、実質無視できる。 from collections import defaultdict n = int(input()) d = defaultdict(int) for i in range(n): num = int(input()) d[i + 1] = num ans = 0 for i in range(1, n + 1): pre = d....
[ 7, 0, 13, 4, 13, 4, 13, 41, 28, 13, 4, 13, 13, 4, 4, 13, 4, 13, 0, 13, 13, 0, 13, 39, 0, 13, 39, 28, 13, 13, 14, 2, 13, 17, 14, 13, 4, 18, 13, 13, 13, 0, 13, 39, 4, 18, 13, 13, 13, 14, 13, 0, 13, 17, 28, 13...
[ [ 106, 2 ], [ 10, 9 ], [ 107, 12 ], [ 112, 19 ], [ 109, 22 ], [ 100, 25 ], [ 29, 28 ], [ 113, 28 ], [ 28, 32 ], [ 110, 38 ], [ 101, 40 ], [ 104, 40 ], [ 103, 42 ]...
[ "n = int(input())\na = [int(input()) for _ in range(n)]\n\nlsts = []\ntemp = []\nfor aa in a:\n if aa == 0:\n if temp:\n lsts.append(temp)\n temp = []\n else:\n temp.append(aa)\nif temp: lsts.append(temp)\n\nans = 0\n\nfor lst in lsts:\n for i, aa in enumerate(lst):\n ...
n = int(input()) a = [int(input()) for _ in range(n)] lsts = [] temp = [] for aa in a: if aa == 0: if temp: lsts.append(temp) temp = [] else: temp.append(aa) if temp: lsts.append(temp) ans = 0 for lst in lsts: for i, aa in enumerate(lst): ans += aa // 2 ...
[ 7, 0, 13, 4, 13, 4, 13, 0, 13, 17, 0, 13, 17, 28, 13, 4, 13, 13, 0, 13, 4, 13, 4, 13, 14, 2, 2, 13, 2, 13, 17, 2, 13, 17, 0, 13, 17, 0, 13, 17, 0, 13, 2, 13, 17, 14, 2, 2, 13, 17, 17, 0, 13, 13, 4, 13, 13...
[ [ 64, 2 ], [ 76, 8 ], [ 79, 11 ], [ 15, 14 ], [ 65, 17 ], [ 61, 19 ], [ 80, 27 ], [ 74, 27 ], [ 14, 29 ], [ 62, 32 ], [ 68, 32 ], [ 58, 35 ], [ 67, 38 ], [ ...
[ "N = int(input())\n\nans = 0\ntmp = -10\nfor i in range(N):\n a = int(input())\n if tmp == i-1 and a > 0:\n ans += 1\n a -= 1\n ans += a//2\n if a%2 == 1:\n tmp = i\nprint(ans)", "N = int(input())", "N", "int(input())", "int", "input()", "input", "ans = 0", "ans", ...
N = int(input()) ans = 0 tmp = -10 for i in range(N): a = int(input()) if tmp == i-1 and a > 0: ans += 1 a -= 1 ans += a//2 if a%2 == 1: tmp = i print(ans)
[ 7, 0, 13, 4, 13, 4, 13, 0, 13, 17, 0, 13, 17, 28, 13, 4, 13, 13, 0, 13, 4, 13, 4, 13, 14, 40, 13, 17, 0, 13, 13, 0, 13, 2, 13, 17, 0, 13, 17, 0, 13, 2, 13, 17, 4, 13, 13, 10, 4, 13, 10, 17, 13, 10, 2, 13, ...
[ [ 57, 2 ], [ 63, 8 ], [ 51, 11 ], [ 15, 14 ], [ 58, 17 ], [ 48, 19 ], [ 49, 26 ], [ 66, 29 ], [ 49, 30 ], [ 69, 32 ], [ 52, 34 ], [ 61, 34 ], [ 67, 34 ], [ ...
[ "N=int(input())\nans=0\ntmp=0\nfor i in range(N):\n s=int(input())\n if s!=0:\n tmp+=s\n else:\n ans+=tmp//2\n tmp=0\nans+=tmp//2\nprint(ans)", "N=int(input())", "N", "int(input())", "int", "input()", "input", "ans=0", "ans", "0", "tmp=0", "tmp", "0", "for i in range(N...
N=int(input()) ans=0 tmp=0 for i in range(N): s=int(input()) if s!=0: tmp+=s else: ans+=tmp//2 tmp=0 ans+=tmp//2 print(ans)
[ 7, 0, 13, 4, 13, 4, 13, 41, 28, 13, 4, 13, 13, 4, 4, 13, 4, 13, 0, 13, 13, 0, 13, 39, 17, 0, 13, 17, 28, 13, 4, 13, 13, 0, 13, 2, 18, 13, 13, 17, 0, 13, 13, 0, 18, 13, 13, 2, 17, 13, 14, 2, 2, 18, 13, 13, ...
[ [ 83, 2 ], [ 10, 9 ], [ 84, 12 ], [ 92, 19 ], [ 89, 22 ], [ 101, 26 ], [ 30, 29 ], [ 84, 32 ], [ 95, 34 ], [ 68, 36 ], [ 44, 36 ], [ 90, 37 ], [ 93, 37 ], [ ...
[ "n=int(input())\na=[int(input()) for i in range(n)]\na+=[0]\n\nans=0\nfor i in range(n):\n pair=a[i]//2\n ans+=pair\n a[i]-=2*pair\n if a[i]>0 and a[i+1]>0:\n ans+=1\n a[i]-=1\n a[i+1]-=1\n\nprint(ans)\n", "n=int(input())", "n", "int(input())", "int", "input()", "input",...
n=int(input()) a=[int(input()) for i in range(n)] a+=[0] ans=0 for i in range(n): pair=a[i]//2 ans+=pair a[i]-=2*pair if a[i]>0 and a[i+1]>0: ans+=1 a[i]-=1 a[i+1]-=1 print(ans)
[ 7, 0, 13, 4, 13, 4, 13, 0, 13, 2, 39, 17, 13, 0, 13, 17, 0, 13, 17, 0, 13, 17, 28, 13, 4, 13, 13, 0, 13, 4, 13, 4, 13, 0, 18, 13, 13, 13, 14, 2, 13, 17, 0, 13, 17, 14, 40, 13, 4, 13, 2, 4, 13, 13, 17, 4, ...
[ [ 112, 2 ], [ 106, 8 ], [ 113, 12 ], [ 103, 14 ], [ 130, 17 ], [ 109, 20 ], [ 24, 23 ], [ 113, 26 ], [ 124, 28 ], [ 37, 34 ], [ 107, 35 ], [ 23, 36 ], [ 125, 37 ]...
[ "n = int(input())\na = [0]*n\nres = 0\ntmp = 0\nzero = False\nfor i in range(n):\n s = int(input())\n a[i] = s\n if s==0:\n zero = True\nif not zero:\n print(sum(a)//2)\n exit()\n\nfor i in range(n):\n if a[i]!=0:\n tmp+=a[i]\n else:\n res+=tmp//2\n tmp = 0\n if i...
n = int(input()) a = [0]*n res = 0 tmp = 0 zero = False for i in range(n): s = int(input()) a[i] = s if s==0: zero = True if not zero: print(sum(a)//2) exit() for i in range(n): if a[i]!=0: tmp+=a[i] else: res+=tmp//2 tmp = 0 if i==n-1 and tmp>1: ...
[ 7, 0, 13, 4, 13, 4, 13, 0, 13, 17, 0, 13, 17, 28, 13, 4, 13, 13, 0, 13, 4, 13, 4, 13, 14, 2, 13, 17, 0, 13, 17, 9, 0, 13, 13, 0, 13, 2, 13, 17, 0, 13, 2, 13, 17, 4, 13, 13, 10, 4, 13, 10, 2, 13, 10, 2, 13...
[ [ 64, 2 ], [ 58, 8 ], [ 61, 11 ], [ 15, 14 ], [ 65, 17 ], [ 49, 19 ], [ 50, 26 ], [ 68, 26 ], [ 70, 29 ], [ 67, 33 ], [ 71, 34 ], [ 62, 34 ], [ 56, 34 ], [ ...
[ "n = int(input())\n\nans = 0\nsurplus = 0\nfor i in range(n):\n a = int(input())\n if a == 0:\n surplus = 0\n continue\n a += surplus\n\n ans += a // 2\n surplus = a % 2\n\nprint(ans)", "n = int(input())", "n", "int(input())", "int", "input()", "input", "ans = 0", "ans",...
n = int(input()) ans = 0 surplus = 0 for i in range(n): a = int(input()) if a == 0: surplus = 0 continue a += surplus ans += a // 2 surplus = a % 2 print(ans)
[ 7, 0, 13, 4, 13, 4, 13, 41, 28, 13, 4, 13, 13, 4, 4, 13, 4, 13, 0, 13, 13, 0, 13, 17, 28, 13, 4, 13, 13, 0, 13, 2, 18, 13, 13, 17, 0, 18, 13, 13, 2, 2, 18, 13, 13, 17, 17, 14, 2, 13, 17, 0, 13, 4, 13, 18, ...
[ [ 118, 2 ], [ 10, 9 ], [ 119, 12 ], [ 115, 19 ], [ 124, 22 ], [ 26, 25 ], [ 119, 28 ], [ 121, 30 ], [ 100, 32 ], [ 67, 32 ], [ 37, 32 ], [ 116, 33 ], [ 25, 34 ], ...
[ "N=int(input())\nA=[int(input()) for i in range(N)]\nans=0\nfor i in range(N):\n ans+=A[i]//2\n A[i]-=(A[i]//2*2)\n if i>0:\n d=min(A[i],A[i-1])\n ans+=d\n A[i]-=d\n A[i-1]-=d\n if i<N-1:\n d=min(A[i],A[i+1])\n ans+=d\n A[i]-=d\n A[i+1]-=d\nprint(a...
N=int(input()) A=[int(input()) for i in range(N)] ans=0 for i in range(N): ans+=A[i]//2 A[i]-=(A[i]//2*2) if i>0: d=min(A[i],A[i-1]) ans+=d A[i]-=d A[i-1]-=d if i<N-1: d=min(A[i],A[i+1]) ans+=d A[i]-=d A[i+1]-=d print(ans)
[ 7, 0, 13, 4, 13, 4, 13, 0, 13, 39, 28, 13, 4, 13, 13, 4, 18, 13, 13, 4, 13, 4, 13, 0, 13, 17, 28, 13, 4, 13, 13, 0, 13, 2, 18, 13, 13, 17, 0, 18, 13, 13, 2, 18, 13, 13, 17, 14, 2, 2, 2, 18, 13, 13, 17, 2, ...
[ [ 89, 2 ], [ 92, 8 ], [ 12, 11 ], [ 90, 14 ], [ 93, 17 ], [ 86, 24 ], [ 28, 27 ], [ 90, 30 ], [ 95, 32 ], [ 71, 34 ], [ 39, 34 ], [ 93, 35 ], [ 27, 36 ], [ ...
[ "N = int(input())\nA = []\nfor _ in range(N):\n A.append(int(input()))\n\nans = 0\nfor i in range(N):\n ans += A[i] // 2\n A[i] = A[i] % 2\n if A[i] == 1 and i + 1 < N and A[i + 1] > 0:\n ans += 1\n A[i] -= 1\n A[i + 1] -= 1\n\nprint(ans)", "N = int(input())", "N", "int(input(...
N = int(input()) A = [] for _ in range(N): A.append(int(input())) ans = 0 for i in range(N): ans += A[i] // 2 A[i] = A[i] % 2 if A[i] == 1 and i + 1 < N and A[i + 1] > 0: ans += 1 A[i] -= 1 A[i + 1] -= 1 print(ans)
[ 7, 0, 13, 4, 13, 4, 13, 41, 28, 13, 4, 13, 13, 4, 4, 13, 4, 13, 0, 13, 13, 0, 13, 17, 0, 13, 17, 28, 13, 13, 0, 13, 2, 2, 13, 13, 17, 14, 2, 2, 2, 2, 13, 13, 17, 17, 2, 13, 17, 0, 13, 17, 0, 13, 17, 4, 13...
[ [ 68, 2 ], [ 10, 9 ], [ 69, 12 ], [ 71, 19 ], [ 59, 22 ], [ 74, 25 ], [ 29, 28 ], [ 72, 28 ], [ 65, 31 ], [ 28, 34 ], [ 75, 35 ], [ 78, 35 ], [ 63, 35 ], [ ...
[ "n = int(input())\nalst = [int(input()) for _ in range(n)]\ncnt = 0\nbef = 0\nfor num in alst:\n cnt += (num + bef) // 2\n if (num + bef) % 2 == 1 and num > 0:\n bef = 1\n else:\n bef = 0\nprint(cnt)", "n = int(input())", "n", "int(input())", "int", "input()", "input", "int(inpu...
n = int(input()) alst = [int(input()) for _ in range(n)] cnt = 0 bef = 0 for num in alst: cnt += (num + bef) // 2 if (num + bef) % 2 == 1 and num > 0: bef = 1 else: bef = 0 print(cnt)
[ 7, 15, 13, 0, 13, 18, 18, 13, 13, 13, 12, 13, 29, 4, 13, 4, 13, 13, 4, 18, 4, 13, 13, 23, 13, 13, 23, 13, 13, 12, 13, 42, 13, 29, 13, 23, 13, 23, 13, 12, 13, 23, 13, 23, 13, 12, 13, 0, 13, 4, 13, 4, 13, 41, 2...
[ [ 114, 4 ], [ 27, 14 ], [ 24, 17 ], [ 115, 21 ], [ 25, 24 ], [ 28, 27 ], [ 36, 34 ], [ 36, 36 ], [ 38, 38 ], [ 42, 42 ], [ 44, 44 ], [ 49, 48 ], [ 115, 52 ], [ ...
[ "import sys\ninput = sys.stdin.readline\n\n# from collections import deque\n\ndef linput(_t=int, cnv=list):\n return cnv(map(_t, input().split()))\n\ndef gcd(n,m):\n while m: n,m = m, n%m\n return n\n\ndef lcm(n,m): return n*m//gcd(n,m)\n\ndef main():\n N = int(input())\n vA = [int(input()) for _ in ...
import sys input = sys.stdin.readline # from collections import deque def linput(_t=int, cnv=list): return cnv(map(_t, input().split())) def gcd(n,m): while m: n,m = m, n%m return n def lcm(n,m): return n*m//gcd(n,m) def main(): N = int(input()) vA = [int(input()) for _ in [0,]*N] res = 0 ...
[ 7, 15, 13, 15, 15, 13, 15, 15, 15, 15, 13, 4, 18, 13, 13, 17, 0, 13, 18, 18, 13, 13, 13, 0, 13, 4, 13, 13, 4, 18, 4, 13, 13, 41, 28, 13, 4, 13, 13, 4, 4, 13, 4, 13, 0, 13, 13, 0, 13, 17, 28, 13, 4, 13, 13, ...
[ [ 113, 17 ], [ 125, 24 ], [ 114, 31 ], [ 36, 35 ], [ 126, 38 ], [ 114, 43 ], [ 116, 45 ], [ 122, 48 ], [ 52, 51 ], [ 126, 54 ], [ 110, 56 ], [ 92, 58 ], [ 63, 58 ...
[ "import sys\nfrom collections import defaultdict, deque\nimport bisect\nfrom heapq import *\nfrom math import factorial, ceil, floor\nfrom collections import defaultdict\nimport itertools\nsys.setrecursionlimit(200000)\ninput = sys.stdin.readline\n\n# N, M, = map(int, input().split())\n# N = int(input())\n# L = [in...
import sys from collections import defaultdict, deque import bisect from heapq import * from math import factorial, ceil, floor from collections import defaultdict import itertools sys.setrecursionlimit(200000) input = sys.stdin.readline # N, M, = map(int, input().split()) # N = int(input()) # L = [int(v) for v in inp...
[ 7, 0, 13, 4, 13, 4, 13, 0, 13, 17, 13, 17, 0, 13, 17, 28, 13, 4, 13, 13, 0, 13, 4, 13, 4, 13, 14, 2, 2, 13, 17, 2, 13, 17, 0, 13, 17, 14, 2, 2, 2, 13, 13, 17, 17, 14, 2, 13, 17, 0, 13, 2, 13, 17, 0, 13, 1...
[ [ 123, 2 ], [ 126, 8 ], [ 120, 10 ], [ 96, 13 ], [ 17, 16 ], [ 124, 19 ], [ 111, 21 ], [ 112, 29 ], [ 127, 29 ], [ 121, 32 ], [ 115, 32 ], [ 118, 32 ], [ 109, 32 ...
[ "n = int(input())\nnow, bef = 0, 0\nans = 0\nfor i in range(n):\n now = int(input())\n if now == 0 and bef == 1:\n bef = 0\n if (now+bef)%2 == 0:\n if bef == 0:\n ans += now//2\n bef = 0\n else:\n ans += (now+bef)//2\n bef = 0\n else:\n if bef == 0:\n ans += now//2\n be...
n = int(input()) now, bef = 0, 0 ans = 0 for i in range(n): now = int(input()) if now == 0 and bef == 1: bef = 0 if (now+bef)%2 == 0: if bef == 0: ans += now//2 bef = 0 else: ans += (now+bef)//2 bef = 0 else: if bef == 0: ans += now//2 bef = 1 else: ...
[ 7, 0, 13, 4, 13, 4, 13, 0, 13, 17, 0, 13, 17, 28, 13, 4, 13, 13, 0, 13, 4, 13, 4, 13, 0, 13, 13, 14, 2, 13, 17, 0, 13, 2, 13, 17, 0, 13, 17, 0, 13, 2, 13, 17, 4, 13, 13, 10, 13, 13, 10, 4, 13, 10, 17, 13, ...
[ [ 51, 2 ], [ 54, 8 ], [ 57, 11 ], [ 15, 14 ], [ 52, 17 ], [ 66, 19 ], [ 48, 25 ], [ 67, 26 ], [ 67, 29 ], [ 69, 32 ], [ 49, 34 ], [ 58, 34 ], [ 61, 34 ], [ ...
[ "n = int(input())\nans = 0\nsums = 0\nfor i in range(n):\n a = int(input())\n sums += a\n if a == 0:\n ans += sums // 2\n sums = 0\nans += sums // 2\nprint(ans)", "n = int(input())", "n", "int(input())", "int", "input()", "input", "ans = 0", "ans", "0", "sums = 0", "sums...
n = int(input()) ans = 0 sums = 0 for i in range(n): a = int(input()) sums += a if a == 0: ans += sums // 2 sums = 0 ans += sums // 2 print(ans)
[ 7, 15, 0, 13, 4, 13, 4, 13, 41, 28, 13, 4, 13, 13, 4, 4, 13, 4, 13, 0, 13, 2, 39, 17, 13, 0, 13, 17, 28, 13, 4, 13, 13, 0, 13, 2, 2, 18, 13, 2, 13, 17, 18, 13, 13, 17, 14, 18, 13, 2, 13, 17, 4, 13, 13, 10, ...
[ [ 56, 3 ], [ 11, 10 ], [ 57, 13 ], [ 59, 20 ], [ 62, 26 ], [ 30, 29 ], [ 57, 32 ], [ 65, 34 ], [ 60, 38 ], [ 29, 40 ], [ 60, 43 ], [ 29, 44 ], [ 60, 48 ], [ ...
[ "from copy import copy\nn=int(input())\na=[0]+[int(input()) for _ in range(n)]\nans=0\nfor i in range(n):\n ans+=(a[i+1]+a[i])//2\n if a[i+1]:a[i+1]=(a[i+1]+a[i])%2\nprint(ans)", "from copy import copy", "n=int(input())", "n", "int(input())", "int", "input()", "input", "int(input()) for _ in range...
from copy import copy n=int(input()) a=[0]+[int(input()) for _ in range(n)] ans=0 for i in range(n): ans+=(a[i+1]+a[i])//2 if a[i+1]:a[i+1]=(a[i+1]+a[i])%2 print(ans)
[ 7, 0, 13, 4, 13, 4, 13, 0, 13, 17, 0, 13, 17, 28, 13, 4, 13, 13, 0, 13, 4, 13, 4, 13, 14, 2, 2, 13, 17, 2, 13, 17, 0, 13, 17, 0, 13, 17, 0, 13, 17, 14, 2, 2, 13, 17, 2, 13, 17, 0, 13, 17, 0, 13, 2, 13, 17...
[ [ 76, 2 ], [ 91, 8 ], [ 94, 11 ], [ 15, 14 ], [ 77, 17 ], [ 70, 19 ], [ 95, 27 ], [ 80, 27 ], [ 86, 27 ], [ 89, 27 ], [ 71, 30 ], [ 74, 30 ], [ 73, 33 ], [ ...
[ "n = int(input())\nans = 0\nnex = 0\nfor i in range(n):\n now = int(input())\n if nex == 1 and now > 0:\n now -= 1\n nex = 0\n ans += 1\n elif nex == 1 and now == 0:\n nex = 0 \n ans += now//2\n if now % 2 == 1:\n nex = 1\nprint(ans)", "n = int(input())", "n", ...
n = int(input()) ans = 0 nex = 0 for i in range(n): now = int(input()) if nex == 1 and now > 0: now -= 1 nex = 0 ans += 1 elif nex == 1 and now == 0: nex = 0 ans += now//2 if now % 2 == 1: nex = 1 print(ans)