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
s297994324
p01109
u725998488
1538663290
Python
Python3
py
Accepted
60
6616
228
while True: n = int(input()) if n == 0: break li = [int(i) for i in input().split()] mean = sum(li) / len(li) cnt = 0 for i in li: if float(i) <= mean: cnt += 1 print(cnt)
p01109
<h3>Income Inequality</h3> <!-- end en only --> <!-- begin en only --> <p> We often compute the average as the first step in processing statistical data. Yes, the average is a good tendency measure of data, but it is not always the best. In some cases, the average may hinder the understanding of the data. </p> <p> ...
7 15 15 15 15 15 15 15 4 10 20 30 60 10 1 1 1 1 1 1 1 1 1 100 7 90 90 90 90 90 90 10 7 2 7 1 8 2 8 4 0
7 3 9 1 4
25,644
s041100431
p01109
u546285759
1534323114
Python
Python3
py
Accepted
50
6620
196
ans = [] while True: n = int(input()) if n == 0: break a = list(map(int, input().split())) avg = sum(a) / n ans.append(sum(avg >= x for x in a)) print(*ans, sep="\n")
p01109
<h3>Income Inequality</h3> <!-- end en only --> <!-- begin en only --> <p> We often compute the average as the first step in processing statistical data. Yes, the average is a good tendency measure of data, but it is not always the best. In some cases, the average may hinder the understanding of the data. </p> <p> ...
7 15 15 15 15 15 15 15 4 10 20 30 60 10 1 1 1 1 1 1 1 1 1 100 7 90 90 90 90 90 90 10 7 2 7 1 8 2 8 4 0
7 3 9 1 4
25,645
s020717958
p01109
u938878704
1533618176
Python
Python3
py
Accepted
50
6612
259
res = [] while True : n = int(input()) if n == 0 : break else : li = [int(x) for x in input().split()] avg = sum(li) / n res.append(sum([1 if x <= avg else 0 for x in li])) for r in res : print(r)
p01109
<h3>Income Inequality</h3> <!-- end en only --> <!-- begin en only --> <p> We often compute the average as the first step in processing statistical data. Yes, the average is a good tendency measure of data, but it is not always the best. In some cases, the average may hinder the understanding of the data. </p> <p> ...
7 15 15 15 15 15 15 15 4 10 20 30 60 10 1 1 1 1 1 1 1 1 1 100 7 90 90 90 90 90 90 10 7 2 7 1 8 2 8 4 0
7 3 9 1 4
25,646
s701299071
p01109
u260980560
1532862024
Python
Python3
py
Accepted
50
6608
232
ans = [] while 1: N = int(input()) if N == 0: break *A, = map(int, input().split()) s = sum(A) cnt = 0 for a in A: if a*N <= s: cnt += 1 ans.append(cnt) print(*ans, sep='\n')
p01109
<h3>Income Inequality</h3> <!-- end en only --> <!-- begin en only --> <p> We often compute the average as the first step in processing statistical data. Yes, the average is a good tendency measure of data, but it is not always the best. In some cases, the average may hinder the understanding of the data. </p> <p> ...
7 15 15 15 15 15 15 15 4 10 20 30 60 10 1 1 1 1 1 1 1 1 1 100 7 90 90 90 90 90 90 10 7 2 7 1 8 2 8 4 0
7 3 9 1 4
25,647
s763567641
p01110
u300645821
1531401994
Python
Python
py
Accepted
60
4716
555
#!/usr/bin/python import sys def f(a,n): a=[list(e) for e in a] for j in range(len(a)): for i in range(n): if n+i>=len(a[j]): a[j].append(a[j][n-1-i]) else: a[j][n+i]+=a[j][n-1-i] a[j]=a[j][n:] return a def g(a,n): return list(zip(*f(list(zip(*a)),n))) while True: n,m,t,p=map(int,sys.stdin.read...
p01110
<h3>Origami, or the art of folding paper</h3> <!-- end en only --> <!-- begin en only --> <p> Master Grus is a famous <i>origami</i> (paper folding) artist, who is enthusiastic about exploring the possibility of origami art. For future creation, he is now planning fundamental experiments to establish the general the...
2 1 1 1 1 1 0 0 1 3 2 1 2 1 2 1 0 0 10 8 3 2 2 2 1 3 1 1 0 1 3 4 3 3 3 2 1 2 2 1 1 1 0 1 0 0 0 0 0 0
2 3 8 1 3 6
25,648
s430539340
p01110
u300645821
1531402005
Python
Python3
py
Accepted
90
5784
555
#!/usr/bin/python import sys def f(a,n): a=[list(e) for e in a] for j in range(len(a)): for i in range(n): if n+i>=len(a[j]): a[j].append(a[j][n-1-i]) else: a[j][n+i]+=a[j][n-1-i] a[j]=a[j][n:] return a def g(a,n): return list(zip(*f(list(zip(*a)),n))) while True: n,m,t,p=map(int,sys.stdin.read...
p01110
<h3>Origami, or the art of folding paper</h3> <!-- end en only --> <!-- begin en only --> <p> Master Grus is a famous <i>origami</i> (paper folding) artist, who is enthusiastic about exploring the possibility of origami art. For future creation, he is now planning fundamental experiments to establish the general the...
2 1 1 1 1 1 0 0 1 3 2 1 2 1 2 1 0 0 10 8 3 2 2 2 1 3 1 1 0 1 3 4 3 3 3 2 1 2 2 1 1 1 0 1 0 0 0 0 0 0
2 3 8 1 3 6
25,649
s356274389
p01110
u509278866
1595987543
Python
Python3
py
Accepted
100
9168
2,689
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,copy,functools import time,random,resource sys.setrecursionlimit(10**7) inf = 10**20 eps = 1.0 / 10**10 mod = 10**9+7 mod2 = 998244353 dd = [(-1,0),(0,1),(1,0),(0,-1)] ddn = [(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)] def LI(): r...
p01110
<h3>Origami, or the art of folding paper</h3> <!-- end en only --> <!-- begin en only --> <p> Master Grus is a famous <i>origami</i> (paper folding) artist, who is enthusiastic about exploring the possibility of origami art. For future creation, he is now planning fundamental experiments to establish the general the...
2 1 1 1 1 1 0 0 1 3 2 1 2 1 2 1 0 0 10 8 3 2 2 2 1 3 1 1 0 1 3 4 3 3 3 2 1 2 2 1 1 1 0 1 0 0 0 0 0 0
2 3 8 1 3 6
25,650
s395234901
p01110
u464321546
1562816400
Python
Python3
py
Accepted
60
5628
1,126
def main(n, m, t, p): dpn = [1] * n dpm = [1] * m ldpn = n ldpm = m for _ in range(t): d, c = map(int, input().split()) if d == 1: if ldpn // 2 < c: for i in range(ldpn - c): dpn[c - i - 1] += dpn[c + i] dpn = dpn[c - 1:...
p01110
<h3>Origami, or the art of folding paper</h3> <!-- end en only --> <!-- begin en only --> <p> Master Grus is a famous <i>origami</i> (paper folding) artist, who is enthusiastic about exploring the possibility of origami art. For future creation, he is now planning fundamental experiments to establish the general the...
2 1 1 1 1 1 0 0 1 3 2 1 2 1 2 1 0 0 10 8 3 2 2 2 1 3 1 1 0 1 3 4 3 3 3 2 1 2 2 1 1 1 0 1 0 0 0 0 0 0
2 3 8 1 3 6
25,651
s137694874
p01110
u449777933
1561114019
Python
Python3
py
Accepted
80
5792
1,290
import sys def input(): return sys.stdin.readline().strip() def INT(): return int(input()) def LIST(): return list(map(int, input().split())) def MAP(): return map(int, input().split()) def remove_left(M, c): for i in range(len(M)): M[i] = M[i][c:] return M def remove_bottom(M, c): M = M[:len(M)-c] return M de...
p01110
<h3>Origami, or the art of folding paper</h3> <!-- end en only --> <!-- begin en only --> <p> Master Grus is a famous <i>origami</i> (paper folding) artist, who is enthusiastic about exploring the possibility of origami art. For future creation, he is now planning fundamental experiments to establish the general the...
2 1 1 1 1 1 0 0 1 3 2 1 2 1 2 1 0 0 10 8 3 2 2 2 1 3 1 1 0 1 3 4 3 3 3 2 1 2 2 1 1 1 0 1 0 0 0 0 0 0
2 3 8 1 3 6
25,652
s574665890
p01110
u135085051
1560149388
Python
Python3
py
Accepted
90
5784
677
# origami import sys input = sys.stdin.readline def f(a, n): a = [list(e) for e in a] for j in range(len(a)): for i in range(n): if n + i >= len(a[j]): a[j].append(a[j][n-1-i]) else: a[j][n+i] += a[j][n-1-i] a[j] = a[j][n:] return a ...
p01110
<h3>Origami, or the art of folding paper</h3> <!-- end en only --> <!-- begin en only --> <p> Master Grus is a famous <i>origami</i> (paper folding) artist, who is enthusiastic about exploring the possibility of origami art. For future creation, he is now planning fundamental experiments to establish the general the...
2 1 1 1 1 1 0 0 1 3 2 1 2 1 2 1 0 0 10 8 3 2 2 2 1 3 1 1 0 1 3 4 3 3 3 2 1 2 2 1 1 1 0 1 0 0 0 0 0 0
2 3 8 1 3 6
25,653
s485688714
p01110
u886122084
1558242464
Python
Python3
py
Accepted
70
5888
2,265
# python template for atcoder1 import sys sys.setrecursionlimit(10**9) input = sys.stdin.readline def solve(): grid_wid, grid_hei, t, p = map(int, input().split()) if grid_wid == 0: exit() grid = [[1]*grid_wid for _ in range(grid_hei)] fold = [list(map(int, input().split())) for _ in range(t)...
p01110
<h3>Origami, or the art of folding paper</h3> <!-- end en only --> <!-- begin en only --> <p> Master Grus is a famous <i>origami</i> (paper folding) artist, who is enthusiastic about exploring the possibility of origami art. For future creation, he is now planning fundamental experiments to establish the general the...
2 1 1 1 1 1 0 0 1 3 2 1 2 1 2 1 0 0 10 8 3 2 2 2 1 3 1 1 0 1 3 4 3 3 3 2 1 2 2 1 1 1 0 1 0 0 0 0 0 0
2 3 8 1 3 6
25,654
s220737817
p01110
u009288816
1533453543
Python
Python3
py
Accepted
100
5640
1,549
while True: data = [int(x) for x in input().split()] if data == [0, 0, 0, 0]: break matrix = [[1 for x in range(data[0])] for y in range(data[1])] #print('Matrix :', len(matrix), len(matrix[0])) n = data[2] + data[3] command = list() while n > 0: command.append([int(x) for x in input().split()]) n -= 1 fl...
p01110
<h3>Origami, or the art of folding paper</h3> <!-- end en only --> <!-- begin en only --> <p> Master Grus is a famous <i>origami</i> (paper folding) artist, who is enthusiastic about exploring the possibility of origami art. For future creation, he is now planning fundamental experiments to establish the general the...
2 1 1 1 1 1 0 0 1 3 2 1 2 1 2 1 0 0 10 8 3 2 2 2 1 3 1 1 0 1 3 4 3 3 3 2 1 2 2 1 1 1 0 1 0 0 0 0 0 0
2 3 8 1 3 6
25,655
s919565051
p01113
u260980560
1532868380
Python
Python3
py
Accepted
90
5716
417
ans = [] while 1: N = int(input()) if N == 0: break B = int("1" + input(), 2) bd = 1 << 53 su = B ep = 0 while B: k = (bd - su + B - 1) // B if N < k: su += N*B break su += k*B N -= k ep += 1 B >>= 1 su ...
p01113
<h3>Floating-Point Numbers</h3> <!-- end en only --> <!-- begin en only --> <p> In this problem, we consider floating-point number formats, data representation formats to approximate real numbers on computers. </p> <!-- end en only --> <!-- begin en only --> <p> Scientific notation is a method to express a number, ...
1 0000000000000000000000000000000000000000000000000000 2 0000000000000000000000000000000000000000000000000000 3 0000000000000000000000000000000000000000000000000000 4 0000000000000000000000000000000000000000000000000000 7 1101000000000000000000000000000000000000000000000000 100 11000110101000011001111001010001110010011...
0000000000010000000000000000000000000000000000000000000000000000 0000000000011000000000000000000000000000000000000000000000000000 0000000000100000000000000000000000000000000000000000000000000000 0000000000100100000000000000000000000000000000000000000000000000 000000000011110100000000000000000000000000000000000000000000...
25,656
s036428194
p01117
u737337423
1592927165
Python
Python3
py
Accepted
80
7736
449
def main(): import sys from itertools import chain while True: n, m = map(int, sys.stdin.readline().split()) if n == m == 0: break A = list(chain.from_iterable(map(int, sys.stdin.readline().split()) for _ in range(m))) ans = 0 for i in range(n): ...
p01117
<!-- begin en only --> <h3>Scores of Final Examination</h3> <!-- end en only --> <!-- begin en only --> <p> I am a junior high school teacher. The final examination has just finished, and I have all the students' scores of all the subjects. I want to know the highest total score among the students, but it is not an ea...
5 2 10 20 30 40 50 15 25 35 45 55 6 3 10 20 30 15 25 35 21 34 11 52 20 18 31 15 42 10 21 19 4 2 0 0 0 0 0 0 0 0 0 0
105 83 0
25,657
s704780949
p01117
u761828680
1572989181
Python
Python
py
Accepted
100
4700
261
while True: n, m = map(int,raw_input().split(' ')) if n == 0: break scores = [0] * n for i in range(m): j = 0 for s in map(int,raw_input().split(' ')): scores[j] += s j += 1 print max(scores)
p01117
<!-- begin en only --> <h3>Scores of Final Examination</h3> <!-- end en only --> <!-- begin en only --> <p> I am a junior high school teacher. The final examination has just finished, and I have all the students' scores of all the subjects. I want to know the highest total score among the students, but it is not an ea...
5 2 10 20 30 40 50 15 25 35 45 55 6 3 10 20 30 15 25 35 21 34 11 52 20 18 31 15 42 10 21 19 4 2 0 0 0 0 0 0 0 0 0 0
105 83 0
25,658
s221830501
p01117
u811733736
1572140667
Python
Python3
py
Accepted
100
7712
489
# -*- coding: utf-8 -*- """ 期末試験の成績 https://onlinejudge.u-aizu.ac.jp/challenges/sources/ICPC/Prelim/1632 """ import sys def solve(n, m): scores = [[int(x) for x in input().split()] for _ in range(m)] return max([sum(z) for z in zip(*scores)]) def main(args): while True: n, m = map(int, input()....
p01117
<!-- begin en only --> <h3>Scores of Final Examination</h3> <!-- end en only --> <!-- begin en only --> <p> I am a junior high school teacher. The final examination has just finished, and I have all the students' scores of all the subjects. I want to know the highest total score among the students, but it is not an ea...
5 2 10 20 30 40 50 15 25 35 45 55 6 3 10 20 30 15 25 35 21 34 11 52 20 18 31 15 42 10 21 19 4 2 0 0 0 0 0 0 0 0 0 0
105 83 0
25,659
s456170237
p01117
u784856415
1565656125
Python
Python3
py
Accepted
100
8608
465
import os,re,sys,operator from collections import Counter,deque from operator import itemgetter from itertools import accumulate,combinations,groupby from sys import stdin,setrecursionlimit from copy import deepcopy import heapq setrecursionlimit(10**6) while 1: n,m=map(int,stdin.readline().rstrip().split()) i...
p01117
<!-- begin en only --> <h3>Scores of Final Examination</h3> <!-- end en only --> <!-- begin en only --> <p> I am a junior high school teacher. The final examination has just finished, and I have all the students' scores of all the subjects. I want to know the highest total score among the students, but it is not an ea...
5 2 10 20 30 40 50 15 25 35 45 55 6 3 10 20 30 15 25 35 21 34 11 52 20 18 31 15 42 10 21 19 4 2 0 0 0 0 0 0 0 0 0 0
105 83 0
25,660
s772845407
p01118
u244636821
1572743706
Python
Python3
py
Accepted
80
6948
1,088
#!/usr/bin/python3 import array from fractions import Fraction import functools import itertools import math import os import sys def main(): while True: H, W = read_ints() if (H, W) == (0, 0): break R = [inp() for _ in range(H)] S = inp() print(solve(H, W, R, ...
p01118
<!--<h2>Problem B</h2>--> <!-- begin en only --> <h3>On-Screen Keyboard</h3> <!-- end en only --> <!-- begin en only --> <p> You are to input a string with an OSK (on-screen keyboard). A remote control with five buttons, four arrows and an OK (Fig. B-1), is used for the OSK. Find the minimum number o...
3 9 ABCDEFGHI JKLMNOPQR STUVWXYZ_ ICPC 5 11 ___________ ____A______ ________M__ ___________ _C_________ ACM 4 21 1_2_3_4_5_6_7_8_9_0_- QqWwEeRrTtYyUuIiOoPp@ AaSsDdFfGgHhJjKkLl;_: ZzXxCcVvBbNnMm,_._/__ ICPC2019,AsiaYokohamaRegional,QualificationRound 0 0
28 23 493
25,661
s879290113
p01118
u811733736
1572141469
Python
Python3
py
Accepted
80
5632
676
# -*- coding: utf-8 -*- """ スクリーンキーボード https://onlinejudge.u-aizu.ac.jp/challenges/sources/ICPC/Prelim/1633 """ import sys def solve(h, w): keyboard = dict() for y in range(h): for x, ch in enumerate(input()): keyboard[ch] = (x, y) cx, cy = 0, 0 ans = 0 for ch in input(): ...
p01118
<!--<h2>Problem B</h2>--> <!-- begin en only --> <h3>On-Screen Keyboard</h3> <!-- end en only --> <!-- begin en only --> <p> You are to input a string with an OSK (on-screen keyboard). A remote control with five buttons, four arrows and an OK (Fig. B-1), is used for the OSK. Find the minimum number o...
3 9 ABCDEFGHI JKLMNOPQR STUVWXYZ_ ICPC 5 11 ___________ ____A______ ________M__ ___________ _C_________ ACM 4 21 1_2_3_4_5_6_7_8_9_0_- QqWwEeRrTtYyUuIiOoPp@ AaSsDdFfGgHhJjKkLl;_: ZzXxCcVvBbNnMm,_._/__ ICPC2019,AsiaYokohamaRegional,QualificationRound 0 0
28 23 493
25,662
s673984045
p01125
u943441430
1545365788
Python
Python3
py
Accepted
60
5660
1,173
import sys def move(cmd, gems): n = 0 x = y = 10 for c in cmd: d = c[0] l = c[1] for s in range(0, l): if d == "N": y += 1 elif d == "E": x += 1 elif d == "S": y -= 1 elif d == "W": ...
p01125
<h1>Mysterious Gems</h1> <p> 宇宙暦 1603〜1867 年,人々はその時代のことを EDO 時代と呼ぶ.EDO とは当時最先端の宇宙航行技術,Enhanced Driving Operation のことであり、1603 年に Dr.Izy によって開発された. </p> <p> あなたは宇宙冒険家であり,宇宙を飛び回って様々な惑星を冒険していた.その冒険の途中で,あなたはとても不思議な惑星を発見した.その惑星には,至るところに七色に輝く不思議な宝石が落ちていた.あなたはその惑星への降下を試みようと考えたが,重大な問題のためにそれは不可能であることがわかった.その惑星の空気には,人間が触れただけで...
2 10 11 11 12 2 N 2 E 1 2 10 11 11 12 2 N 2 W 1 3 0 15 5 10 5 15 5 W 10 S 10 N 20 E 10 S 10 0
Yes No No
25,663
s858524681
p01125
u046108504
1555789275
Python
Python3
py
Accepted
90
5620
1,118
def move(hougaku, zahyo): if hougaku == "N": zahyo[1] += 1 elif hougaku == "E": zahyo[0] += 1 elif hougaku == "S": zahyo[1] -= 1 elif hougaku == "W": zahyo[0] -= 1 while True: N = int(input()) if N == 0: break jewelry = [list(map(int, input().split()...
p01125
<h1>Mysterious Gems</h1> <p> 宇宙暦 1603〜1867 年,人々はその時代のことを EDO 時代と呼ぶ.EDO とは当時最先端の宇宙航行技術,Enhanced Driving Operation のことであり、1603 年に Dr.Izy によって開発された. </p> <p> あなたは宇宙冒険家であり,宇宙を飛び回って様々な惑星を冒険していた.その冒険の途中で,あなたはとても不思議な惑星を発見した.その惑星には,至るところに七色に輝く不思議な宝石が落ちていた.あなたはその惑星への降下を試みようと考えたが,重大な問題のためにそれは不可能であることがわかった.その惑星の空気には,人間が触れただけで...
2 10 11 11 12 2 N 2 E 1 2 10 11 11 12 2 N 2 W 1 3 0 15 5 10 5 15 5 W 10 S 10 N 20 E 10 S 10 0
Yes No No
25,664
s021329653
p01125
u296492699
1409861059
Python
Python
py
Accepted
50
4276
814
while True: num_hoseki=input() if num_hoseki==0: break hoseki_list=[] for i in range(num_hoseki): hoseki_list.append(map(int,raw_input().split())) num_meirei=input() keiro=[] x,y=[10,10] for i in range(num_meirei): meirei=raw_input() ...
p01125
<h1>Mysterious Gems</h1> <p> 宇宙暦 1603〜1867 年,人々はその時代のことを EDO 時代と呼ぶ.EDO とは当時最先端の宇宙航行技術,Enhanced Driving Operation のことであり、1603 年に Dr.Izy によって開発された. </p> <p> あなたは宇宙冒険家であり,宇宙を飛び回って様々な惑星を冒険していた.その冒険の途中で,あなたはとても不思議な惑星を発見した.その惑星には,至るところに七色に輝く不思議な宝石が落ちていた.あなたはその惑星への降下を試みようと考えたが,重大な問題のためにそれは不可能であることがわかった.その惑星の空気には,人間が触れただけで...
2 10 11 11 12 2 N 2 E 1 2 10 11 11 12 2 N 2 W 1 3 0 15 5 10 5 15 5 W 10 S 10 N 20 E 10 S 10 0
Yes No No
25,665
s082841544
p01125
u978831775
1415023472
Python
Python
py
Accepted
50
4308
1,169
# coding: utf-8 class Mission: def __init__(self): self.field = [[0]*21 for i in range(21)] self.x = 10 self.y = 10 def get_gem(self, x, y): self.field[x][y] = 0 def put_gem(self, x, y): self.field[x][y] = 1 def move_x(self, step, sign=1): for i in range(1,step+1): self.get_gem(self....
p01125
<h1>Mysterious Gems</h1> <p> 宇宙暦 1603〜1867 年,人々はその時代のことを EDO 時代と呼ぶ.EDO とは当時最先端の宇宙航行技術,Enhanced Driving Operation のことであり、1603 年に Dr.Izy によって開発された. </p> <p> あなたは宇宙冒険家であり,宇宙を飛び回って様々な惑星を冒険していた.その冒険の途中で,あなたはとても不思議な惑星を発見した.その惑星には,至るところに七色に輝く不思議な宝石が落ちていた.あなたはその惑星への降下を試みようと考えたが,重大な問題のためにそれは不可能であることがわかった.その惑星の空気には,人間が触れただけで...
2 10 11 11 12 2 N 2 E 1 2 10 11 11 12 2 N 2 W 1 3 0 15 5 10 5 15 5 W 10 S 10 N 20 E 10 S 10 0
Yes No No
25,666
s303712632
p01125
u966364923
1419349173
Python
Python3
py
Accepted
90
6768
910
while True: rx = 10 ry = 10 n = int(input()) if n == 0: exit() gems = [[0 for j in range(21)] for i in range(21)] for _ in range(n): (x, y) = [int(x) for x in input().split()] gems[x][y] = 1 m = int(input()) for _ in range(m): (d, l) = input().split() ...
p01125
<h1>Mysterious Gems</h1> <p> 宇宙暦 1603〜1867 年,人々はその時代のことを EDO 時代と呼ぶ.EDO とは当時最先端の宇宙航行技術,Enhanced Driving Operation のことであり、1603 年に Dr.Izy によって開発された. </p> <p> あなたは宇宙冒険家であり,宇宙を飛び回って様々な惑星を冒険していた.その冒険の途中で,あなたはとても不思議な惑星を発見した.その惑星には,至るところに七色に輝く不思議な宝石が落ちていた.あなたはその惑星への降下を試みようと考えたが,重大な問題のためにそれは不可能であることがわかった.その惑星の空気には,人間が触れただけで...
2 10 11 11 12 2 N 2 E 1 2 10 11 11 12 2 N 2 W 1 3 0 15 5 10 5 15 5 W 10 S 10 N 20 E 10 S 10 0
Yes No No
25,667
s485852606
p01125
u617183767
1420196447
Python
Python
py
Accepted
50
4712
1,527
#! /usr/bin/env python # -*- coding: utf-8 -*- import os import sys import itertools import math from collections import Counter, defaultdict class Main(object): def __init__(self): pass def solve(self): ''' insert your code ''' while True: n = input()...
p01125
<h1>Mysterious Gems</h1> <p> 宇宙暦 1603〜1867 年,人々はその時代のことを EDO 時代と呼ぶ.EDO とは当時最先端の宇宙航行技術,Enhanced Driving Operation のことであり、1603 年に Dr.Izy によって開発された. </p> <p> あなたは宇宙冒険家であり,宇宙を飛び回って様々な惑星を冒険していた.その冒険の途中で,あなたはとても不思議な惑星を発見した.その惑星には,至るところに七色に輝く不思議な宝石が落ちていた.あなたはその惑星への降下を試みようと考えたが,重大な問題のためにそれは不可能であることがわかった.その惑星の空気には,人間が触れただけで...
2 10 11 11 12 2 N 2 E 1 2 10 11 11 12 2 N 2 W 1 3 0 15 5 10 5 15 5 W 10 S 10 N 20 E 10 S 10 0
Yes No No
25,668
s281816994
p01125
u316268279
1420525051
Python
Python3
py
Accepted
90
6780
607
#!/usr/bin/env python # -*- coding: utf-8 -*- while True: n = int(input()) if n == 0: break gem = [tuple(map(int,input().split(" "))) for i in range(0,n)] robot = (10,10) direct = {'N' : 0,'E' : 1,'W' : 2, 'S' : 3} dxdy = [(0,1),(1,0),(-1,0),(0,-1)] for i in range(int(input())): ...
p01125
<h1>Mysterious Gems</h1> <p> 宇宙暦 1603〜1867 年,人々はその時代のことを EDO 時代と呼ぶ.EDO とは当時最先端の宇宙航行技術,Enhanced Driving Operation のことであり、1603 年に Dr.Izy によって開発された. </p> <p> あなたは宇宙冒険家であり,宇宙を飛び回って様々な惑星を冒険していた.その冒険の途中で,あなたはとても不思議な惑星を発見した.その惑星には,至るところに七色に輝く不思議な宝石が落ちていた.あなたはその惑星への降下を試みようと考えたが,重大な問題のためにそれは不可能であることがわかった.その惑星の空気には,人間が触れただけで...
2 10 11 11 12 2 N 2 E 1 2 10 11 11 12 2 N 2 W 1 3 0 15 5 10 5 15 5 W 10 S 10 N 20 E 10 S 10 0
Yes No No
25,669
s767902530
p01125
u120360464
1421826325
Python
Python
py
Accepted
80
4272
653
#! /usr/bin/python # -*- coding: utf-8 -*- N = int(raw_input()) while N != 0: p = [] a = [] for i in range(N): p.append(map(int, raw_input().split())) M = int(raw_input()) for i in range(M): a.append(raw_input().split()) cnt = 0 used = [False]*N cur = [10, 10] for i in range(M): for j in range(int(a[i][...
p01125
<h1>Mysterious Gems</h1> <p> 宇宙暦 1603〜1867 年,人々はその時代のことを EDO 時代と呼ぶ.EDO とは当時最先端の宇宙航行技術,Enhanced Driving Operation のことであり、1603 年に Dr.Izy によって開発された. </p> <p> あなたは宇宙冒険家であり,宇宙を飛び回って様々な惑星を冒険していた.その冒険の途中で,あなたはとても不思議な惑星を発見した.その惑星には,至るところに七色に輝く不思議な宝石が落ちていた.あなたはその惑星への降下を試みようと考えたが,重大な問題のためにそれは不可能であることがわかった.その惑星の空気には,人間が触れただけで...
2 10 11 11 12 2 N 2 E 1 2 10 11 11 12 2 N 2 W 1 3 0 15 5 10 5 15 5 W 10 S 10 N 20 E 10 S 10 0
Yes No No
25,670
s519279978
p01125
u731235119
1421833881
Python
Python
py
Accepted
50
4296
712
while 1: n = int(raw_input()) if n == 0: break search_map = [[0 for i in range(21)] for i in range(21)] for i in range(n): x, y = map(int,raw_input().split(" ")) search_map[y][x] = 1 here = [10,10] m = int(raw_input()) for i in range(m): d, l = raw_input().split(" ") l = int(l) l_sign = 1 if d == ...
p01125
<h1>Mysterious Gems</h1> <p> 宇宙暦 1603〜1867 年,人々はその時代のことを EDO 時代と呼ぶ.EDO とは当時最先端の宇宙航行技術,Enhanced Driving Operation のことであり、1603 年に Dr.Izy によって開発された. </p> <p> あなたは宇宙冒険家であり,宇宙を飛び回って様々な惑星を冒険していた.その冒険の途中で,あなたはとても不思議な惑星を発見した.その惑星には,至るところに七色に輝く不思議な宝石が落ちていた.あなたはその惑星への降下を試みようと考えたが,重大な問題のためにそれは不可能であることがわかった.その惑星の空気には,人間が触れただけで...
2 10 11 11 12 2 N 2 E 1 2 10 11 11 12 2 N 2 W 1 3 0 15 5 10 5 15 5 W 10 S 10 N 20 E 10 S 10 0
Yes No No
25,671
s528319173
p01125
u266872031
1422112088
Python
Python
py
Accepted
40
4300
1,373
while(1): N=int(raw_input()) if N==0: break else: gems=[] okflag=0 loc=[10,10] for i in range(N): [gemx,gemy]=[int(x) for x in raw_input().split()] gems.append([gemx,gemy]) M=int(raw_input()) for i in range(M): com=r...
p01125
<h1>Mysterious Gems</h1> <p> 宇宙暦 1603〜1867 年,人々はその時代のことを EDO 時代と呼ぶ.EDO とは当時最先端の宇宙航行技術,Enhanced Driving Operation のことであり、1603 年に Dr.Izy によって開発された. </p> <p> あなたは宇宙冒険家であり,宇宙を飛び回って様々な惑星を冒険していた.その冒険の途中で,あなたはとても不思議な惑星を発見した.その惑星には,至るところに七色に輝く不思議な宝石が落ちていた.あなたはその惑星への降下を試みようと考えたが,重大な問題のためにそれは不可能であることがわかった.その惑星の空気には,人間が触れただけで...
2 10 11 11 12 2 N 2 E 1 2 10 11 11 12 2 N 2 W 1 3 0 15 5 10 5 15 5 W 10 S 10 N 20 E 10 S 10 0
Yes No No
25,672
s985437313
p01125
u124909914
1425016442
Python
Python3
py
Accepted
90
6784
885
#!/usr/bin/python3 while True: n = int(input()) if n == 0 : break gems = [] for i in range(n): gem = tuple(map(int, input().split())) gems.append(gem) m = int(input()) bot = [10, 10] history = [(10, 10)] for j in range(m): move = list(input().split()) ...
p01125
<h1>Mysterious Gems</h1> <p> 宇宙暦 1603〜1867 年,人々はその時代のことを EDO 時代と呼ぶ.EDO とは当時最先端の宇宙航行技術,Enhanced Driving Operation のことであり、1603 年に Dr.Izy によって開発された. </p> <p> あなたは宇宙冒険家であり,宇宙を飛び回って様々な惑星を冒険していた.その冒険の途中で,あなたはとても不思議な惑星を発見した.その惑星には,至るところに七色に輝く不思議な宝石が落ちていた.あなたはその惑星への降下を試みようと考えたが,重大な問題のためにそれは不可能であることがわかった.その惑星の空気には,人間が触れただけで...
2 10 11 11 12 2 N 2 E 1 2 10 11 11 12 2 N 2 W 1 3 0 15 5 10 5 15 5 W 10 S 10 N 20 E 10 S 10 0
Yes No No
25,673
s842139924
p01125
u753085696
1425890328
Python
Python
py
Accepted
60
4292
848
# your code goes here while True: n = raw_input() if n == "0": break n = int(n) jewels = [] for i in xrange(n): string = raw_input() x = string.split(" ") jewels.append(tuple(map(lambda y : int(y), x))) m = raw_input() m = int(m) ops = [] for j in xrange(m): string = raw_input() x = string...
p01125
<h1>Mysterious Gems</h1> <p> 宇宙暦 1603〜1867 年,人々はその時代のことを EDO 時代と呼ぶ.EDO とは当時最先端の宇宙航行技術,Enhanced Driving Operation のことであり、1603 年に Dr.Izy によって開発された. </p> <p> あなたは宇宙冒険家であり,宇宙を飛び回って様々な惑星を冒険していた.その冒険の途中で,あなたはとても不思議な惑星を発見した.その惑星には,至るところに七色に輝く不思議な宝石が落ちていた.あなたはその惑星への降下を試みようと考えたが,重大な問題のためにそれは不可能であることがわかった.その惑星の空気には,人間が触れただけで...
2 10 11 11 12 2 N 2 E 1 2 10 11 11 12 2 N 2 W 1 3 0 15 5 10 5 15 5 W 10 S 10 N 20 E 10 S 10 0
Yes No No
25,674
s900821416
p01125
u567380442
1427536353
Python
Python3
py
Accepted
70
6800
618
import sys f = sys.stdin func = { 'N':lambda x, y:(x, y + 1), 'S':lambda x, y:(x, y - 1), 'E':lambda x, y:(x + 1, y), 'W':lambda x, y:(x - 1, y)} while True: n = int(f.readline()) if n == 0: break gems = {tuple(map(int, f.readline().split())):False for _ in range(n)} m = int(f.readline()) ...
p01125
<h1>Mysterious Gems</h1> <p> 宇宙暦 1603〜1867 年,人々はその時代のことを EDO 時代と呼ぶ.EDO とは当時最先端の宇宙航行技術,Enhanced Driving Operation のことであり、1603 年に Dr.Izy によって開発された. </p> <p> あなたは宇宙冒険家であり,宇宙を飛び回って様々な惑星を冒険していた.その冒険の途中で,あなたはとても不思議な惑星を発見した.その惑星には,至るところに七色に輝く不思議な宝石が落ちていた.あなたはその惑星への降下を試みようと考えたが,重大な問題のためにそれは不可能であることがわかった.その惑星の空気には,人間が触れただけで...
2 10 11 11 12 2 N 2 E 1 2 10 11 11 12 2 N 2 W 1 3 0 15 5 10 5 15 5 W 10 S 10 N 20 E 10 S 10 0
Yes No No
25,675
s600567550
p01125
u260980560
1430134368
Python
Python
py
Accepted
50
4264
633
comm = { 'N': ( 0, 1), 'E': ( 1, 0), 'W': (-1, 0), 'S': ( 0,-1), } while True: n = input() if n==0: break p = [[0]*21 for i in xrange(21)] for i in xrange(n): x, y = map(int, raw_input().split()) p[y][x] = 1 m = input() px, py = 10,...
p01125
<h1>Mysterious Gems</h1> <p> 宇宙暦 1603〜1867 年,人々はその時代のことを EDO 時代と呼ぶ.EDO とは当時最先端の宇宙航行技術,Enhanced Driving Operation のことであり、1603 年に Dr.Izy によって開発された. </p> <p> あなたは宇宙冒険家であり,宇宙を飛び回って様々な惑星を冒険していた.その冒険の途中で,あなたはとても不思議な惑星を発見した.その惑星には,至るところに七色に輝く不思議な宝石が落ちていた.あなたはその惑星への降下を試みようと考えたが,重大な問題のためにそれは不可能であることがわかった.その惑星の空気には,人間が触れただけで...
2 10 11 11 12 2 N 2 E 1 2 10 11 11 12 2 N 2 W 1 3 0 15 5 10 5 15 5 W 10 S 10 N 20 E 10 S 10 0
Yes No No
25,676
s057017049
p01125
u998188826
1441282417
Python
Python3
py
Accepted
100
7724
504
dirs = { 'N': (0, 1), 'E': (1, 0), 'S': (0, -1), 'W': (-1, 0)} while True: area = [[False for j in range(21)] for i in range(21)] n = int(input()) if n == 0: break for i in range(n): x, y = map(int, input().split()) area[x][y] = True (x, y) = (10, 10) count = 0 for i in range(int(input())): d, l = inp...
p01125
<h1>Mysterious Gems</h1> <p> 宇宙暦 1603〜1867 年,人々はその時代のことを EDO 時代と呼ぶ.EDO とは当時最先端の宇宙航行技術,Enhanced Driving Operation のことであり、1603 年に Dr.Izy によって開発された. </p> <p> あなたは宇宙冒険家であり,宇宙を飛び回って様々な惑星を冒険していた.その冒険の途中で,あなたはとても不思議な惑星を発見した.その惑星には,至るところに七色に輝く不思議な宝石が落ちていた.あなたはその惑星への降下を試みようと考えたが,重大な問題のためにそれは不可能であることがわかった.その惑星の空気には,人間が触れただけで...
2 10 11 11 12 2 N 2 E 1 2 10 11 11 12 2 N 2 W 1 3 0 15 5 10 5 15 5 W 10 S 10 N 20 E 10 S 10 0
Yes No No
25,677
s597974408
p01125
u488601719
1452310844
Python
Python
py
Accepted
50
6420
640
moves = {"N": (0, 1), "S": (0, -1), "E": (1, 0), "W": ( -1, 0)} while True: n = int(raw_input()) if n == 0: break houseki = set() pos = (10, 10) for i in range(n): x, y = map(int, raw_input().split()) houseki.add((x, y)) m = int(raw_input(...
p01125
<h1>Mysterious Gems</h1> <p> 宇宙暦 1603〜1867 年,人々はその時代のことを EDO 時代と呼ぶ.EDO とは当時最先端の宇宙航行技術,Enhanced Driving Operation のことであり、1603 年に Dr.Izy によって開発された. </p> <p> あなたは宇宙冒険家であり,宇宙を飛び回って様々な惑星を冒険していた.その冒険の途中で,あなたはとても不思議な惑星を発見した.その惑星には,至るところに七色に輝く不思議な宝石が落ちていた.あなたはその惑星への降下を試みようと考えたが,重大な問題のためにそれは不可能であることがわかった.その惑星の空気には,人間が触れただけで...
2 10 11 11 12 2 N 2 E 1 2 10 11 11 12 2 N 2 W 1 3 0 15 5 10 5 15 5 W 10 S 10 N 20 E 10 S 10 0
Yes No No
25,678
s055564465
p01125
u766163292
1459082317
Python
Python3
py
Accepted
90
8216
1,479
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import array import collections class Solver(object): deltas = {"N": (0, 1), "E": (1, 0), "S": (0, -1), "W": (-1, 0)} def __init__(self, gems, initial_point=(10, 10)): self.gems = gems self.current_point = initial_point self.visited = c...
p01125
<h1>Mysterious Gems</h1> <p> 宇宙暦 1603〜1867 年,人々はその時代のことを EDO 時代と呼ぶ.EDO とは当時最先端の宇宙航行技術,Enhanced Driving Operation のことであり、1603 年に Dr.Izy によって開発された. </p> <p> あなたは宇宙冒険家であり,宇宙を飛び回って様々な惑星を冒険していた.その冒険の途中で,あなたはとても不思議な惑星を発見した.その惑星には,至るところに七色に輝く不思議な宝石が落ちていた.あなたはその惑星への降下を試みようと考えたが,重大な問題のためにそれは不可能であることがわかった.その惑星の空気には,人間が触れただけで...
2 10 11 11 12 2 N 2 E 1 2 10 11 11 12 2 N 2 W 1 3 0 15 5 10 5 15 5 W 10 S 10 N 20 E 10 S 10 0
Yes No No
25,679
s442078527
p01125
u797673668
1460977725
Python
Python3
py
Accepted
80
7688
625
dm = {'N': (0, 1), 'S': (0, -1), 'E': (1, 0), 'W': (-1, 0)} while True: n = int(input()) if not n: break plain = [[False] * 21 for _ in range(21)] for _ in range(n): x, y = map(int, input().split()) plain[x][y] = True cx, cy = 10, 10 plain[10][10] = False m = int(i...
p01125
<h1>Mysterious Gems</h1> <p> 宇宙暦 1603〜1867 年,人々はその時代のことを EDO 時代と呼ぶ.EDO とは当時最先端の宇宙航行技術,Enhanced Driving Operation のことであり、1603 年に Dr.Izy によって開発された. </p> <p> あなたは宇宙冒険家であり,宇宙を飛び回って様々な惑星を冒険していた.その冒険の途中で,あなたはとても不思議な惑星を発見した.その惑星には,至るところに七色に輝く不思議な宝石が落ちていた.あなたはその惑星への降下を試みようと考えたが,重大な問題のためにそれは不可能であることがわかった.その惑星の空気には,人間が触れただけで...
2 10 11 11 12 2 N 2 E 1 2 10 11 11 12 2 N 2 W 1 3 0 15 5 10 5 15 5 W 10 S 10 N 20 E 10 S 10 0
Yes No No
25,680
s975647204
p01125
u228002579
1461085959
Python
Python
py
Accepted
70
6284
929
while True: n = int(raw_input()) if n == 0: break trea = [0]*n for i in range(n): trea[i] = map(int, raw_input().split()) x,y = 10,10 thr = [[0 for i in range(21)] for j in range(21)] m = int(raw_input()) for i in range(m): line = raw_input().split() d = int(line[...
p01125
<h1>Mysterious Gems</h1> <p> 宇宙暦 1603〜1867 年,人々はその時代のことを EDO 時代と呼ぶ.EDO とは当時最先端の宇宙航行技術,Enhanced Driving Operation のことであり、1603 年に Dr.Izy によって開発された. </p> <p> あなたは宇宙冒険家であり,宇宙を飛び回って様々な惑星を冒険していた.その冒険の途中で,あなたはとても不思議な惑星を発見した.その惑星には,至るところに七色に輝く不思議な宝石が落ちていた.あなたはその惑星への降下を試みようと考えたが,重大な問題のためにそれは不可能であることがわかった.その惑星の空気には,人間が触れただけで...
2 10 11 11 12 2 N 2 E 1 2 10 11 11 12 2 N 2 W 1 3 0 15 5 10 5 15 5 W 10 S 10 N 20 E 10 S 10 0
Yes No No
25,681
s299898625
p01125
u228002579
1461086360
Python
Python
py
Accepted
80
6324
714
while True: n = int(raw_input()) if n == 0: break trea = [0]*n for i in range(n): trea[i] = map(int, raw_input().split()) x,y = 10,10 thr = [[0 for i in range(21)] for j in range(21)] m = int(raw_input()) for i in range(m): line = raw_input().split() news = line[0...
p01125
<h1>Mysterious Gems</h1> <p> 宇宙暦 1603〜1867 年,人々はその時代のことを EDO 時代と呼ぶ.EDO とは当時最先端の宇宙航行技術,Enhanced Driving Operation のことであり、1603 年に Dr.Izy によって開発された. </p> <p> あなたは宇宙冒険家であり,宇宙を飛び回って様々な惑星を冒険していた.その冒険の途中で,あなたはとても不思議な惑星を発見した.その惑星には,至るところに七色に輝く不思議な宝石が落ちていた.あなたはその惑星への降下を試みようと考えたが,重大な問題のためにそれは不可能であることがわかった.その惑星の空気には,人間が触れただけで...
2 10 11 11 12 2 N 2 E 1 2 10 11 11 12 2 N 2 W 1 3 0 15 5 10 5 15 5 W 10 S 10 N 20 E 10 S 10 0
Yes No No
25,682
s365186743
p01125
u572790226
1463046533
Python
Python3
py
Accepted
100
7740
1,319
# -*- coding: utf-8 -*- """ Created on Thu May 12 18:42:47 2016 """ class Plane: def __init__(self, num_of_jewels): self.jewels = [] for i in range(21): self.jewels.append([False] * 21) self.nj = num_of_jewels self.robot = [10, 10] def putJewels(self, x, y): ...
p01125
<h1>Mysterious Gems</h1> <p> 宇宙暦 1603〜1867 年,人々はその時代のことを EDO 時代と呼ぶ.EDO とは当時最先端の宇宙航行技術,Enhanced Driving Operation のことであり、1603 年に Dr.Izy によって開発された. </p> <p> あなたは宇宙冒険家であり,宇宙を飛び回って様々な惑星を冒険していた.その冒険の途中で,あなたはとても不思議な惑星を発見した.その惑星には,至るところに七色に輝く不思議な宝石が落ちていた.あなたはその惑星への降下を試みようと考えたが,重大な問題のためにそれは不可能であることがわかった.その惑星の空気には,人間が触れただけで...
2 10 11 11 12 2 N 2 E 1 2 10 11 11 12 2 N 2 W 1 3 0 15 5 10 5 15 5 W 10 S 10 N 20 E 10 S 10 0
Yes No No
25,683
s310059352
p01125
u166860661
1480833531
Python
Python
py
Accepted
60
6300
1,225
# coding: utf-8 # Here your code ! while True: n = int(raw_input()) if n == 0: break else: posi = [] now = [10,10] for i in range(n): l = map(int,raw_input().split()) posi.append(l) n = int(raw_input()) for i in range(n): l ...
p01125
<h1>Mysterious Gems</h1> <p> 宇宙暦 1603〜1867 年,人々はその時代のことを EDO 時代と呼ぶ.EDO とは当時最先端の宇宙航行技術,Enhanced Driving Operation のことであり、1603 年に Dr.Izy によって開発された. </p> <p> あなたは宇宙冒険家であり,宇宙を飛び回って様々な惑星を冒険していた.その冒険の途中で,あなたはとても不思議な惑星を発見した.その惑星には,至るところに七色に輝く不思議な宝石が落ちていた.あなたはその惑星への降下を試みようと考えたが,重大な問題のためにそれは不可能であることがわかった.その惑星の空気には,人間が触れただけで...
2 10 11 11 12 2 N 2 E 1 2 10 11 11 12 2 N 2 W 1 3 0 15 5 10 5 15 5 W 10 S 10 N 20 E 10 S 10 0
Yes No No
25,684
s189628846
p01125
u922871577
1481098981
Python
Python
py
Accepted
80
6448
663
direction = {'N':(0, 1), 'E':(1, 0), 'W':(-1, 0), 'S':(0, -1)} while True: N = int(raw_input()) if N == 0: break B = [[False for j in xrange(21)] for i in xrange(21)] for i in xrange(N): x, y = map(int, raw_input().split()) B[y][x] = True M = int(raw_input()) px, py = 10...
p01125
<h1>Mysterious Gems</h1> <p> 宇宙暦 1603〜1867 年,人々はその時代のことを EDO 時代と呼ぶ.EDO とは当時最先端の宇宙航行技術,Enhanced Driving Operation のことであり、1603 年に Dr.Izy によって開発された. </p> <p> あなたは宇宙冒険家であり,宇宙を飛び回って様々な惑星を冒険していた.その冒険の途中で,あなたはとても不思議な惑星を発見した.その惑星には,至るところに七色に輝く不思議な宝石が落ちていた.あなたはその惑星への降下を試みようと考えたが,重大な問題のためにそれは不可能であることがわかった.その惑星の空気には,人間が触れただけで...
2 10 11 11 12 2 N 2 E 1 2 10 11 11 12 2 N 2 W 1 3 0 15 5 10 5 15 5 W 10 S 10 N 20 E 10 S 10 0
Yes No No
25,685
s310654055
p01125
u660912567
1481381703
Python
Python3
py
Accepted
90
7616
421
k = ['N','E','S','W'] v = [[0,1],[1,0],[0,-1],[-1,0]] while True: n = int(input()) if not(n): break x,y = 10,10 p = [list(map(int,input().split())) for _ in range(n)] for d,r in [input().split() for _ in range(int(input()))]: t = v[k.index(d)] for _ in range(int(r)): x,y ...
p01125
<h1>Mysterious Gems</h1> <p> 宇宙暦 1603〜1867 年,人々はその時代のことを EDO 時代と呼ぶ.EDO とは当時最先端の宇宙航行技術,Enhanced Driving Operation のことであり、1603 年に Dr.Izy によって開発された. </p> <p> あなたは宇宙冒険家であり,宇宙を飛び回って様々な惑星を冒険していた.その冒険の途中で,あなたはとても不思議な惑星を発見した.その惑星には,至るところに七色に輝く不思議な宝石が落ちていた.あなたはその惑星への降下を試みようと考えたが,重大な問題のためにそれは不可能であることがわかった.その惑星の空気には,人間が触れただけで...
2 10 11 11 12 2 N 2 E 1 2 10 11 11 12 2 N 2 W 1 3 0 15 5 10 5 15 5 W 10 S 10 N 20 E 10 S 10 0
Yes No No
25,686
s177312043
p01125
u660912567
1481393306
Python
Python3
py
Accepted
90
7564
417
k = ['N','E','S','W'] v = [[0,1],[1,0],[0,-1],[-1,0]] while True: n = int(input()) if n==0: break x,y = 10,10 l = [list(map(int,input().split())) for _ in range(n)] for d,r in [input().split() for _ in range(int(input()))]: dl = v[k.index(d)] for _ in range(int(r)): x,y =...
p01125
<h1>Mysterious Gems</h1> <p> 宇宙暦 1603〜1867 年,人々はその時代のことを EDO 時代と呼ぶ.EDO とは当時最先端の宇宙航行技術,Enhanced Driving Operation のことであり、1603 年に Dr.Izy によって開発された. </p> <p> あなたは宇宙冒険家であり,宇宙を飛び回って様々な惑星を冒険していた.その冒険の途中で,あなたはとても不思議な惑星を発見した.その惑星には,至るところに七色に輝く不思議な宝石が落ちていた.あなたはその惑星への降下を試みようと考えたが,重大な問題のためにそれは不可能であることがわかった.その惑星の空気には,人間が触れただけで...
2 10 11 11 12 2 N 2 E 1 2 10 11 11 12 2 N 2 W 1 3 0 15 5 10 5 15 5 W 10 S 10 N 20 E 10 S 10 0
Yes No No
25,687
s504721570
p01125
u633333374
1485610321
Python
Python
py
Accepted
80
6372
656
while 1: arr = [[0 for i in range(21)] for j in range(21)] x = int(raw_input()) if x == 0: break for i in range(x): y,z = map(int,raw_input().split()) arr[z][y] = 1 a = int(input()) nx, ny = 10,10 for i in range(a): d, l = raw_input().split() for j in range(in...
p01125
<h1>Mysterious Gems</h1> <p> 宇宙暦 1603〜1867 年,人々はその時代のことを EDO 時代と呼ぶ.EDO とは当時最先端の宇宙航行技術,Enhanced Driving Operation のことであり、1603 年に Dr.Izy によって開発された. </p> <p> あなたは宇宙冒険家であり,宇宙を飛び回って様々な惑星を冒険していた.その冒険の途中で,あなたはとても不思議な惑星を発見した.その惑星には,至るところに七色に輝く不思議な宝石が落ちていた.あなたはその惑星への降下を試みようと考えたが,重大な問題のためにそれは不可能であることがわかった.その惑星の空気には,人間が触れただけで...
2 10 11 11 12 2 N 2 E 1 2 10 11 11 12 2 N 2 W 1 3 0 15 5 10 5 15 5 W 10 S 10 N 20 E 10 S 10 0
Yes No No
25,688
s575627368
p01125
u078042885
1485629432
Python
Python3
py
Accepted
90
7776
381
while 1: n=int(input()) if n==0:break x=y=10 b=[list(map(int,input().split())) for _ in range(n)] for i,j in [input().split() for _ in range(int(input()))]: for _ in range(int(j)): if 'N'<=i<='S': y+=1 if i=='N' else -1 else: x+=1 if i=='E' else -1 if [x,y...
p01125
<h1>Mysterious Gems</h1> <p> 宇宙暦 1603〜1867 年,人々はその時代のことを EDO 時代と呼ぶ.EDO とは当時最先端の宇宙航行技術,Enhanced Driving Operation のことであり、1603 年に Dr.Izy によって開発された. </p> <p> あなたは宇宙冒険家であり,宇宙を飛び回って様々な惑星を冒険していた.その冒険の途中で,あなたはとても不思議な惑星を発見した.その惑星には,至るところに七色に輝く不思議な宝石が落ちていた.あなたはその惑星への降下を試みようと考えたが,重大な問題のためにそれは不可能であることがわかった.その惑星の空気には,人間が触れただけで...
2 10 11 11 12 2 N 2 E 1 2 10 11 11 12 2 N 2 W 1 3 0 15 5 10 5 15 5 W 10 S 10 N 20 E 10 S 10 0
Yes No No
25,689
s771145363
p01125
u661290476
1487332303
Python
Python3
py
Accepted
80
7580
654
while True: n = int(input()) if n == 0: break gems = set() for _ in range(n): x, y = map(int, input().split()) gems.add((x, y)) m = int(input()) nx = ny = 10 for _ in range(m): d, l = input().split() l = int(l) for i in range(l): ...
p01125
<h1>Mysterious Gems</h1> <p> 宇宙暦 1603〜1867 年,人々はその時代のことを EDO 時代と呼ぶ.EDO とは当時最先端の宇宙航行技術,Enhanced Driving Operation のことであり、1603 年に Dr.Izy によって開発された. </p> <p> あなたは宇宙冒険家であり,宇宙を飛び回って様々な惑星を冒険していた.その冒険の途中で,あなたはとても不思議な惑星を発見した.その惑星には,至るところに七色に輝く不思議な宝石が落ちていた.あなたはその惑星への降下を試みようと考えたが,重大な問題のためにそれは不可能であることがわかった.その惑星の空気には,人間が触れただけで...
2 10 11 11 12 2 N 2 E 1 2 10 11 11 12 2 N 2 W 1 3 0 15 5 10 5 15 5 W 10 S 10 N 20 E 10 S 10 0
Yes No No
25,690
s496434445
p01125
u661290476
1487333900
Python
Python3
py
Accepted
90
7776
611
while True: n = int(input()) if n == 0: break gems = {tuple(int(i) for i in input().split()) for _ in range(n)} m = int(input()) nx = ny = 10 for _ in range(m): d, l = input().split() l = int(l) for i in range(l): if d == 'N': ny += 1 ...
p01125
<h1>Mysterious Gems</h1> <p> 宇宙暦 1603〜1867 年,人々はその時代のことを EDO 時代と呼ぶ.EDO とは当時最先端の宇宙航行技術,Enhanced Driving Operation のことであり、1603 年に Dr.Izy によって開発された. </p> <p> あなたは宇宙冒険家であり,宇宙を飛び回って様々な惑星を冒険していた.その冒険の途中で,あなたはとても不思議な惑星を発見した.その惑星には,至るところに七色に輝く不思議な宝石が落ちていた.あなたはその惑星への降下を試みようと考えたが,重大な問題のためにそれは不可能であることがわかった.その惑星の空気には,人間が触れただけで...
2 10 11 11 12 2 N 2 E 1 2 10 11 11 12 2 N 2 W 1 3 0 15 5 10 5 15 5 W 10 S 10 N 20 E 10 S 10 0
Yes No No
25,691
s621362578
p01125
u650459696
1497230017
Python
Python3
py
Accepted
100
7720
661
while True: n = int(input()) if n == 0: break s = [] for _ in range(n): s.append(list(map(int, input().split()))) m = int(input()) p = [10, 10] if p in s: s.remove(p) for _ in range(m): d, l = input().split() l = int(l) for a in range(l): ...
p01125
<h1>Mysterious Gems</h1> <p> 宇宙暦 1603〜1867 年,人々はその時代のことを EDO 時代と呼ぶ.EDO とは当時最先端の宇宙航行技術,Enhanced Driving Operation のことであり、1603 年に Dr.Izy によって開発された. </p> <p> あなたは宇宙冒険家であり,宇宙を飛び回って様々な惑星を冒険していた.その冒険の途中で,あなたはとても不思議な惑星を発見した.その惑星には,至るところに七色に輝く不思議な宝石が落ちていた.あなたはその惑星への降下を試みようと考えたが,重大な問題のためにそれは不可能であることがわかった.その惑星の空気には,人間が触れただけで...
2 10 11 11 12 2 N 2 E 1 2 10 11 11 12 2 N 2 W 1 3 0 15 5 10 5 15 5 W 10 S 10 N 20 E 10 S 10 0
Yes No No
25,692
s241712454
p01125
u347385753
1499035938
Python
Python3
py
Accepted
90
7660
660
while 1: lists,pla = [],[] x,y,count = 10,10,0 n = int(input()) if n==0:break for i in [0]*n: s = list(map(int, input().split())) lists.append(s) for i in [0]*int(input()): way,num = input().split() if way=="N":[pla.append([x,y+i]) for i in range(1,int(num)+1)] ...
p01125
<h1>Mysterious Gems</h1> <p> 宇宙暦 1603〜1867 年,人々はその時代のことを EDO 時代と呼ぶ.EDO とは当時最先端の宇宙航行技術,Enhanced Driving Operation のことであり、1603 年に Dr.Izy によって開発された. </p> <p> あなたは宇宙冒険家であり,宇宙を飛び回って様々な惑星を冒険していた.その冒険の途中で,あなたはとても不思議な惑星を発見した.その惑星には,至るところに七色に輝く不思議な宝石が落ちていた.あなたはその惑星への降下を試みようと考えたが,重大な問題のためにそれは不可能であることがわかった.その惑星の空気には,人間が触れただけで...
2 10 11 11 12 2 N 2 E 1 2 10 11 11 12 2 N 2 W 1 3 0 15 5 10 5 15 5 W 10 S 10 N 20 E 10 S 10 0
Yes No No
25,693
s036827131
p01125
u974788383
1506846799
Python
Python3
py
Accepted
90
7840
2,496
def between(x, y, a): lrg = max(x, y) sml = min(x, y) if (sml <= a <= lrg): return True else: return False while (True): pos = [10, 10] result = 'No' N = int(input()) # Total number of jewels if N == 0: break jewelPositions = list() for i in range(N): ...
p01125
<h1>Mysterious Gems</h1> <p> 宇宙暦 1603〜1867 年,人々はその時代のことを EDO 時代と呼ぶ.EDO とは当時最先端の宇宙航行技術,Enhanced Driving Operation のことであり、1603 年に Dr.Izy によって開発された. </p> <p> あなたは宇宙冒険家であり,宇宙を飛び回って様々な惑星を冒険していた.その冒険の途中で,あなたはとても不思議な惑星を発見した.その惑星には,至るところに七色に輝く不思議な宝石が落ちていた.あなたはその惑星への降下を試みようと考えたが,重大な問題のためにそれは不可能であることがわかった.その惑星の空気には,人間が触れただけで...
2 10 11 11 12 2 N 2 E 1 2 10 11 11 12 2 N 2 W 1 3 0 15 5 10 5 15 5 W 10 S 10 N 20 E 10 S 10 0
Yes No No
25,694
s090777447
p01125
u974788383
1506846826
Python
Python3
py
Accepted
80
7916
2,393
def between(x, y, a): lrg = max(x, y) sml = min(x, y) if (sml <= a <= lrg): return True else: return False while (True): pos = [10, 10] result = 'No' N = int(input()) # Total number of jewels if N == 0: break jewelPositions = list() for i in range(N): ...
p01125
<h1>Mysterious Gems</h1> <p> 宇宙暦 1603〜1867 年,人々はその時代のことを EDO 時代と呼ぶ.EDO とは当時最先端の宇宙航行技術,Enhanced Driving Operation のことであり、1603 年に Dr.Izy によって開発された. </p> <p> あなたは宇宙冒険家であり,宇宙を飛び回って様々な惑星を冒険していた.その冒険の途中で,あなたはとても不思議な惑星を発見した.その惑星には,至るところに七色に輝く不思議な宝石が落ちていた.あなたはその惑星への降下を試みようと考えたが,重大な問題のためにそれは不可能であることがわかった.その惑星の空気には,人間が触れただけで...
2 10 11 11 12 2 N 2 E 1 2 10 11 11 12 2 N 2 W 1 3 0 15 5 10 5 15 5 W 10 S 10 N 20 E 10 S 10 0
Yes No No
25,695
s151370037
p01125
u256256172
1506993825
Python
Python3
py
Accepted
80
7712
564
while True: n = int(input()) if n == 0: break p = [10, 10] l = [list(map(int,input().split())) for _ in range(n)] for d,s in [input().split() for _ in range(int(input()))]: for _ in range(int(s)): if d == 'N': p[1] += 1 elif d == 'E': ...
p01125
<h1>Mysterious Gems</h1> <p> 宇宙暦 1603〜1867 年,人々はその時代のことを EDO 時代と呼ぶ.EDO とは当時最先端の宇宙航行技術,Enhanced Driving Operation のことであり、1603 年に Dr.Izy によって開発された. </p> <p> あなたは宇宙冒険家であり,宇宙を飛び回って様々な惑星を冒険していた.その冒険の途中で,あなたはとても不思議な惑星を発見した.その惑星には,至るところに七色に輝く不思議な宝石が落ちていた.あなたはその惑星への降下を試みようと考えたが,重大な問題のためにそれは不可能であることがわかった.その惑星の空気には,人間が触れただけで...
2 10 11 11 12 2 N 2 E 1 2 10 11 11 12 2 N 2 W 1 3 0 15 5 10 5 15 5 W 10 S 10 N 20 E 10 S 10 0
Yes No No
25,696
s174307406
p01125
u506554532
1512816434
Python
Python3
py
Accepted
90
5620
557
d = {'N':(0,1), 'E':(1,0), 'S':(0,-1), 'W':(-1,0)} while True: N = int(input()) if N == 0: break field = [[0 for i in range(21)] for j in range(21)] for i in range(N): x,y = map(int,input().split()) field[x][y] = 1 x = y = 10 got = 0 M = int(input()) for i in range(M): ...
p01125
<h1>Mysterious Gems</h1> <p> 宇宙暦 1603〜1867 年,人々はその時代のことを EDO 時代と呼ぶ.EDO とは当時最先端の宇宙航行技術,Enhanced Driving Operation のことであり、1603 年に Dr.Izy によって開発された. </p> <p> あなたは宇宙冒険家であり,宇宙を飛び回って様々な惑星を冒険していた.その冒険の途中で,あなたはとても不思議な惑星を発見した.その惑星には,至るところに七色に輝く不思議な宝石が落ちていた.あなたはその惑星への降下を試みようと考えたが,重大な問題のためにそれは不可能であることがわかった.その惑星の空気には,人間が触れただけで...
2 10 11 11 12 2 N 2 E 1 2 10 11 11 12 2 N 2 W 1 3 0 15 5 10 5 15 5 W 10 S 10 N 20 E 10 S 10 0
Yes No No
25,697
s094327496
p01125
u598551137
1514012085
Python
Python3
py
Accepted
80
5624
649
D = {'N': (0, 1), 'S': (0, -1), 'E': (1, 0), 'W': (-1, 0)} while True: n = int(input()) if n == 0: break f = [[False for x in range(21)] for y in range(21)] for i in range(n): x, y = map(int, input().split(' ')) f[y][x] = True m = int(input()) rx, ry = 10, 10 p = 0 ...
p01125
<h1>Mysterious Gems</h1> <p> 宇宙暦 1603〜1867 年,人々はその時代のことを EDO 時代と呼ぶ.EDO とは当時最先端の宇宙航行技術,Enhanced Driving Operation のことであり、1603 年に Dr.Izy によって開発された. </p> <p> あなたは宇宙冒険家であり,宇宙を飛び回って様々な惑星を冒険していた.その冒険の途中で,あなたはとても不思議な惑星を発見した.その惑星には,至るところに七色に輝く不思議な宝石が落ちていた.あなたはその惑星への降下を試みようと考えたが,重大な問題のためにそれは不可能であることがわかった.その惑星の空気には,人間が触れただけで...
2 10 11 11 12 2 N 2 E 1 2 10 11 11 12 2 N 2 W 1 3 0 15 5 10 5 15 5 W 10 S 10 N 20 E 10 S 10 0
Yes No No
25,698
s757175473
p01125
u072683688
1517369434
Python
Python3
py
Accepted
90
5624
1,061
N=int (input()) while N != 0: Jcou = 0 JUE=[] for i in range(N): JUE.append(list(map(int, input().split()))) M=int(input()) RO=[10,10] for j in range(M): m1=list(map( str,input().split())) if(m1[0]=="N"): for k in range(int(m1[1])): RO[1]+=1 ...
p01125
<h1>Mysterious Gems</h1> <p> 宇宙暦 1603〜1867 年,人々はその時代のことを EDO 時代と呼ぶ.EDO とは当時最先端の宇宙航行技術,Enhanced Driving Operation のことであり、1603 年に Dr.Izy によって開発された. </p> <p> あなたは宇宙冒険家であり,宇宙を飛び回って様々な惑星を冒険していた.その冒険の途中で,あなたはとても不思議な惑星を発見した.その惑星には,至るところに七色に輝く不思議な宝石が落ちていた.あなたはその惑星への降下を試みようと考えたが,重大な問題のためにそれは不可能であることがわかった.その惑星の空気には,人間が触れただけで...
2 10 11 11 12 2 N 2 E 1 2 10 11 11 12 2 N 2 W 1 3 0 15 5 10 5 15 5 W 10 S 10 N 20 E 10 S 10 0
Yes No No
25,699
s986468319
p01125
u072683688
1517369434
Python
Python3
py
Accepted
90
5628
1,061
N=int (input()) while N != 0: Jcou = 0 JUE=[] for i in range(N): JUE.append(list(map(int, input().split()))) M=int(input()) RO=[10,10] for j in range(M): m1=list(map( str,input().split())) if(m1[0]=="N"): for k in range(int(m1[1])): RO[1]+=1 ...
p01125
<h1>Mysterious Gems</h1> <p> 宇宙暦 1603〜1867 年,人々はその時代のことを EDO 時代と呼ぶ.EDO とは当時最先端の宇宙航行技術,Enhanced Driving Operation のことであり、1603 年に Dr.Izy によって開発された. </p> <p> あなたは宇宙冒険家であり,宇宙を飛び回って様々な惑星を冒険していた.その冒険の途中で,あなたはとても不思議な惑星を発見した.その惑星には,至るところに七色に輝く不思議な宝石が落ちていた.あなたはその惑星への降下を試みようと考えたが,重大な問題のためにそれは不可能であることがわかった.その惑星の空気には,人間が触れただけで...
2 10 11 11 12 2 N 2 E 1 2 10 11 11 12 2 N 2 W 1 3 0 15 5 10 5 15 5 W 10 S 10 N 20 E 10 S 10 0
Yes No No
25,700
s685830110
p01125
u452926933
1520328318
Python
Python3
py
Accepted
90
5616
819
while True: n = int(input()) if n == 0: break gem_points = [list(map(int, input().split())) for i in range(n)] m = int(input()) operations = [input().split() for i in range(m)] robot_pos = [10, 10] for operation in operations: move_dir = operation[0] move_amount = int...
p01125
<h1>Mysterious Gems</h1> <p> 宇宙暦 1603〜1867 年,人々はその時代のことを EDO 時代と呼ぶ.EDO とは当時最先端の宇宙航行技術,Enhanced Driving Operation のことであり、1603 年に Dr.Izy によって開発された. </p> <p> あなたは宇宙冒険家であり,宇宙を飛び回って様々な惑星を冒険していた.その冒険の途中で,あなたはとても不思議な惑星を発見した.その惑星には,至るところに七色に輝く不思議な宝石が落ちていた.あなたはその惑星への降下を試みようと考えたが,重大な問題のためにそれは不可能であることがわかった.その惑星の空気には,人間が触れただけで...
2 10 11 11 12 2 N 2 E 1 2 10 11 11 12 2 N 2 W 1 3 0 15 5 10 5 15 5 W 10 S 10 N 20 E 10 S 10 0
Yes No No
25,701
s656958651
p01125
u146816547
1523962389
Python
Python
py
Accepted
60
4684
983
while True: N = int(raw_input()) if N == 0: break xy = [map(int, raw_input().split()) for _ in range(N)] M = int(raw_input()) table = [[False for _ in range(21)] for _ in range(21)] table[10][10] = True cur = [10, 10] for i in range(M): d, l = raw_input().split() ...
p01125
<h1>Mysterious Gems</h1> <p> 宇宙暦 1603〜1867 年,人々はその時代のことを EDO 時代と呼ぶ.EDO とは当時最先端の宇宙航行技術,Enhanced Driving Operation のことであり、1603 年に Dr.Izy によって開発された. </p> <p> あなたは宇宙冒険家であり,宇宙を飛び回って様々な惑星を冒険していた.その冒険の途中で,あなたはとても不思議な惑星を発見した.その惑星には,至るところに七色に輝く不思議な宝石が落ちていた.あなたはその惑星への降下を試みようと考えたが,重大な問題のためにそれは不可能であることがわかった.その惑星の空気には,人間が触れただけで...
2 10 11 11 12 2 N 2 E 1 2 10 11 11 12 2 N 2 W 1 3 0 15 5 10 5 15 5 W 10 S 10 N 20 E 10 S 10 0
Yes No No
25,702
s521016936
p01125
u146816547
1523963218
Python
Python
py
Accepted
60
4688
984
while True: N = int(raw_input()) if N == 0: break xy = [map(int, raw_input().split()) for _ in range(N)] table = [[False for _ in range(21)] for _ in range(21)] table[10][10] = True cur = [10, 10] M = int(raw_input()) for _ in range(M): d, l = raw_input().split() ...
p01125
<h1>Mysterious Gems</h1> <p> 宇宙暦 1603〜1867 年,人々はその時代のことを EDO 時代と呼ぶ.EDO とは当時最先端の宇宙航行技術,Enhanced Driving Operation のことであり、1603 年に Dr.Izy によって開発された. </p> <p> あなたは宇宙冒険家であり,宇宙を飛び回って様々な惑星を冒険していた.その冒険の途中で,あなたはとても不思議な惑星を発見した.その惑星には,至るところに七色に輝く不思議な宝石が落ちていた.あなたはその惑星への降下を試みようと考えたが,重大な問題のためにそれは不可能であることがわかった.その惑星の空気には,人間が触れただけで...
2 10 11 11 12 2 N 2 E 1 2 10 11 11 12 2 N 2 W 1 3 0 15 5 10 5 15 5 W 10 S 10 N 20 E 10 S 10 0
Yes No No
25,703
s451923658
p01125
u572046143
1527870293
Python
Python3
py
Accepted
90
5620
745
OFFSET = {"N": (0, 1), "E": (1, 0), "S": (0, -1), "W": (-1, 0)} while True: N = int(input().strip()) if N == 0: break gem_coords = [] for _ in range(N): x, y = [int(s) for s in input().strip().split()] gem_coords.append((x, y)) now_x, n...
p01125
<h1>Mysterious Gems</h1> <p> 宇宙暦 1603〜1867 年,人々はその時代のことを EDO 時代と呼ぶ.EDO とは当時最先端の宇宙航行技術,Enhanced Driving Operation のことであり、1603 年に Dr.Izy によって開発された. </p> <p> あなたは宇宙冒険家であり,宇宙を飛び回って様々な惑星を冒険していた.その冒険の途中で,あなたはとても不思議な惑星を発見した.その惑星には,至るところに七色に輝く不思議な宝石が落ちていた.あなたはその惑星への降下を試みようと考えたが,重大な問題のためにそれは不可能であることがわかった.その惑星の空気には,人間が触れただけで...
2 10 11 11 12 2 N 2 E 1 2 10 11 11 12 2 N 2 W 1 3 0 15 5 10 5 15 5 W 10 S 10 N 20 E 10 S 10 0
Yes No No
25,704
s149821205
p01125
u352394527
1530351203
Python
Python3
py
Accepted
90
5712
524
while True: n = int(input()) if n == 0: break targets = [tuple(map(int, input().split())) for _ in range(n)] m = int(input()) x = y = 10 direct = {"N":(0, 1), "S":(0,-1), "E":(1,0), "W":(-1,0)} for _ in range(m): d, i = input().split() dx, dy = direct[d] for dist in range(1, int(i) + 1): ...
p01125
<h1>Mysterious Gems</h1> <p> 宇宙暦 1603〜1867 年,人々はその時代のことを EDO 時代と呼ぶ.EDO とは当時最先端の宇宙航行技術,Enhanced Driving Operation のことであり、1603 年に Dr.Izy によって開発された. </p> <p> あなたは宇宙冒険家であり,宇宙を飛び回って様々な惑星を冒険していた.その冒険の途中で,あなたはとても不思議な惑星を発見した.その惑星には,至るところに七色に輝く不思議な宝石が落ちていた.あなたはその惑星への降下を試みようと考えたが,重大な問題のためにそれは不可能であることがわかった.その惑星の空気には,人間が触れただけで...
2 10 11 11 12 2 N 2 E 1 2 10 11 11 12 2 N 2 W 1 3 0 15 5 10 5 15 5 W 10 S 10 N 20 E 10 S 10 0
Yes No No
25,705
s870751779
p01125
u136916346
1530530118
Python
Python3
py
Accepted
100
5752
728
while 1: N=int(input()) if not N:break cd={tuple(map(int,input().split())) for _ in range(N)} c=set() x,y=10,10 M=int(input()) for _ in range(M): d,l=input().split() l=int(l) if d=="N": sc={(x+i,y+j) for i in range(1) for j in range(0,l+1,1)} y...
p01125
<h1>Mysterious Gems</h1> <p> 宇宙暦 1603〜1867 年,人々はその時代のことを EDO 時代と呼ぶ.EDO とは当時最先端の宇宙航行技術,Enhanced Driving Operation のことであり、1603 年に Dr.Izy によって開発された. </p> <p> あなたは宇宙冒険家であり,宇宙を飛び回って様々な惑星を冒険していた.その冒険の途中で,あなたはとても不思議な惑星を発見した.その惑星には,至るところに七色に輝く不思議な宝石が落ちていた.あなたはその惑星への降下を試みようと考えたが,重大な問題のためにそれは不可能であることがわかった.その惑星の空気には,人間が触れただけで...
2 10 11 11 12 2 N 2 E 1 2 10 11 11 12 2 N 2 W 1 3 0 15 5 10 5 15 5 W 10 S 10 N 20 E 10 S 10 0
Yes No No
25,706
s324895386
p01125
u779627195
1352837057
Python
Python
py
Accepted
50
5596
1,189
while 1: find = False r_pos = [10,10] n = int(raw_input()) if n == 0: break planet = [[0 for j in xrange(21)] for i in xrange(21)] for i in xrange(n): x,y = map(int, raw_input().split()) planet[y][x] = 1 m = int(raw_input()) for i in xrange(m): d,l = raw_input().s...
p01125
<h1>Mysterious Gems</h1> <p> 宇宙暦 1603〜1867 年,人々はその時代のことを EDO 時代と呼ぶ.EDO とは当時最先端の宇宙航行技術,Enhanced Driving Operation のことであり、1603 年に Dr.Izy によって開発された. </p> <p> あなたは宇宙冒険家であり,宇宙を飛び回って様々な惑星を冒険していた.その冒険の途中で,あなたはとても不思議な惑星を発見した.その惑星には,至るところに七色に輝く不思議な宝石が落ちていた.あなたはその惑星への降下を試みようと考えたが,重大な問題のためにそれは不可能であることがわかった.その惑星の空気には,人間が触れただけで...
2 10 11 11 12 2 N 2 E 1 2 10 11 11 12 2 N 2 W 1 3 0 15 5 10 5 15 5 W 10 S 10 N 20 E 10 S 10 0
Yes No No
25,707
s846058999
p01125
u109084363
1358056210
Python
Python
py
Accepted
50
4724
1,182
import sys import collections Gem = collections.namedtuple('Gem', 'x y') while True: n = int(sys.stdin.readline()) if n == 0: break gem = set() for i in xrange(n): x, y = map(int, sys.stdin.readline().split()) gem.add(Gem(x, y)) M = int(sys.stdin.readline()) cur_x = cur...
p01125
<h1>Mysterious Gems</h1> <p> 宇宙暦 1603〜1867 年,人々はその時代のことを EDO 時代と呼ぶ.EDO とは当時最先端の宇宙航行技術,Enhanced Driving Operation のことであり、1603 年に Dr.Izy によって開発された. </p> <p> あなたは宇宙冒険家であり,宇宙を飛び回って様々な惑星を冒険していた.その冒険の途中で,あなたはとても不思議な惑星を発見した.その惑星には,至るところに七色に輝く不思議な宝石が落ちていた.あなたはその惑星への降下を試みようと考えたが,重大な問題のためにそれは不可能であることがわかった.その惑星の空気には,人間が触れただけで...
2 10 11 11 12 2 N 2 E 1 2 10 11 11 12 2 N 2 W 1 3 0 15 5 10 5 15 5 W 10 S 10 N 20 E 10 S 10 0
Yes No No
25,708
s292141168
p01125
u104911888
1371567600
Python
Python
py
Accepted
40
4276
772
while True: N=input() if N==0:break L=[[0]*21 for i in range(21)] init=[[0]*21 for i in range(21)] for i in range(N): x,y=map(int,raw_input().split()) L[y][x]=1 M=input() nowX,nowY=10,10 for i in range(M): d,l=raw_input().split() if d=="N": for...
p01125
<h1>Mysterious Gems</h1> <p> 宇宙暦 1603〜1867 年,人々はその時代のことを EDO 時代と呼ぶ.EDO とは当時最先端の宇宙航行技術,Enhanced Driving Operation のことであり、1603 年に Dr.Izy によって開発された. </p> <p> あなたは宇宙冒険家であり,宇宙を飛び回って様々な惑星を冒険していた.その冒険の途中で,あなたはとても不思議な惑星を発見した.その惑星には,至るところに七色に輝く不思議な宝石が落ちていた.あなたはその惑星への降下を試みようと考えたが,重大な問題のためにそれは不可能であることがわかった.その惑星の空気には,人間が触れただけで...
2 10 11 11 12 2 N 2 E 1 2 10 11 11 12 2 N 2 W 1 3 0 15 5 10 5 15 5 W 10 S 10 N 20 E 10 S 10 0
Yes No No
25,709
s564691946
p01125
u104911888
1371603729
Python
Python
py
Accepted
50
4276
486
drct={"N":(0,1),"S":(0,-1),"W":(-1,0),"E":(1,0)} while True: N=input() if N==0:break L=[[0]*21 for i in range(21)] init=[[0]*21 for i in range(21)] for i in range(N): x,y=map(int,raw_input().split()) L[y][x]=1 M=input() nowX=nowY=10 for i in range(M): d,l=raw_inpu...
p01125
<h1>Mysterious Gems</h1> <p> 宇宙暦 1603〜1867 年,人々はその時代のことを EDO 時代と呼ぶ.EDO とは当時最先端の宇宙航行技術,Enhanced Driving Operation のことであり、1603 年に Dr.Izy によって開発された. </p> <p> あなたは宇宙冒険家であり,宇宙を飛び回って様々な惑星を冒険していた.その冒険の途中で,あなたはとても不思議な惑星を発見した.その惑星には,至るところに七色に輝く不思議な宝石が落ちていた.あなたはその惑星への降下を試みようと考えたが,重大な問題のためにそれは不可能であることがわかった.その惑星の空気には,人間が触れただけで...
2 10 11 11 12 2 N 2 E 1 2 10 11 11 12 2 N 2 W 1 3 0 15 5 10 5 15 5 W 10 S 10 N 20 E 10 S 10 0
Yes No No
25,710
s286758793
p01125
u351182591
1375455608
Python
Python
py
Accepted
70
4280
1,088
def check(f): for k in range (n): if j[k]==g: j[k]=[-1,-1] f+=1 return f while 1: n=input() if n==0: break j=[0 for i in range(n)] for i in range(n): j[i]=map(int,raw_input()....
p01125
<h1>Mysterious Gems</h1> <p> 宇宙暦 1603〜1867 年,人々はその時代のことを EDO 時代と呼ぶ.EDO とは当時最先端の宇宙航行技術,Enhanced Driving Operation のことであり、1603 年に Dr.Izy によって開発された. </p> <p> あなたは宇宙冒険家であり,宇宙を飛び回って様々な惑星を冒険していた.その冒険の途中で,あなたはとても不思議な惑星を発見した.その惑星には,至るところに七色に輝く不思議な宝石が落ちていた.あなたはその惑星への降下を試みようと考えたが,重大な問題のためにそれは不可能であることがわかった.その惑星の空気には,人間が触れただけで...
2 10 11 11 12 2 N 2 E 1 2 10 11 11 12 2 N 2 W 1 3 0 15 5 10 5 15 5 W 10 S 10 N 20 E 10 S 10 0
Yes No No
25,711
s257426889
p01125
u351182591
1375458486
Python
Python
py
Accepted
70
4272
1,033
def check(f): if g[l[1]][l[0]]==1: f+=1 g[l[1]][l[0]]=2 return f while 1: g=[[0 for i in range(21)]for j in range(21)] n,g[10][10],l,f=input(),2,[10,10],0 if n==0 : break for i in range(n): j=map(int,raw_input().split()) ...
p01125
<h1>Mysterious Gems</h1> <p> 宇宙暦 1603〜1867 年,人々はその時代のことを EDO 時代と呼ぶ.EDO とは当時最先端の宇宙航行技術,Enhanced Driving Operation のことであり、1603 年に Dr.Izy によって開発された. </p> <p> あなたは宇宙冒険家であり,宇宙を飛び回って様々な惑星を冒険していた.その冒険の途中で,あなたはとても不思議な惑星を発見した.その惑星には,至るところに七色に輝く不思議な宝石が落ちていた.あなたはその惑星への降下を試みようと考えたが,重大な問題のためにそれは不可能であることがわかった.その惑星の空気には,人間が触れただけで...
2 10 11 11 12 2 N 2 E 1 2 10 11 11 12 2 N 2 W 1 3 0 15 5 10 5 15 5 W 10 S 10 N 20 E 10 S 10 0
Yes No No
25,712
s842370626
p01125
u633068244
1394973155
Python
Python
py
Accepted
50
4284
886
while True: n = int(raw_input()) if n == 0: break f = [[0 for i in range(21)] for i in range(21)] for i in range(n): x, y = map(int, raw_input().split()) f[y][x] = 1 n = int(raw_input()) x,y = 10, 10 for i in range(n): c, d = map(str, raw_input().split()) ...
p01125
<h1>Mysterious Gems</h1> <p> 宇宙暦 1603〜1867 年,人々はその時代のことを EDO 時代と呼ぶ.EDO とは当時最先端の宇宙航行技術,Enhanced Driving Operation のことであり、1603 年に Dr.Izy によって開発された. </p> <p> あなたは宇宙冒険家であり,宇宙を飛び回って様々な惑星を冒険していた.その冒険の途中で,あなたはとても不思議な惑星を発見した.その惑星には,至るところに七色に輝く不思議な宝石が落ちていた.あなたはその惑星への降下を試みようと考えたが,重大な問題のためにそれは不可能であることがわかった.その惑星の空気には,人間が触れただけで...
2 10 11 11 12 2 N 2 E 1 2 10 11 11 12 2 N 2 W 1 3 0 15 5 10 5 15 5 W 10 S 10 N 20 E 10 S 10 0
Yes No No
25,713
s989935251
p01125
u759949288
1398141656
Python
Python
py
Accepted
60
4304
523
import sys readline = sys.stdin.readline D = { "N": (0, 1), "E": (1, 0), "S": (0, -1), "W": (-1, 0), } while True: n = int(readline()) if n == 0: break gems = {tuple(int(x) for x in readline().split()) for i in xrange(n)} x = 10 y = 10 try: gems.remove((x, y)) except KeyError: pass for i in xrange(int...
p01125
<h1>Mysterious Gems</h1> <p> 宇宙暦 1603〜1867 年,人々はその時代のことを EDO 時代と呼ぶ.EDO とは当時最先端の宇宙航行技術,Enhanced Driving Operation のことであり、1603 年に Dr.Izy によって開発された. </p> <p> あなたは宇宙冒険家であり,宇宙を飛び回って様々な惑星を冒険していた.その冒険の途中で,あなたはとても不思議な惑星を発見した.その惑星には,至るところに七色に輝く不思議な宝石が落ちていた.あなたはその惑星への降下を試みようと考えたが,重大な問題のためにそれは不可能であることがわかった.その惑星の空気には,人間が触れただけで...
2 10 11 11 12 2 N 2 E 1 2 10 11 11 12 2 N 2 W 1 3 0 15 5 10 5 15 5 W 10 S 10 N 20 E 10 S 10 0
Yes No No
25,714
s456498266
p01125
u206124123
1587369079
Python
Python3
py
Accepted
90
5620
1,592
def get_input_data(): input_data = int(input()) return input_data def get_two_data(): two_data = input().split() for i in range(2): two_data[i] = int(two_data[i]) return two_data def make_gem_map(gem_num): gem_map = set() for i in range(gem_num): gem_map.add(tuple(get_two_d...
p01125
<h1>Mysterious Gems</h1> <p> 宇宙暦 1603〜1867 年,人々はその時代のことを EDO 時代と呼ぶ.EDO とは当時最先端の宇宙航行技術,Enhanced Driving Operation のことであり、1603 年に Dr.Izy によって開発された. </p> <p> あなたは宇宙冒険家であり,宇宙を飛び回って様々な惑星を冒険していた.その冒険の途中で,あなたはとても不思議な惑星を発見した.その惑星には,至るところに七色に輝く不思議な宝石が落ちていた.あなたはその惑星への降下を試みようと考えたが,重大な問題のためにそれは不可能であることがわかった.その惑星の空気には,人間が触れただけで...
2 10 11 11 12 2 N 2 E 1 2 10 11 11 12 2 N 2 W 1 3 0 15 5 10 5 15 5 W 10 S 10 N 20 E 10 S 10 0
Yes No No
25,715
s328168012
p01125
u123017074
1585035344
Python
Python3
py
Accepted
80
5624
1,316
# ロボットのXY座標 _robotXY = [] def RobotMove(dir, amt, stPoint): global _robotXY isXMove = True orgX, orgY = _robotXY if dir == "N": isXMove = False _robotXY[1] += amt elif dir == "E": _robotXY[0] += amt elif dir == "S": isXMove = False _robotXY[1] -= amt ...
p01125
<h1>Mysterious Gems</h1> <p> 宇宙暦 1603〜1867 年,人々はその時代のことを EDO 時代と呼ぶ.EDO とは当時最先端の宇宙航行技術,Enhanced Driving Operation のことであり、1603 年に Dr.Izy によって開発された. </p> <p> あなたは宇宙冒険家であり,宇宙を飛び回って様々な惑星を冒険していた.その冒険の途中で,あなたはとても不思議な惑星を発見した.その惑星には,至るところに七色に輝く不思議な宝石が落ちていた.あなたはその惑星への降下を試みようと考えたが,重大な問題のためにそれは不可能であることがわかった.その惑星の空気には,人間が触れただけで...
2 10 11 11 12 2 N 2 E 1 2 10 11 11 12 2 N 2 W 1 3 0 15 5 10 5 15 5 W 10 S 10 N 20 E 10 S 10 0
Yes No No
25,716
s558810912
p01125
u813197825
1579788008
Python
Python3
py
Accepted
70
5632
857
def f(): N = int(input()) if N == 0: return -1 J = [] for i in range(N): x, y = map(int, input().split()) J.append((y, x)) C = [[False for j in range(21)] for i in range(21)] C[10][10] = True y, x = 10, 10 dic = {'N':(1, 0), 'W':(0, -1), 'S':(-1, 0), 'E':(0, 1)} ...
p01125
<h1>Mysterious Gems</h1> <p> 宇宙暦 1603〜1867 年,人々はその時代のことを EDO 時代と呼ぶ.EDO とは当時最先端の宇宙航行技術,Enhanced Driving Operation のことであり、1603 年に Dr.Izy によって開発された. </p> <p> あなたは宇宙冒険家であり,宇宙を飛び回って様々な惑星を冒険していた.その冒険の途中で,あなたはとても不思議な惑星を発見した.その惑星には,至るところに七色に輝く不思議な宝石が落ちていた.あなたはその惑星への降下を試みようと考えたが,重大な問題のためにそれは不可能であることがわかった.その惑星の空気には,人間が触れただけで...
2 10 11 11 12 2 N 2 E 1 2 10 11 11 12 2 N 2 W 1 3 0 15 5 10 5 15 5 W 10 S 10 N 20 E 10 S 10 0
Yes No No
25,717
s119912326
p01125
u803862921
1572784426
Python
Python3
py
Accepted
80
5624
687
while True: num = int(input()) if num == 0: break G = set() for _ in range(num): i, j = [int(x) for x in input().split()] G.add((i,j)) m = int(input()) x, y = 10, 10 if (x,y) in G: G.remove((x,y)) for _ in range(m): d, c = input().split() ...
p01125
<h1>Mysterious Gems</h1> <p> 宇宙暦 1603〜1867 年,人々はその時代のことを EDO 時代と呼ぶ.EDO とは当時最先端の宇宙航行技術,Enhanced Driving Operation のことであり、1603 年に Dr.Izy によって開発された. </p> <p> あなたは宇宙冒険家であり,宇宙を飛び回って様々な惑星を冒険していた.その冒険の途中で,あなたはとても不思議な惑星を発見した.その惑星には,至るところに七色に輝く不思議な宝石が落ちていた.あなたはその惑星への降下を試みようと考えたが,重大な問題のためにそれは不可能であることがわかった.その惑星の空気には,人間が触れただけで...
2 10 11 11 12 2 N 2 E 1 2 10 11 11 12 2 N 2 W 1 3 0 15 5 10 5 15 5 W 10 S 10 N 20 E 10 S 10 0
Yes No No
25,718
s110408080
p01125
u510451256
1570442322
Python
Python3
py
Accepted
70
5660
1,060
from sys import exit, stderr, stdin input = stdin.readline # setrecursionlimit(10**7) def debug(var, name="hoge"): print(name +":" + str(type(var)) + " = " + repr(var), file=stderr) return def main(): while(1): N = int(input()) if N == 0: break p = [10,10] g = ...
p01125
<h1>Mysterious Gems</h1> <p> 宇宙暦 1603〜1867 年,人々はその時代のことを EDO 時代と呼ぶ.EDO とは当時最先端の宇宙航行技術,Enhanced Driving Operation のことであり、1603 年に Dr.Izy によって開発された. </p> <p> あなたは宇宙冒険家であり,宇宙を飛び回って様々な惑星を冒険していた.その冒険の途中で,あなたはとても不思議な惑星を発見した.その惑星には,至るところに七色に輝く不思議な宝石が落ちていた.あなたはその惑星への降下を試みようと考えたが,重大な問題のためにそれは不可能であることがわかった.その惑星の空気には,人間が触れただけで...
2 10 11 11 12 2 N 2 E 1 2 10 11 11 12 2 N 2 W 1 3 0 15 5 10 5 15 5 W 10 S 10 N 20 E 10 S 10 0
Yes No No
25,719
s920838880
p01125
u701749469
1569412424
Python
Python3
py
Accepted
100
5640
1,653
def between(sx,sy,mx,my,ex,ey): # y軸方向への移動 if sx == mx and mx == ex: if sy <= my and my <= ey: return True elif ey <= my and my <= sy: return True elif sy == my and my == ey: if sx <= mx and mx <= ex: return True elif ex <= mx and mx <= sx:...
p01125
<h1>Mysterious Gems</h1> <p> 宇宙暦 1603〜1867 年,人々はその時代のことを EDO 時代と呼ぶ.EDO とは当時最先端の宇宙航行技術,Enhanced Driving Operation のことであり、1603 年に Dr.Izy によって開発された. </p> <p> あなたは宇宙冒険家であり,宇宙を飛び回って様々な惑星を冒険していた.その冒険の途中で,あなたはとても不思議な惑星を発見した.その惑星には,至るところに七色に輝く不思議な宝石が落ちていた.あなたはその惑星への降下を試みようと考えたが,重大な問題のためにそれは不可能であることがわかった.その惑星の空気には,人間が触れただけで...
2 10 11 11 12 2 N 2 E 1 2 10 11 11 12 2 N 2 W 1 3 0 15 5 10 5 15 5 W 10 S 10 N 20 E 10 S 10 0
Yes No No
25,720
s633378353
p01125
u074302614
1565051618
Python
Python3
py
Accepted
80
5636
1,593
import sys while True: n = int(input()) if n != 0: jewels = [[int(i) for i in input().split()] for j in range(n)] n = int(input()) moves = [[i for i in input().split()] for k in range(n)] for i, j in enumerate(moves): moves[i][1] = int(moves[i][1]) coodinat...
p01125
<h1>Mysterious Gems</h1> <p> 宇宙暦 1603〜1867 年,人々はその時代のことを EDO 時代と呼ぶ.EDO とは当時最先端の宇宙航行技術,Enhanced Driving Operation のことであり、1603 年に Dr.Izy によって開発された. </p> <p> あなたは宇宙冒険家であり,宇宙を飛び回って様々な惑星を冒険していた.その冒険の途中で,あなたはとても不思議な惑星を発見した.その惑星には,至るところに七色に輝く不思議な宝石が落ちていた.あなたはその惑星への降下を試みようと考えたが,重大な問題のためにそれは不可能であることがわかった.その惑星の空気には,人間が触れただけで...
2 10 11 11 12 2 N 2 E 1 2 10 11 11 12 2 N 2 W 1 3 0 15 5 10 5 15 5 W 10 S 10 N 20 E 10 S 10 0
Yes No No
25,721
s268568283
p01125
u777299405
1562845211
Python
Python3
py
Accepted
100
5616
578
commands = {"W": (-1, 0), "E": (1, 0), "S": (0, -1), "N": (0, 1)} while True: n = int(input()) if n == 0: break gems = [] ans = "No" for i in range(n): gems.append(list(map(int, input().split()))) m = int(input()) pos = [10, 10] for i in range(m): direction, step...
p01125
<h1>Mysterious Gems</h1> <p> 宇宙暦 1603〜1867 年,人々はその時代のことを EDO 時代と呼ぶ.EDO とは当時最先端の宇宙航行技術,Enhanced Driving Operation のことであり、1603 年に Dr.Izy によって開発された. </p> <p> あなたは宇宙冒険家であり,宇宙を飛び回って様々な惑星を冒険していた.その冒険の途中で,あなたはとても不思議な惑星を発見した.その惑星には,至るところに七色に輝く不思議な宝石が落ちていた.あなたはその惑星への降下を試みようと考えたが,重大な問題のためにそれは不可能であることがわかった.その惑星の空気には,人間が触れただけで...
2 10 11 11 12 2 N 2 E 1 2 10 11 11 12 2 N 2 W 1 3 0 15 5 10 5 15 5 W 10 S 10 N 20 E 10 S 10 0
Yes No No
25,722
s319549516
p01125
u989573662
1561496095
Python
Python3
py
Accepted
80
5632
984
#!/usr/bin/env python3 #aoj a while 1: N = int(input()) if N == 0: break A = [list(map(int,input().split())) for _ in range(N)] M = int(input()) B = [list(input().split()) for _ in range(M)] D = [] nx,ny = 10,10 for i in range(M): if B[i][0] == "N": for j in ...
p01125
<h1>Mysterious Gems</h1> <p> 宇宙暦 1603〜1867 年,人々はその時代のことを EDO 時代と呼ぶ.EDO とは当時最先端の宇宙航行技術,Enhanced Driving Operation のことであり、1603 年に Dr.Izy によって開発された. </p> <p> あなたは宇宙冒険家であり,宇宙を飛び回って様々な惑星を冒険していた.その冒険の途中で,あなたはとても不思議な惑星を発見した.その惑星には,至るところに七色に輝く不思議な宝石が落ちていた.あなたはその惑星への降下を試みようと考えたが,重大な問題のためにそれは不可能であることがわかった.その惑星の空気には,人間が触れただけで...
2 10 11 11 12 2 N 2 E 1 2 10 11 11 12 2 N 2 W 1 3 0 15 5 10 5 15 5 W 10 S 10 N 20 E 10 S 10 0
Yes No No
25,723
s393148153
p01125
u766926358
1561468254
Python
Python3
py
Accepted
70
6004
1,515
from collections import defaultdict def check(D, STEP, x, y): global moves_x, moves_y, oks if D == 'N': y += STEP for _y, i in moves_x.get(x, []): if y-STEP <= _y and _y <= y: oks[i] = 1 else: continue return x, y elif D == '...
p01125
<h1>Mysterious Gems</h1> <p> 宇宙暦 1603〜1867 年,人々はその時代のことを EDO 時代と呼ぶ.EDO とは当時最先端の宇宙航行技術,Enhanced Driving Operation のことであり、1603 年に Dr.Izy によって開発された. </p> <p> あなたは宇宙冒険家であり,宇宙を飛び回って様々な惑星を冒険していた.その冒険の途中で,あなたはとても不思議な惑星を発見した.その惑星には,至るところに七色に輝く不思議な宝石が落ちていた.あなたはその惑星への降下を試みようと考えたが,重大な問題のためにそれは不可能であることがわかった.その惑星の空気には,人間が触れただけで...
2 10 11 11 12 2 N 2 E 1 2 10 11 11 12 2 N 2 W 1 3 0 15 5 10 5 15 5 W 10 S 10 N 20 E 10 S 10 0
Yes No No
25,724
s913696457
p01125
u556131648
1561465715
Python
Python3
py
Accepted
80
5648
928
def solve(N, xy, M, diredist): now = (10, 10) field = [[0]*21 for i in range(21)] field[now[0]][now[1]] = 1 direction = {"N":(1, 0), "W":(0,-1), "S":(-1, 0), "E":(0, 1)} for i in range(M): dire = direction[diredist[i][0]] dist = int(diredist[i][1]) for j in range(dist): ...
p01125
<h1>Mysterious Gems</h1> <p> 宇宙暦 1603〜1867 年,人々はその時代のことを EDO 時代と呼ぶ.EDO とは当時最先端の宇宙航行技術,Enhanced Driving Operation のことであり、1603 年に Dr.Izy によって開発された. </p> <p> あなたは宇宙冒険家であり,宇宙を飛び回って様々な惑星を冒険していた.その冒険の途中で,あなたはとても不思議な惑星を発見した.その惑星には,至るところに七色に輝く不思議な宝石が落ちていた.あなたはその惑星への降下を試みようと考えたが,重大な問題のためにそれは不可能であることがわかった.その惑星の空気には,人間が触れただけで...
2 10 11 11 12 2 N 2 E 1 2 10 11 11 12 2 N 2 W 1 3 0 15 5 10 5 15 5 W 10 S 10 N 20 E 10 S 10 0
Yes No No
25,725
s284780480
p01125
u200148444
1560765814
Python
Python3
py
Accepted
100
5620
834
while True : x=10 y=10 n=int(input()) if n==0:break l=[input() for _ in range(n)] l2=["10 10"] n2=int(input()) for i in range(n2): a,b=map(str,input().split()) b=int(b) if a=="N": for i in range(b): y+=1 l2.append("{} {}...
p01125
<h1>Mysterious Gems</h1> <p> 宇宙暦 1603〜1867 年,人々はその時代のことを EDO 時代と呼ぶ.EDO とは当時最先端の宇宙航行技術,Enhanced Driving Operation のことであり、1603 年に Dr.Izy によって開発された. </p> <p> あなたは宇宙冒険家であり,宇宙を飛び回って様々な惑星を冒険していた.その冒険の途中で,あなたはとても不思議な惑星を発見した.その惑星には,至るところに七色に輝く不思議な宝石が落ちていた.あなたはその惑星への降下を試みようと考えたが,重大な問題のためにそれは不可能であることがわかった.その惑星の空気には,人間が触れただけで...
2 10 11 11 12 2 N 2 E 1 2 10 11 11 12 2 N 2 W 1 3 0 15 5 10 5 15 5 W 10 S 10 N 20 E 10 S 10 0
Yes No No
25,726
s078067742
p01125
u037441960
1560757623
Python
Python3
py
Accepted
90
5632
1,585
def set(Map, x, y) : for i in range(N) : Map[y[i]][x[i]] = 1 return Map def search(Map, dir, dis) : X = 10 Y = 10 for i in range(M) : if(dir[i] == "S") : if(Y + dis[i] <= 20) : for j in range(dis[i]+ 1) : Map[Y + j][X] = 0 Y += dis[i] else : for j in range(20 - Y) : Map[Y + j][X] =...
p01125
<h1>Mysterious Gems</h1> <p> 宇宙暦 1603〜1867 年,人々はその時代のことを EDO 時代と呼ぶ.EDO とは当時最先端の宇宙航行技術,Enhanced Driving Operation のことであり、1603 年に Dr.Izy によって開発された. </p> <p> あなたは宇宙冒険家であり,宇宙を飛び回って様々な惑星を冒険していた.その冒険の途中で,あなたはとても不思議な惑星を発見した.その惑星には,至るところに七色に輝く不思議な宝石が落ちていた.あなたはその惑星への降下を試みようと考えたが,重大な問題のためにそれは不可能であることがわかった.その惑星の空気には,人間が触れただけで...
2 10 11 11 12 2 N 2 E 1 2 10 11 11 12 2 N 2 W 1 3 0 15 5 10 5 15 5 W 10 S 10 N 20 E 10 S 10 0
Yes No No
25,727
s652070336
p01125
u717526540
1545180176
Python
Python3
py
Accepted
80
5616
675
while 1: n = int(input()) if n == 0: break jewel = [] for _ in range(n): x, y = map(int, input().split()) jewel.append([x, y]) m = int(input()) pos = [10, 10] for _ in range(m): news, dis = input().split() dis = int(dis) for i in range(dis):...
p01125
<h1>Mysterious Gems</h1> <p> 宇宙暦 1603〜1867 年,人々はその時代のことを EDO 時代と呼ぶ.EDO とは当時最先端の宇宙航行技術,Enhanced Driving Operation のことであり、1603 年に Dr.Izy によって開発された. </p> <p> あなたは宇宙冒険家であり,宇宙を飛び回って様々な惑星を冒険していた.その冒険の途中で,あなたはとても不思議な惑星を発見した.その惑星には,至るところに七色に輝く不思議な宝石が落ちていた.あなたはその惑星への降下を試みようと考えたが,重大な問題のためにそれは不可能であることがわかった.その惑星の空気には,人間が触れただけで...
2 10 11 11 12 2 N 2 E 1 2 10 11 11 12 2 N 2 W 1 3 0 15 5 10 5 15 5 W 10 S 10 N 20 E 10 S 10 0
Yes No No
25,728
s842246831
p01125
u281836941
1513073283
Python
Python3
py
Accepted
100
5628
697
# coding: utf-8 dic={'N':(0,1),'E':(1,0),'S':(0,-1),'W':(-1,0)} def move(v,robot): return (robot[0]+dic[v][0],robot[1]+dic[v][1]) while True: n=int(input()) if n==0: break field=[[False for i in range(21)] for i in range(21)] for i in range(n): x,y=map(int,input().split()) f...
p01125
<h1>Mysterious Gems</h1> <p> 宇宙暦 1603〜1867 年,人々はその時代のことを EDO 時代と呼ぶ.EDO とは当時最先端の宇宙航行技術,Enhanced Driving Operation のことであり、1603 年に Dr.Izy によって開発された. </p> <p> あなたは宇宙冒険家であり,宇宙を飛び回って様々な惑星を冒険していた.その冒険の途中で,あなたはとても不思議な惑星を発見した.その惑星には,至るところに七色に輝く不思議な宝石が落ちていた.あなたはその惑星への降下を試みようと考えたが,重大な問題のためにそれは不可能であることがわかった.その惑星の空気には,人間が触れただけで...
2 10 11 11 12 2 N 2 E 1 2 10 11 11 12 2 N 2 W 1 3 0 15 5 10 5 15 5 W 10 S 10 N 20 E 10 S 10 0
Yes No No
25,729
s279415531
p01125
u717727327
1419094636
Python
Python
py
Accepted
50
4256
676
while True: N = int(raw_input()) if N == 0: break gems = [] x, y = 10, 10 direc = { "N": (0, 1), "E": (1, 0), "S": (0, -1), "W": (-1, 0) } for _ in range(N): xi, yi = map(int, raw_input().split()) gems.append((xi, yi)) M = int(ra...
p01125
<h1>Mysterious Gems</h1> <p> 宇宙暦 1603〜1867 年,人々はその時代のことを EDO 時代と呼ぶ.EDO とは当時最先端の宇宙航行技術,Enhanced Driving Operation のことであり、1603 年に Dr.Izy によって開発された. </p> <p> あなたは宇宙冒険家であり,宇宙を飛び回って様々な惑星を冒険していた.その冒険の途中で,あなたはとても不思議な惑星を発見した.その惑星には,至るところに七色に輝く不思議な宝石が落ちていた.あなたはその惑星への降下を試みようと考えたが,重大な問題のためにそれは不可能であることがわかった.その惑星の空気には,人間が触れただけで...
2 10 11 11 12 2 N 2 E 1 2 10 11 11 12 2 N 2 W 1 3 0 15 5 10 5 15 5 W 10 S 10 N 20 E 10 S 10 0
Yes No No
25,730
s410852671
p01131
u046108504
1555792857
Python
Python3
py
Accepted
100
5636
560
button = [ ["", "", ""], [".", ",", "!", "?", " "], ["a", "b", "c"], ["d", "e", "f"], ["g", "h", "i"], ["j", "k", "l"], ["m", "n", "o"], ["p", "q", "r", "s"], ["t", "u", "v"], ["w", "x", "y", "z"], ] N = int(input()) for _ in range(N): S = "" count = 0 l = list(input...
p01131
<h1><font color="#000000">Problem A:</font> Keitai Message</h1> <p> Alice さんは Miku さんに携帯電話でメールを送ろうとしている。 </p> <p> 携帯電話には入力に使えるボタンは数字のボタンしかない。 そこで、文字の入力をするために数字ボタンを何度か押して文字の入力を行う。携帯電話の数字ボタンには、次の文字が割り当てられており、ボタン 0 は確定ボタンが割り当てられている。この携帯電話では 1 文字の入力が終わったら必ず確定ボタンを押すことになっている。 </p> <ul> <li>1: . , ! ? (スペー...
5 20 220 222220 44033055505550666011011111090666077705550301110 000555555550000330000444000080000200004440000
a b b hello, world! keitai
25,731
s951592508
p01131
u489876484
1556885283
Python
Python3
py
Accepted
30
5624
550
def solve(mm, cmd): bf = cmd[0] c = 0 ans = "" for s in cmd[1::]: if bf == s: c += 1 else: if s == '0': ans += mm[bf][c%len(mm[bf])] c = 0 bf = s return ans def main(): N = int(input()) cc = [ [".",",","!","?"," "], ["a","b","c"], ["d","e","f"], ["g","h","i"], ["j","k","l"],...
p01131
<h1><font color="#000000">Problem A:</font> Keitai Message</h1> <p> Alice さんは Miku さんに携帯電話でメールを送ろうとしている。 </p> <p> 携帯電話には入力に使えるボタンは数字のボタンしかない。 そこで、文字の入力をするために数字ボタンを何度か押して文字の入力を行う。携帯電話の数字ボタンには、次の文字が割り当てられており、ボタン 0 は確定ボタンが割り当てられている。この携帯電話では 1 文字の入力が終わったら必ず確定ボタンを押すことになっている。 </p> <ul> <li>1: . , ! ? (スペー...
5 20 220 222220 44033055505550666011011111090666077705550301110 000555555550000330000444000080000200004440000
a b b hello, world! keitai
25,732
s864861789
p01131
u617183767
1420197459
Python
Python
py
Accepted
40
4676
1,247
#! /usr/bin/env python # -*- coding: utf-8 -*- import os import sys import itertools import math from collections import Counter, defaultdict class Main(object): def __init__(self): pass def solve(self): ''' insert your code ''' t = { 0: [], ...
p01131
<h1><font color="#000000">Problem A:</font> Keitai Message</h1> <p> Alice さんは Miku さんに携帯電話でメールを送ろうとしている。 </p> <p> 携帯電話には入力に使えるボタンは数字のボタンしかない。 そこで、文字の入力をするために数字ボタンを何度か押して文字の入力を行う。携帯電話の数字ボタンには、次の文字が割り当てられており、ボタン 0 は確定ボタンが割り当てられている。この携帯電話では 1 文字の入力が終わったら必ず確定ボタンを押すことになっている。 </p> <ul> <li>1: . , ! ? (スペー...
5 20 220 222220 44033055505550666011011111090666077705550301110 000555555550000330000444000080000200004440000
a b b hello, world! keitai
25,733
s399089247
p01131
u316268279
1420530099
Python
Python3
py
Accepted
100
6736
581
#!/usr/bin/env python # -*- coding: utf-8 -*- button = [[''],['.',',','!','?',' '], ['a','b','c'], ['d','e','f'], ['g','h','i'], ['j','k','l'], ['m','n','o'], ['p','q','r','s'], ['t','u','v'], ['w','x','y','z']] n = int(input()) for i in range(n): inputStr = list(map(int,list(input()))) count = 0 for j in...
p01131
<h1><font color="#000000">Problem A:</font> Keitai Message</h1> <p> Alice さんは Miku さんに携帯電話でメールを送ろうとしている。 </p> <p> 携帯電話には入力に使えるボタンは数字のボタンしかない。 そこで、文字の入力をするために数字ボタンを何度か押して文字の入力を行う。携帯電話の数字ボタンには、次の文字が割り当てられており、ボタン 0 は確定ボタンが割り当てられている。この携帯電話では 1 文字の入力が終わったら必ず確定ボタンを押すことになっている。 </p> <ul> <li>1: . , ! ? (スペー...
5 20 220 222220 44033055505550666011011111090666077705550301110 000555555550000330000444000080000200004440000
a b b hello, world! keitai
25,734
s168452025
p01131
u731235119
1421847172
Python
Python
py
Accepted
50
4352
1,101
class Button : def __init__(self): self.key_dict = { ("","1"): ".", (".","1"):",", (",","1"):"!", ("!","1"):"?", ("?","1"):" ", (" ","1"):".", ("","2"): "a", ("a","2"):"b", ("b","2"):"c", ("c","2"):"a", ("","3"): "d", ("d","3"): "e", ("e","3"): "f", ("f","3"): "d", ("","4"): "g", ("g","4"): ...
p01131
<h1><font color="#000000">Problem A:</font> Keitai Message</h1> <p> Alice さんは Miku さんに携帯電話でメールを送ろうとしている。 </p> <p> 携帯電話には入力に使えるボタンは数字のボタンしかない。 そこで、文字の入力をするために数字ボタンを何度か押して文字の入力を行う。携帯電話の数字ボタンには、次の文字が割り当てられており、ボタン 0 は確定ボタンが割り当てられている。この携帯電話では 1 文字の入力が終わったら必ず確定ボタンを押すことになっている。 </p> <ul> <li>1: . , ! ? (スペー...
5 20 220 222220 44033055505550666011011111090666077705550301110 000555555550000330000444000080000200004440000
a b b hello, world! keitai
25,735
s492918908
p01131
u120360464
1421911624
Python
Python
py
Accepted
30
4288
773
#! /usr/bin/python # -*- coding: utf-8 -*- table = [[],[".",",","!","?"," "],["a","b","c"],["d","e","f"],\ ["g","h","i"],["j","k","l"],["m","n","o"],["p","q","r","s"],\ ["t","u","v"],["w","x","y","z"]] n = int(raw_input()) for i in range(n): m = raw_input() ans = "" pre = '0' cnt = 0 ...
p01131
<h1><font color="#000000">Problem A:</font> Keitai Message</h1> <p> Alice さんは Miku さんに携帯電話でメールを送ろうとしている。 </p> <p> 携帯電話には入力に使えるボタンは数字のボタンしかない。 そこで、文字の入力をするために数字ボタンを何度か押して文字の入力を行う。携帯電話の数字ボタンには、次の文字が割り当てられており、ボタン 0 は確定ボタンが割り当てられている。この携帯電話では 1 文字の入力が終わったら必ず確定ボタンを押すことになっている。 </p> <ul> <li>1: . , ! ? (スペー...
5 20 220 222220 44033055505550666011011111090666077705550301110 000555555550000330000444000080000200004440000
a b b hello, world! keitai
25,736
s034600245
p01131
u124909914
1425455355
Python
Python3
py
Accepted
90
6736
607
#!/usr/bin/python3 def atoi(c): return ord(c) - ord('0') table = [(), #dummy ('.',',','!','?',' '),\ ('a','b','c'), ('d','e','f'), ('g','h','i'), ('j','k','l'), ('m','n','o'), ('p','q','r','s'), ('t','u','v'), ('w','x','y','z')] n = int(inpu...
p01131
<h1><font color="#000000">Problem A:</font> Keitai Message</h1> <p> Alice さんは Miku さんに携帯電話でメールを送ろうとしている。 </p> <p> 携帯電話には入力に使えるボタンは数字のボタンしかない。 そこで、文字の入力をするために数字ボタンを何度か押して文字の入力を行う。携帯電話の数字ボタンには、次の文字が割り当てられており、ボタン 0 は確定ボタンが割り当てられている。この携帯電話では 1 文字の入力が終わったら必ず確定ボタンを押すことになっている。 </p> <ul> <li>1: . , ! ? (スペー...
5 20 220 222220 44033055505550666011011111090666077705550301110 000555555550000330000444000080000200004440000
a b b hello, world! keitai
25,737
s811614134
p01131
u998188826
1441291218
Python
Python3
py
Accepted
50
7704
343
import itertools table = { 1: '.,!? ', 2: 'abc', 3: 'def', 4: 'ghi', 5: 'jkl', 6: 'mno', 7: 'pqrs', 8: 'tuv', 9: 'wxyz' } for i in range(int(input())): s = input() r = '' for k, g in itertools.groupby(s): if k == '0': continue k = int(k) i = (len(list(g)) - 1) % len(table[k]) r +...
p01131
<h1><font color="#000000">Problem A:</font> Keitai Message</h1> <p> Alice さんは Miku さんに携帯電話でメールを送ろうとしている。 </p> <p> 携帯電話には入力に使えるボタンは数字のボタンしかない。 そこで、文字の入力をするために数字ボタンを何度か押して文字の入力を行う。携帯電話の数字ボタンには、次の文字が割り当てられており、ボタン 0 は確定ボタンが割り当てられている。この携帯電話では 1 文字の入力が終わったら必ず確定ボタンを押すことになっている。 </p> <ul> <li>1: . , ! ? (スペー...
5 20 220 222220 44033055505550666011011111090666077705550301110 000555555550000330000444000080000200004440000
a b b hello, world! keitai
25,738
s387811180
p01131
u338932851
1450263038
Python
Python
py
Accepted
30
6444
772
d = {1:{1:'.',2:',',3:'!',4:'?',5:' '}, 2:{1:'a',2:'b',3:'c'}, 3:{1:'d',2:'e',3:'f'}, 4:{1:'g',2:'h',3:'i'}, 5:{1:'j',2:'k',3:'l'}, 6:{1:'m',2:'n',3:'o'}, 7:{1:'p',2:'q',3:'r',4:'s'}, 8:{1:'t',2:'u',3:'v'}, 9:{1:'w',2:'x',3:'y',4:'z'} } n = int(raw_input()) for i in range(n): ...
p01131
<h1><font color="#000000">Problem A:</font> Keitai Message</h1> <p> Alice さんは Miku さんに携帯電話でメールを送ろうとしている。 </p> <p> 携帯電話には入力に使えるボタンは数字のボタンしかない。 そこで、文字の入力をするために数字ボタンを何度か押して文字の入力を行う。携帯電話の数字ボタンには、次の文字が割り当てられており、ボタン 0 は確定ボタンが割り当てられている。この携帯電話では 1 文字の入力が終わったら必ず確定ボタンを押すことになっている。 </p> <ul> <li>1: . , ! ? (スペー...
5 20 220 222220 44033055505550666011011111090666077705550301110 000555555550000330000444000080000200004440000
a b b hello, world! keitai
25,739
s924012766
p01131
u488601719
1452326926
Python
Python
py
Accepted
20
6252
400
ref = {"1":".,!? ", "2":"abc", "3":"def", "4":"ghi", "5":"jkl", "6":"mno", "7":"pqrs", "8":"tuv", "9":"wxyz"} n = int(raw_input()) for _ in range(n): ans = "" inputs = map(str, raw_input().split('0')) for i in inputs: if len(i) > 0: ...
p01131
<h1><font color="#000000">Problem A:</font> Keitai Message</h1> <p> Alice さんは Miku さんに携帯電話でメールを送ろうとしている。 </p> <p> 携帯電話には入力に使えるボタンは数字のボタンしかない。 そこで、文字の入力をするために数字ボタンを何度か押して文字の入力を行う。携帯電話の数字ボタンには、次の文字が割り当てられており、ボタン 0 は確定ボタンが割り当てられている。この携帯電話では 1 文字の入力が終わったら必ず確定ボタンを押すことになっている。 </p> <ul> <li>1: . , ! ? (スペー...
5 20 220 222220 44033055505550666011011111090666077705550301110 000555555550000330000444000080000200004440000
a b b hello, world! keitai
25,740
s785972607
p01131
u994049982
1458672300
Python
Python
py
Accepted
20
6332
357
dats=[0,[".",",","!","?"," "],["a","b","c"],["d","e","f"],["g","h","i"],["j","k","l"],["m","n","o"],["p","q","r","s"],["t","u","v"],['w','x','y','z']] for p in range(input()): a=raw_input().split('0') b="" for i in range(len(a)): if a[i]!="": c=a[i] b=b+dats[int(c[0])][len(c)...
p01131
<h1><font color="#000000">Problem A:</font> Keitai Message</h1> <p> Alice さんは Miku さんに携帯電話でメールを送ろうとしている。 </p> <p> 携帯電話には入力に使えるボタンは数字のボタンしかない。 そこで、文字の入力をするために数字ボタンを何度か押して文字の入力を行う。携帯電話の数字ボタンには、次の文字が割り当てられており、ボタン 0 は確定ボタンが割り当てられている。この携帯電話では 1 文字の入力が終わったら必ず確定ボタンを押すことになっている。 </p> <ul> <li>1: . , ! ? (スペー...
5 20 220 222220 44033055505550666011011111090666077705550301110 000555555550000330000444000080000200004440000
a b b hello, world! keitai
25,741
s212869008
p01131
u797673668
1461571107
Python
Python3
py
Accepted
60
7580
495
chars = (None, '.,!? ', 'abc', 'def', 'ghi', 'jkl', 'mno', 'pqrs', 'tuv', 'wxyz') n = int(input()) while n: n -= 1 s = input() number, counter = 0, 0 for c in s: if c == '0': if number: charset = chars[number] print(charset[(counter - 1) % len(charset...
p01131
<h1><font color="#000000">Problem A:</font> Keitai Message</h1> <p> Alice さんは Miku さんに携帯電話でメールを送ろうとしている。 </p> <p> 携帯電話には入力に使えるボタンは数字のボタンしかない。 そこで、文字の入力をするために数字ボタンを何度か押して文字の入力を行う。携帯電話の数字ボタンには、次の文字が割り当てられており、ボタン 0 は確定ボタンが割り当てられている。この携帯電話では 1 文字の入力が終わったら必ず確定ボタンを押すことになっている。 </p> <ul> <li>1: . , ! ? (スペー...
5 20 220 222220 44033055505550666011011111090666077705550301110 000555555550000330000444000080000200004440000
a b b hello, world! keitai
25,742
s912524560
p01131
u260980560
1467374001
Python
Python
py
Accepted
60
6336
406
btn = [None, ".,!? ", "abc", "def", "ghi", "jkl", "mno", "pqrs", "tuv", "wxyz"] for t in range(input()): state = 0 cnt = -1 ans = "" for c in map(int, raw_input()): if c: cnt += 1 state = c else: if state: tgt = btn[state] ...
p01131
<h1><font color="#000000">Problem A:</font> Keitai Message</h1> <p> Alice さんは Miku さんに携帯電話でメールを送ろうとしている。 </p> <p> 携帯電話には入力に使えるボタンは数字のボタンしかない。 そこで、文字の入力をするために数字ボタンを何度か押して文字の入力を行う。携帯電話の数字ボタンには、次の文字が割り当てられており、ボタン 0 は確定ボタンが割り当てられている。この携帯電話では 1 文字の入力が終わったら必ず確定ボタンを押すことになっている。 </p> <ul> <li>1: . , ! ? (スペー...
5 20 220 222220 44033055505550666011011111090666077705550301110 000555555550000330000444000080000200004440000
a b b hello, world! keitai
25,743