submission_id string | problem_id string | status string | code string | input string | output string | problem_description string |
|---|---|---|---|---|---|---|
s315737217 | p00020 | Accepted | a = str(input())
print(a.upper())
| this is a pen.
| THIS IS A PEN.
|
<H1>Capitalize</H1>
<p>
Write a program which replace all the lower-case letters of a given text with the corresponding captital letters.
</p>
<H2>Input</H2>
<p>
A text including lower-case letters, periods, and space is given in a line. The number of characters in the text is less than or equal to 200.
</p>
<H2>Output</H2>
<p>
Print the converted text.
</p>
<H2>Sample Input</H2>
<pre>
this is a pen.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
THIS IS A PEN.
</pre>
|
s365195073 | p00020 | Accepted | str=str(input())
str=str.upper()
print(str)
| this is a pen.
| THIS IS A PEN.
|
<H1>Capitalize</H1>
<p>
Write a program which replace all the lower-case letters of a given text with the corresponding captital letters.
</p>
<H2>Input</H2>
<p>
A text including lower-case letters, periods, and space is given in a line. The number of characters in the text is less than or equal to 200.
</p>
<H2>Output</H2>
<p>
Print the converted text.
</p>
<H2>Sample Input</H2>
<pre>
this is a pen.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
THIS IS A PEN.
</pre>
|
s545373753 | p00020 | Accepted | # coding: utf-8
# 52
A = input()
print(A.upper())
| this is a pen.
| THIS IS A PEN.
|
<H1>Capitalize</H1>
<p>
Write a program which replace all the lower-case letters of a given text with the corresponding captital letters.
</p>
<H2>Input</H2>
<p>
A text including lower-case letters, periods, and space is given in a line. The number of characters in the text is less than or equal to 200.
</p>
<H2>Output</H2>
<p>
Print the converted text.
</p>
<H2>Sample Input</H2>
<pre>
this is a pen.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
THIS IS A PEN.
</pre>
|
s623841295 | p00020 | Accepted | a = str(input())
a = a.upper()
print(a)
| this is a pen.
| THIS IS A PEN.
|
<H1>Capitalize</H1>
<p>
Write a program which replace all the lower-case letters of a given text with the corresponding captital letters.
</p>
<H2>Input</H2>
<p>
A text including lower-case letters, periods, and space is given in a line. The number of characters in the text is less than or equal to 200.
</p>
<H2>Output</H2>
<p>
Print the converted text.
</p>
<H2>Sample Input</H2>
<pre>
this is a pen.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
THIS IS A PEN.
</pre>
|
s424659840 | p00020 | Accepted | x=input()
y=x.upper()
print(y)
| this is a pen.
| THIS IS A PEN.
|
<H1>Capitalize</H1>
<p>
Write a program which replace all the lower-case letters of a given text with the corresponding captital letters.
</p>
<H2>Input</H2>
<p>
A text including lower-case letters, periods, and space is given in a line. The number of characters in the text is less than or equal to 200.
</p>
<H2>Output</H2>
<p>
Print the converted text.
</p>
<H2>Sample Input</H2>
<pre>
this is a pen.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
THIS IS A PEN.
</pre>
|
s931033674 | p00020 | Accepted |
a = input()
print(a.upper())
| this is a pen.
| THIS IS A PEN.
|
<H1>Capitalize</H1>
<p>
Write a program which replace all the lower-case letters of a given text with the corresponding captital letters.
</p>
<H2>Input</H2>
<p>
A text including lower-case letters, periods, and space is given in a line. The number of characters in the text is less than or equal to 200.
</p>
<H2>Output</H2>
<p>
Print the converted text.
</p>
<H2>Sample Input</H2>
<pre>
this is a pen.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
THIS IS A PEN.
</pre>
|
s462450376 | p00020 | Accepted | n=input()
print(str.upper(n))
| this is a pen.
| THIS IS A PEN.
|
<H1>Capitalize</H1>
<p>
Write a program which replace all the lower-case letters of a given text with the corresponding captital letters.
</p>
<H2>Input</H2>
<p>
A text including lower-case letters, periods, and space is given in a line. The number of characters in the text is less than or equal to 200.
</p>
<H2>Output</H2>
<p>
Print the converted text.
</p>
<H2>Sample Input</H2>
<pre>
this is a pen.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
THIS IS A PEN.
</pre>
|
s748899930 | p00020 | Accepted |
a=input()
a=str.upper(a)
print(a)
| this is a pen.
| THIS IS A PEN.
|
<H1>Capitalize</H1>
<p>
Write a program which replace all the lower-case letters of a given text with the corresponding captital letters.
</p>
<H2>Input</H2>
<p>
A text including lower-case letters, periods, and space is given in a line. The number of characters in the text is less than or equal to 200.
</p>
<H2>Output</H2>
<p>
Print the converted text.
</p>
<H2>Sample Input</H2>
<pre>
this is a pen.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
THIS IS A PEN.
</pre>
|
s158791294 | p00020 | Accepted | text = input()
print(text.upper())
| this is a pen.
| THIS IS A PEN.
|
<H1>Capitalize</H1>
<p>
Write a program which replace all the lower-case letters of a given text with the corresponding captital letters.
</p>
<H2>Input</H2>
<p>
A text including lower-case letters, periods, and space is given in a line. The number of characters in the text is less than or equal to 200.
</p>
<H2>Output</H2>
<p>
Print the converted text.
</p>
<H2>Sample Input</H2>
<pre>
this is a pen.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
THIS IS A PEN.
</pre>
|
s611473842 | p00020 | Accepted | n =str(input())
print(n.upper())
| this is a pen.
| THIS IS A PEN.
|
<H1>Capitalize</H1>
<p>
Write a program which replace all the lower-case letters of a given text with the corresponding captital letters.
</p>
<H2>Input</H2>
<p>
A text including lower-case letters, periods, and space is given in a line. The number of characters in the text is less than or equal to 200.
</p>
<H2>Output</H2>
<p>
Print the converted text.
</p>
<H2>Sample Input</H2>
<pre>
this is a pen.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
THIS IS A PEN.
</pre>
|
s108284830 | p00020 | Accepted | #0020
x = str(input())
print(str.upper(x))
| this is a pen.
| THIS IS A PEN.
|
<H1>Capitalize</H1>
<p>
Write a program which replace all the lower-case letters of a given text with the corresponding captital letters.
</p>
<H2>Input</H2>
<p>
A text including lower-case letters, periods, and space is given in a line. The number of characters in the text is less than or equal to 200.
</p>
<H2>Output</H2>
<p>
Print the converted text.
</p>
<H2>Sample Input</H2>
<pre>
this is a pen.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
THIS IS A PEN.
</pre>
|
s177189708 | p00020 | Accepted | x=input()
print(x.upper())
| this is a pen.
| THIS IS A PEN.
|
<H1>Capitalize</H1>
<p>
Write a program which replace all the lower-case letters of a given text with the corresponding captital letters.
</p>
<H2>Input</H2>
<p>
A text including lower-case letters, periods, and space is given in a line. The number of characters in the text is less than or equal to 200.
</p>
<H2>Output</H2>
<p>
Print the converted text.
</p>
<H2>Sample Input</H2>
<pre>
this is a pen.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
THIS IS A PEN.
</pre>
|
s976117737 | p00020 | Accepted | s=str(input())
print(s.upper())
| this is a pen.
| THIS IS A PEN.
|
<H1>Capitalize</H1>
<p>
Write a program which replace all the lower-case letters of a given text with the corresponding captital letters.
</p>
<H2>Input</H2>
<p>
A text including lower-case letters, periods, and space is given in a line. The number of characters in the text is less than or equal to 200.
</p>
<H2>Output</H2>
<p>
Print the converted text.
</p>
<H2>Sample Input</H2>
<pre>
this is a pen.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
THIS IS A PEN.
</pre>
|
s400816897 | p00020 | Accepted | x = input()
print(x.upper())
| this is a pen.
| THIS IS A PEN.
|
<H1>Capitalize</H1>
<p>
Write a program which replace all the lower-case letters of a given text with the corresponding captital letters.
</p>
<H2>Input</H2>
<p>
A text including lower-case letters, periods, and space is given in a line. The number of characters in the text is less than or equal to 200.
</p>
<H2>Output</H2>
<p>
Print the converted text.
</p>
<H2>Sample Input</H2>
<pre>
this is a pen.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
THIS IS A PEN.
</pre>
|
s474192990 | p00020 | Accepted | n=input()
s=n.upper()
print(s)
| this is a pen.
| THIS IS A PEN.
|
<H1>Capitalize</H1>
<p>
Write a program which replace all the lower-case letters of a given text with the corresponding captital letters.
</p>
<H2>Input</H2>
<p>
A text including lower-case letters, periods, and space is given in a line. The number of characters in the text is less than or equal to 200.
</p>
<H2>Output</H2>
<p>
Print the converted text.
</p>
<H2>Sample Input</H2>
<pre>
this is a pen.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
THIS IS A PEN.
</pre>
|
s839352444 | p00020 | Accepted | n=input()
m=n.upper()
print(m)
| this is a pen.
| THIS IS A PEN.
|
<H1>Capitalize</H1>
<p>
Write a program which replace all the lower-case letters of a given text with the corresponding captital letters.
</p>
<H2>Input</H2>
<p>
A text including lower-case letters, periods, and space is given in a line. The number of characters in the text is less than or equal to 200.
</p>
<H2>Output</H2>
<p>
Print the converted text.
</p>
<H2>Sample Input</H2>
<pre>
this is a pen.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
THIS IS A PEN.
</pre>
|
s208345841 | p00020 | Accepted | x=str(input())
y=x.upper()
print(y)
| this is a pen.
| THIS IS A PEN.
|
<H1>Capitalize</H1>
<p>
Write a program which replace all the lower-case letters of a given text with the corresponding captital letters.
</p>
<H2>Input</H2>
<p>
A text including lower-case letters, periods, and space is given in a line. The number of characters in the text is less than or equal to 200.
</p>
<H2>Output</H2>
<p>
Print the converted text.
</p>
<H2>Sample Input</H2>
<pre>
this is a pen.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
THIS IS A PEN.
</pre>
|
s657163259 | p00020 | Accepted | #標準入力をし大文字になおす
print(input().upper())
| this is a pen.
| THIS IS A PEN.
|
<H1>Capitalize</H1>
<p>
Write a program which replace all the lower-case letters of a given text with the corresponding captital letters.
</p>
<H2>Input</H2>
<p>
A text including lower-case letters, periods, and space is given in a line. The number of characters in the text is less than or equal to 200.
</p>
<H2>Output</H2>
<p>
Print the converted text.
</p>
<H2>Sample Input</H2>
<pre>
this is a pen.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
THIS IS A PEN.
</pre>
|
s927635874 | p00020 | Accepted | s = input()
s = s.upper()
print(s)
| this is a pen.
| THIS IS A PEN.
|
<H1>Capitalize</H1>
<p>
Write a program which replace all the lower-case letters of a given text with the corresponding captital letters.
</p>
<H2>Input</H2>
<p>
A text including lower-case letters, periods, and space is given in a line. The number of characters in the text is less than or equal to 200.
</p>
<H2>Output</H2>
<p>
Print the converted text.
</p>
<H2>Sample Input</H2>
<pre>
this is a pen.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
THIS IS A PEN.
</pre>
|
s679609019 | p00020 | Accepted | try:
while True:
str = str(input())
print(str.upper())
except EOFError:
pass
| this is a pen.
| THIS IS A PEN.
|
<H1>Capitalize</H1>
<p>
Write a program which replace all the lower-case letters of a given text with the corresponding captital letters.
</p>
<H2>Input</H2>
<p>
A text including lower-case letters, periods, and space is given in a line. The number of characters in the text is less than or equal to 200.
</p>
<H2>Output</H2>
<p>
Print the converted text.
</p>
<H2>Sample Input</H2>
<pre>
this is a pen.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
THIS IS A PEN.
</pre>
|
s435814721 | p00020 | Accepted | # coding=utf-8
###
### for python program
###
import sys
import math
# math class
class mymath:
### pi
pi = 3.14159265358979323846264338
### Prime Number
def pnum_eratosthenes(self, n):
ptable = [0 for i in range(n+1)]
plist = []
for i in range(2, n+1):
if ptable[i]==0:
plist.append(i)
for j in range(i+i, n+1, i):
ptable[j] = 1
return plist
def pnum_check(self, n):
if (n==1):
return False
elif (n==2):
return True
else:
for x in range(2,n):
if(n % x==0):
return False
return True
### GCD
def gcd(self, a, b):
if b == 0:
return a
return self.gcd(b, a%b)
### LCM
def lcm(self, a, b):
return (a*b)//self.gcd(a,b)
### Mat Multiplication
def mul(self, A, B):
ans = []
for a in A:
c = 0
for j, row in enumerate(a):
c += row*B[j]
ans.append(c)
return ans
### intチェック
def is_integer(self, n):
try:
float(n)
except ValueError:
return False
else:
return float(n).is_integer()
### 幾何学問題用
def dist(self, A, B):
d = 0
for i in range(len(A)):
d += (A[i]-B[i])**2
d = d**(1/2)
return d
### 絶対値
def abs(self, n):
if n >= 0:
return n
else:
return -n
mymath = mymath()
### output class
class output:
### list
def list(self, l):
l = list(l)
#print(" ", end="")
for i, num in enumerate(l):
print(num, end="")
if i != len(l)-1:
print(" ", end="")
print()
output = output()
### input sample
#i = input()
#N = int(input())
#A, B, C = [x for x in input().split()]
#N, K = [int(x) for x in input().split()]
#inlist = [int(w) for w in input().split()]
#R = float(input())
#A.append(list(map(int,input().split())))
#for line in sys.stdin.readlines():
# x, y = [int(temp) for temp in line.split()]
#abc list
#abc = [chr(ord('a') + i) for i in range(26)]
### output sample
# print("{0} {1} {2:.5f}".format(A//B, A%B, A/B))
# print("{0:.6f} {1:.6f}".format(R*R*math.pi,R*2*math.pi))
# print(" {}".format(i), end="")
def printA(A):
N = len(A)
for i, n in enumerate(A):
print(n, end='')
if i != N-1:
print(' ', end='')
print()
# リスト内包表記 ifあり
# [x-k if x != 0 else x for x in C]
# ソート(代入する必要なし)
# N.sort()
# 10000個の素数リスト
# P = mymath.pnum_eratosthenes(105000)
def get_input():
N = []
while True:
try:
#N.append(input())
#N.append(int(input()))
#N.append(float(input()))
N.append([int(x) for x in input().split()])
except EOFError:
break
return N
#D = get_input()
s = input()
print(str.upper(s))
| this is a pen.
| THIS IS A PEN.
|
<H1>Capitalize</H1>
<p>
Write a program which replace all the lower-case letters of a given text with the corresponding captital letters.
</p>
<H2>Input</H2>
<p>
A text including lower-case letters, periods, and space is given in a line. The number of characters in the text is less than or equal to 200.
</p>
<H2>Output</H2>
<p>
Print the converted text.
</p>
<H2>Sample Input</H2>
<pre>
this is a pen.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
THIS IS A PEN.
</pre>
|
s880408090 | p00020 | Accepted | L = list(input())
LL = []
for i in L:
LL.append(i.upper())
print( "".join(LL) )
| this is a pen.
| THIS IS A PEN.
|
<H1>Capitalize</H1>
<p>
Write a program which replace all the lower-case letters of a given text with the corresponding captital letters.
</p>
<H2>Input</H2>
<p>
A text including lower-case letters, periods, and space is given in a line. The number of characters in the text is less than or equal to 200.
</p>
<H2>Output</H2>
<p>
Print the converted text.
</p>
<H2>Sample Input</H2>
<pre>
this is a pen.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
THIS IS A PEN.
</pre>
|
s685043859 | p00020 | Accepted | a = str(input())
a = a.upper()
print(a)
| this is a pen.
| THIS IS A PEN.
|
<H1>Capitalize</H1>
<p>
Write a program which replace all the lower-case letters of a given text with the corresponding captital letters.
</p>
<H2>Input</H2>
<p>
A text including lower-case letters, periods, and space is given in a line. The number of characters in the text is less than or equal to 200.
</p>
<H2>Output</H2>
<p>
Print the converted text.
</p>
<H2>Sample Input</H2>
<pre>
this is a pen.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
THIS IS A PEN.
</pre>
|
s744019906 | p00020 | Accepted | s=input()
A=s.upper()
print(A)
| this is a pen.
| THIS IS A PEN.
|
<H1>Capitalize</H1>
<p>
Write a program which replace all the lower-case letters of a given text with the corresponding captital letters.
</p>
<H2>Input</H2>
<p>
A text including lower-case letters, periods, and space is given in a line. The number of characters in the text is less than or equal to 200.
</p>
<H2>Output</H2>
<p>
Print the converted text.
</p>
<H2>Sample Input</H2>
<pre>
this is a pen.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
THIS IS A PEN.
</pre>
|
s790896572 | p00020 | Accepted | s = input().upper()
print(s)
| this is a pen.
| THIS IS A PEN.
|
<H1>Capitalize</H1>
<p>
Write a program which replace all the lower-case letters of a given text with the corresponding captital letters.
</p>
<H2>Input</H2>
<p>
A text including lower-case letters, periods, and space is given in a line. The number of characters in the text is less than or equal to 200.
</p>
<H2>Output</H2>
<p>
Print the converted text.
</p>
<H2>Sample Input</H2>
<pre>
this is a pen.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
THIS IS A PEN.
</pre>
|
s391765256 | p00020 | Accepted | l = str(input())
print(str.upper(l))
| this is a pen.
| THIS IS A PEN.
|
<H1>Capitalize</H1>
<p>
Write a program which replace all the lower-case letters of a given text with the corresponding captital letters.
</p>
<H2>Input</H2>
<p>
A text including lower-case letters, periods, and space is given in a line. The number of characters in the text is less than or equal to 200.
</p>
<H2>Output</H2>
<p>
Print the converted text.
</p>
<H2>Sample Input</H2>
<pre>
this is a pen.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
THIS IS A PEN.
</pre>
|
s535770849 | p00020 | Accepted | s=input()
for c in s:
if 'a' <= c and c <= 'z':
print(c.upper(), end='')
else:
print(c,end='')
print()
| this is a pen.
| THIS IS A PEN.
|
<H1>Capitalize</H1>
<p>
Write a program which replace all the lower-case letters of a given text with the corresponding captital letters.
</p>
<H2>Input</H2>
<p>
A text including lower-case letters, periods, and space is given in a line. The number of characters in the text is less than or equal to 200.
</p>
<H2>Output</H2>
<p>
Print the converted text.
</p>
<H2>Sample Input</H2>
<pre>
this is a pen.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
THIS IS A PEN.
</pre>
|
s779814503 | p00020 | Accepted | sentence = input()
print(sentence.upper())
| this is a pen.
| THIS IS A PEN.
|
<H1>Capitalize</H1>
<p>
Write a program which replace all the lower-case letters of a given text with the corresponding captital letters.
</p>
<H2>Input</H2>
<p>
A text including lower-case letters, periods, and space is given in a line. The number of characters in the text is less than or equal to 200.
</p>
<H2>Output</H2>
<p>
Print the converted text.
</p>
<H2>Sample Input</H2>
<pre>
this is a pen.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
THIS IS A PEN.
</pre>
|
s497271890 | p00020 | Accepted | if __name__ == '__main__':
print(input().upper())
| this is a pen.
| THIS IS A PEN.
|
<H1>Capitalize</H1>
<p>
Write a program which replace all the lower-case letters of a given text with the corresponding captital letters.
</p>
<H2>Input</H2>
<p>
A text including lower-case letters, periods, and space is given in a line. The number of characters in the text is less than or equal to 200.
</p>
<H2>Output</H2>
<p>
Print the converted text.
</p>
<H2>Sample Input</H2>
<pre>
this is a pen.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
THIS IS A PEN.
</pre>
|
s069001970 | p00020 | Accepted | strings = input()
print(strings.upper())
| this is a pen.
| THIS IS A PEN.
|
<H1>Capitalize</H1>
<p>
Write a program which replace all the lower-case letters of a given text with the corresponding captital letters.
</p>
<H2>Input</H2>
<p>
A text including lower-case letters, periods, and space is given in a line. The number of characters in the text is less than or equal to 200.
</p>
<H2>Output</H2>
<p>
Print the converted text.
</p>
<H2>Sample Input</H2>
<pre>
this is a pen.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
THIS IS A PEN.
</pre>
|
s931491564 | p00020 | Accepted | def capitalize(c):
return chr(ord(c)-32)
s = raw_input()
ans = ''
for i in range(0, len(s)):
if s[i] == '.' or s[i] == ' ': ans = ans + s[i]
else: ans = ans + capitalize(s[i])
print ans
| this is a pen.
| THIS IS A PEN.
|
<H1>Capitalize</H1>
<p>
Write a program which replace all the lower-case letters of a given text with the corresponding captital letters.
</p>
<H2>Input</H2>
<p>
A text including lower-case letters, periods, and space is given in a line. The number of characters in the text is less than or equal to 200.
</p>
<H2>Output</H2>
<p>
Print the converted text.
</p>
<H2>Sample Input</H2>
<pre>
this is a pen.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
THIS IS A PEN.
</pre>
|
s165507807 | p00020 | Accepted | from string import ascii_lowercase
text = input()
cap = [chr(ord(i)-32) if i in ascii_lowercase else i for i in text]
print("".join(cap))
| this is a pen.
| THIS IS A PEN.
|
<H1>Capitalize</H1>
<p>
Write a program which replace all the lower-case letters of a given text with the corresponding captital letters.
</p>
<H2>Input</H2>
<p>
A text including lower-case letters, periods, and space is given in a line. The number of characters in the text is less than or equal to 200.
</p>
<H2>Output</H2>
<p>
Print the converted text.
</p>
<H2>Sample Input</H2>
<pre>
this is a pen.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
THIS IS A PEN.
</pre>
|
s300091049 | p00020 | Accepted | s = input()
s = s.upper()
print(s)
| this is a pen.
| THIS IS A PEN.
|
<H1>Capitalize</H1>
<p>
Write a program which replace all the lower-case letters of a given text with the corresponding captital letters.
</p>
<H2>Input</H2>
<p>
A text including lower-case letters, periods, and space is given in a line. The number of characters in the text is less than or equal to 200.
</p>
<H2>Output</H2>
<p>
Print the converted text.
</p>
<H2>Sample Input</H2>
<pre>
this is a pen.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
THIS IS A PEN.
</pre>
|
s412085672 | p00020 | Accepted | s = input()
s = s.upper()
print(s)
| this is a pen.
| THIS IS A PEN.
|
<H1>Capitalize</H1>
<p>
Write a program which replace all the lower-case letters of a given text with the corresponding captital letters.
</p>
<H2>Input</H2>
<p>
A text including lower-case letters, periods, and space is given in a line. The number of characters in the text is less than or equal to 200.
</p>
<H2>Output</H2>
<p>
Print the converted text.
</p>
<H2>Sample Input</H2>
<pre>
this is a pen.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
THIS IS A PEN.
</pre>
|
s230233958 | p00020 | Accepted | import math
def run():
text = input().strip()
print(text.upper())
if __name__ == '__main__':
run()
| this is a pen.
| THIS IS A PEN.
|
<H1>Capitalize</H1>
<p>
Write a program which replace all the lower-case letters of a given text with the corresponding captital letters.
</p>
<H2>Input</H2>
<p>
A text including lower-case letters, periods, and space is given in a line. The number of characters in the text is less than or equal to 200.
</p>
<H2>Output</H2>
<p>
Print the converted text.
</p>
<H2>Sample Input</H2>
<pre>
this is a pen.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
THIS IS A PEN.
</pre>
|
s584263780 | p00020 | Accepted | # Capitalize
print(input().upper())
| this is a pen.
| THIS IS A PEN.
|
<H1>Capitalize</H1>
<p>
Write a program which replace all the lower-case letters of a given text with the corresponding captital letters.
</p>
<H2>Input</H2>
<p>
A text including lower-case letters, periods, and space is given in a line. The number of characters in the text is less than or equal to 200.
</p>
<H2>Output</H2>
<p>
Print the converted text.
</p>
<H2>Sample Input</H2>
<pre>
this is a pen.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
THIS IS A PEN.
</pre>
|
s047793517 | p00020 | Accepted | str = raw_input()
print str.upper()
| this is a pen.
| THIS IS A PEN.
|
<H1>Capitalize</H1>
<p>
Write a program which replace all the lower-case letters of a given text with the corresponding captital letters.
</p>
<H2>Input</H2>
<p>
A text including lower-case letters, periods, and space is given in a line. The number of characters in the text is less than or equal to 200.
</p>
<H2>Output</H2>
<p>
Print the converted text.
</p>
<H2>Sample Input</H2>
<pre>
this is a pen.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
THIS IS A PEN.
</pre>
|
s433425833 | p00020 | Runtime Error | x = input().upper()
print x | this is a pen.
| THIS IS A PEN.
|
<H1>Capitalize</H1>
<p>
Write a program which replace all the lower-case letters of a given text with the corresponding captital letters.
</p>
<H2>Input</H2>
<p>
A text including lower-case letters, periods, and space is given in a line. The number of characters in the text is less than or equal to 200.
</p>
<H2>Output</H2>
<p>
Print the converted text.
</p>
<H2>Sample Input</H2>
<pre>
this is a pen.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
THIS IS A PEN.
</pre>
|
s312540988 | p00020 | Runtime Error | print raw_input().to_upper() | this is a pen.
| THIS IS A PEN.
|
<H1>Capitalize</H1>
<p>
Write a program which replace all the lower-case letters of a given text with the corresponding captital letters.
</p>
<H2>Input</H2>
<p>
A text including lower-case letters, periods, and space is given in a line. The number of characters in the text is less than or equal to 200.
</p>
<H2>Output</H2>
<p>
Print the converted text.
</p>
<H2>Sample Input</H2>
<pre>
this is a pen.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
THIS IS A PEN.
</pre>
|
s214284883 | p00020 | Runtime Error | #!/usr/bin/python
def datasets():
s = raw_input().strip()
yield s
def main():
for s in datasets():
import s.lower()
if __name__ == '__main__':
main() | this is a pen.
| THIS IS A PEN.
|
<H1>Capitalize</H1>
<p>
Write a program which replace all the lower-case letters of a given text with the corresponding captital letters.
</p>
<H2>Input</H2>
<p>
A text including lower-case letters, periods, and space is given in a line. The number of characters in the text is less than or equal to 200.
</p>
<H2>Output</H2>
<p>
Print the converted text.
</p>
<H2>Sample Input</H2>
<pre>
this is a pen.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
THIS IS A PEN.
</pre>
|
s240446497 | p00020 | WA: Presentation Error | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
import math
for s in sys.stdin:
d = s.upper()
print d | this is a pen.
| THIS IS A PEN.
|
<H1>Capitalize</H1>
<p>
Write a program which replace all the lower-case letters of a given text with the corresponding captital letters.
</p>
<H2>Input</H2>
<p>
A text including lower-case letters, periods, and space is given in a line. The number of characters in the text is less than or equal to 200.
</p>
<H2>Output</H2>
<p>
Print the converted text.
</p>
<H2>Sample Input</H2>
<pre>
this is a pen.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
THIS IS A PEN.
</pre>
|
s704970879 | p00020 | WA: Presentation Error | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
for s in sys.stdin:
d = s.upper()
print d | this is a pen.
| THIS IS A PEN.
|
<H1>Capitalize</H1>
<p>
Write a program which replace all the lower-case letters of a given text with the corresponding captital letters.
</p>
<H2>Input</H2>
<p>
A text including lower-case letters, periods, and space is given in a line. The number of characters in the text is less than or equal to 200.
</p>
<H2>Output</H2>
<p>
Print the converted text.
</p>
<H2>Sample Input</H2>
<pre>
this is a pen.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
THIS IS A PEN.
</pre>
|
s171405869 | p00020 | WA: Presentation Error | ls = raw_input().split()
for k in range(len(ls)):
ls[k] = ls[k].upper()
print " ".join(map(str,[k for k in ls])) | this is a pen.
| THIS IS A PEN.
|
<H1>Capitalize</H1>
<p>
Write a program which replace all the lower-case letters of a given text with the corresponding captital letters.
</p>
<H2>Input</H2>
<p>
A text including lower-case letters, periods, and space is given in a line. The number of characters in the text is less than or equal to 200.
</p>
<H2>Output</H2>
<p>
Print the converted text.
</p>
<H2>Sample Input</H2>
<pre>
this is a pen.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
THIS IS A PEN.
</pre>
|
s254365187 | p00020 | WA: Presentation Error | input_line = raw_input()
for char in input_line:
print char.upper(), | this is a pen.
| THIS IS A PEN.
|
<H1>Capitalize</H1>
<p>
Write a program which replace all the lower-case letters of a given text with the corresponding captital letters.
</p>
<H2>Input</H2>
<p>
A text including lower-case letters, periods, and space is given in a line. The number of characters in the text is less than or equal to 200.
</p>
<H2>Output</H2>
<p>
Print the converted text.
</p>
<H2>Sample Input</H2>
<pre>
this is a pen.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
THIS IS A PEN.
</pre>
|
s851810292 | p00020 | WA: Presentation Error | s=raw_input().split()
ans=[]
for i in s:
ans.append(i.upper())
print(' '.join(ans)) | this is a pen.
| THIS IS A PEN.
|
<H1>Capitalize</H1>
<p>
Write a program which replace all the lower-case letters of a given text with the corresponding captital letters.
</p>
<H2>Input</H2>
<p>
A text including lower-case letters, periods, and space is given in a line. The number of characters in the text is less than or equal to 200.
</p>
<H2>Output</H2>
<p>
Print the converted text.
</p>
<H2>Sample Input</H2>
<pre>
this is a pen.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
THIS IS A PEN.
</pre>
|
s458801777 | p00020 | WA: Presentation Error | # -*- coding: utf-8 -*-
def main(text):
ret = ''
for letter in text.split():
for char in letter:
if char.isalpha():
ret += char.capitalize()
else:
ret += char
ret += ' '
print(ret)
while True:
try:
text = input()
except:
break
main(text) | this is a pen.
| THIS IS A PEN.
|
<H1>Capitalize</H1>
<p>
Write a program which replace all the lower-case letters of a given text with the corresponding captital letters.
</p>
<H2>Input</H2>
<p>
A text including lower-case letters, periods, and space is given in a line. The number of characters in the text is less than or equal to 200.
</p>
<H2>Output</H2>
<p>
Print the converted text.
</p>
<H2>Sample Input</H2>
<pre>
this is a pen.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
THIS IS A PEN.
</pre>
|
s309090606 | p00020 | WA: Presentation Error | # -*- coding: utf-8 -*-
def main(_text):
ret = ''
for letter in _text.split():
for char in letter:
if char.isalpha():
ret += char.capitalize()
else:
ret += char
ret += ' '
print(ret, end='')
while True:
try:
text = input()
except:
break
main(text) | this is a pen.
| THIS IS A PEN.
|
<H1>Capitalize</H1>
<p>
Write a program which replace all the lower-case letters of a given text with the corresponding captital letters.
</p>
<H2>Input</H2>
<p>
A text including lower-case letters, periods, and space is given in a line. The number of characters in the text is less than or equal to 200.
</p>
<H2>Output</H2>
<p>
Print the converted text.
</p>
<H2>Sample Input</H2>
<pre>
this is a pen.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
THIS IS A PEN.
</pre>
|
s753110945 | p00020 | WA: Presentation Error | # -*- coding: utf-8 -*-
def main(_text):
ret = ''
for letter in _text.split():
for char in letter:
if char.isalpha():
ret += char.capitalize()
else:
ret += char
print(ret, end='')
while True:
try:
text = input()
except:
break
main(text) | this is a pen.
| THIS IS A PEN.
|
<H1>Capitalize</H1>
<p>
Write a program which replace all the lower-case letters of a given text with the corresponding captital letters.
</p>
<H2>Input</H2>
<p>
A text including lower-case letters, periods, and space is given in a line. The number of characters in the text is less than or equal to 200.
</p>
<H2>Output</H2>
<p>
Print the converted text.
</p>
<H2>Sample Input</H2>
<pre>
this is a pen.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
THIS IS A PEN.
</pre>
|
s231571464 | p00020 | WA: Presentation Error | # -*- coding: utf-8 -*-
def main(_text: str):
print(_text.upper(), end='')
while True:
try:
text = input()
except:
break
main(text) | this is a pen.
| THIS IS A PEN.
|
<H1>Capitalize</H1>
<p>
Write a program which replace all the lower-case letters of a given text with the corresponding captital letters.
</p>
<H2>Input</H2>
<p>
A text including lower-case letters, periods, and space is given in a line. The number of characters in the text is less than or equal to 200.
</p>
<H2>Output</H2>
<p>
Print the converted text.
</p>
<H2>Sample Input</H2>
<pre>
this is a pen.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
THIS IS A PEN.
</pre>
|
s866774576 | p00020 | WA: Presentation Error | print(' '.join(list(map(lambda i: i.upper(),input().split())))) | this is a pen.
| THIS IS A PEN.
|
<H1>Capitalize</H1>
<p>
Write a program which replace all the lower-case letters of a given text with the corresponding captital letters.
</p>
<H2>Input</H2>
<p>
A text including lower-case letters, periods, and space is given in a line. The number of characters in the text is less than or equal to 200.
</p>
<H2>Output</H2>
<p>
Print the converted text.
</p>
<H2>Sample Input</H2>
<pre>
this is a pen.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
THIS IS A PEN.
</pre>
|
s500135114 | p00020 | WA: Presentation Error | def main():
s = input().split()
for x in range(len(s)):
s[x] = s[x].upper()
for x in range(len(s)):
if x == len(s) - 1:
print(s[x])
else:
print(s[x], end = " ")
if __name__ == "__main__":
main() | this is a pen.
| THIS IS A PEN.
|
<H1>Capitalize</H1>
<p>
Write a program which replace all the lower-case letters of a given text with the corresponding captital letters.
</p>
<H2>Input</H2>
<p>
A text including lower-case letters, periods, and space is given in a line. The number of characters in the text is less than or equal to 200.
</p>
<H2>Output</H2>
<p>
Print the converted text.
</p>
<H2>Sample Input</H2>
<pre>
this is a pen.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
THIS IS A PEN.
</pre>
|
s090369522 | p00020 | WA: Presentation Error | def main():
s = input().split()
for x in range(len(s)):
s[x] = s[x].upper()
for x in range(len(s)):
if x == len(s) - 1:
print(s[x])
else:
print(s[x], end = " ")
if __name__ == "__main__":
main() | this is a pen.
| THIS IS A PEN.
|
<H1>Capitalize</H1>
<p>
Write a program which replace all the lower-case letters of a given text with the corresponding captital letters.
</p>
<H2>Input</H2>
<p>
A text including lower-case letters, periods, and space is given in a line. The number of characters in the text is less than or equal to 200.
</p>
<H2>Output</H2>
<p>
Print the converted text.
</p>
<H2>Sample Input</H2>
<pre>
this is a pen.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
THIS IS A PEN.
</pre>
|
s020866165 | p00020 | WA: Presentation Error | a = map(str,raw_input().split())
b =[]
for i in range(len(a)):
b.append(a[i].upper())
print ' '.join(b) | this is a pen.
| THIS IS A PEN.
|
<H1>Capitalize</H1>
<p>
Write a program which replace all the lower-case letters of a given text with the corresponding captital letters.
</p>
<H2>Input</H2>
<p>
A text including lower-case letters, periods, and space is given in a line. The number of characters in the text is less than or equal to 200.
</p>
<H2>Output</H2>
<p>
Print the converted text.
</p>
<H2>Sample Input</H2>
<pre>
this is a pen.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
THIS IS A PEN.
</pre>
|
s453926236 | p00020 | WA: Presentation Error | #!/usr/bin/env python
# coding: utf-8
import sys
def main():
params = [line for line in sys.stdin.readlines()]
for param in params:
print param.upper()
if __name__ == '__main__':
main() | this is a pen.
| THIS IS A PEN.
|
<H1>Capitalize</H1>
<p>
Write a program which replace all the lower-case letters of a given text with the corresponding captital letters.
</p>
<H2>Input</H2>
<p>
A text including lower-case letters, periods, and space is given in a line. The number of characters in the text is less than or equal to 200.
</p>
<H2>Output</H2>
<p>
Print the converted text.
</p>
<H2>Sample Input</H2>
<pre>
this is a pen.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
THIS IS A PEN.
</pre>
|
s756634602 | p00020 | WA: Presentation Error | #!/usr/bin/env python
# coding: utf-8
import sys
def main():
param = sys.stdin.readline()
print param.upper()
if __name__ == '__main__':
main() | this is a pen.
| THIS IS A PEN.
|
<H1>Capitalize</H1>
<p>
Write a program which replace all the lower-case letters of a given text with the corresponding captital letters.
</p>
<H2>Input</H2>
<p>
A text including lower-case letters, periods, and space is given in a line. The number of characters in the text is less than or equal to 200.
</p>
<H2>Output</H2>
<p>
Print the converted text.
</p>
<H2>Sample Input</H2>
<pre>
this is a pen.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
THIS IS A PEN.
</pre>
|
s196760085 | p00020 | WA: Presentation Error | import sys,string
for s in sys.stdin:
print string.upper(s) | this is a pen.
| THIS IS A PEN.
|
<H1>Capitalize</H1>
<p>
Write a program which replace all the lower-case letters of a given text with the corresponding captital letters.
</p>
<H2>Input</H2>
<p>
A text including lower-case letters, periods, and space is given in a line. The number of characters in the text is less than or equal to 200.
</p>
<H2>Output</H2>
<p>
Print the converted text.
</p>
<H2>Sample Input</H2>
<pre>
this is a pen.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
THIS IS A PEN.
</pre>
|
s738502208 | p00021 | Wrong Answer | def check(lst):
x1, y1, x2, y2, x3, y3, x4, y4 = lst
vabx, vaby = x2 - x1, y2 - y1
vcdx, vcdy = x4 - x3, y4 - y3
if vabx != 0:
ratio = vcdx / vabx
if vcdy == vaby * ratio:
return True
else:
return False
else:
if vcdx == 0:
return True
else:
return False
n = int(input())
for _ in range(n):
plst = list(map(float, input().split()))
print("YES" if check(plst) else "NO")
| 2
0.0 0.0 1.0 1.0 1.0 0.0 2.0 1.0
3.0 2.0 9.0 6.0 13.0 5.0 7.0 9.0
| YES
NO
|
<script type="text/x-mathjax-config">
MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }});
</script>
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
<H1>Parallelism</H1>
<p>
There are four points: $A(x_1, y_1)$, $B(x_2, y_2)$, $C(x_3, y_3)$, and $D(x_4, y_4)$. Write a program which determines whether the line $AB$ and the line $CD$ are parallel. If those two lines are parallel, your program should prints "<span>YES</span>" and if not prints "<span>NO</span>".
</p>
<H2>Input</H2>
<p>
Input consists of several datasets. In the first line, you are given the number of datasets $n$ ($n \leq 100$). There will be $n$ lines where each line correspondgs to each dataset. Each dataset consists of eight real numbers:<br/>
<br/>
$x_1$ $y_1$ $x_2$ $y_2$ $x_3$ $y_3$ $x_4$ $y_4$<br/>
</p>
<p>
You can assume that $-100 \leq x_1, y_1, x_2, y_2, x_3, y_3, x_4, y_4 \leq 100$.
Each value is a real number with at most 5 digits after the decimal point.
</p>
<H2>Output</H2>
<p>
For each dataset, print "<span>YES</span>" or "<span>NO</span>" in a line.
</p>
<H2>Sample Input</H2>
<pre>
2
0.0 0.0 1.0 1.0 1.0 0.0 2.0 1.0
3.0 2.0 9.0 6.0 13.0 5.0 7.0 9.0
</pre>
<H2>Output for the Sample Input</H2>
<pre>
YES
NO
</pre>
|
s285226308 | p00021 | Wrong Answer | def check(lst):
x1, y1, x2, y2, x3, y3, x4, y4 = lst
vabx, vaby = x2 - x1, y2 - y1
vcdx, vcdy = x4 - x3, y4 - y3
if vabx * vcdy == vcdx * vaby:
return True
else:
return False
n = int(input())
for _ in range(n):
plst = list(map(float, input().split()))
print("YES" if check(plst) else "NO")
| 2
0.0 0.0 1.0 1.0 1.0 0.0 2.0 1.0
3.0 2.0 9.0 6.0 13.0 5.0 7.0 9.0
| YES
NO
|
<script type="text/x-mathjax-config">
MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }});
</script>
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
<H1>Parallelism</H1>
<p>
There are four points: $A(x_1, y_1)$, $B(x_2, y_2)$, $C(x_3, y_3)$, and $D(x_4, y_4)$. Write a program which determines whether the line $AB$ and the line $CD$ are parallel. If those two lines are parallel, your program should prints "<span>YES</span>" and if not prints "<span>NO</span>".
</p>
<H2>Input</H2>
<p>
Input consists of several datasets. In the first line, you are given the number of datasets $n$ ($n \leq 100$). There will be $n$ lines where each line correspondgs to each dataset. Each dataset consists of eight real numbers:<br/>
<br/>
$x_1$ $y_1$ $x_2$ $y_2$ $x_3$ $y_3$ $x_4$ $y_4$<br/>
</p>
<p>
You can assume that $-100 \leq x_1, y_1, x_2, y_2, x_3, y_3, x_4, y_4 \leq 100$.
Each value is a real number with at most 5 digits after the decimal point.
</p>
<H2>Output</H2>
<p>
For each dataset, print "<span>YES</span>" or "<span>NO</span>" in a line.
</p>
<H2>Sample Input</H2>
<pre>
2
0.0 0.0 1.0 1.0 1.0 0.0 2.0 1.0
3.0 2.0 9.0 6.0 13.0 5.0 7.0 9.0
</pre>
<H2>Output for the Sample Input</H2>
<pre>
YES
NO
</pre>
|
s211992317 | p00021 | Wrong Answer | E = 10 ** -20
def check(lst):
x1, y1, x2, y2, x3, y3, x4, y4 = lst
vabx, vaby = x2 - x1, y2 - y1
vcdx, vcdy = x4 - x3, y4 - y3
if abs(vabx * vcdy - vcdx * vaby) < E:
return True
else:
return False
n = int(input())
for _ in range(n):
plst = list(map(float, input().split()))
print("YES" if check(plst) else "NO")
| 2
0.0 0.0 1.0 1.0 1.0 0.0 2.0 1.0
3.0 2.0 9.0 6.0 13.0 5.0 7.0 9.0
| YES
NO
|
<script type="text/x-mathjax-config">
MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }});
</script>
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
<H1>Parallelism</H1>
<p>
There are four points: $A(x_1, y_1)$, $B(x_2, y_2)$, $C(x_3, y_3)$, and $D(x_4, y_4)$. Write a program which determines whether the line $AB$ and the line $CD$ are parallel. If those two lines are parallel, your program should prints "<span>YES</span>" and if not prints "<span>NO</span>".
</p>
<H2>Input</H2>
<p>
Input consists of several datasets. In the first line, you are given the number of datasets $n$ ($n \leq 100$). There will be $n$ lines where each line correspondgs to each dataset. Each dataset consists of eight real numbers:<br/>
<br/>
$x_1$ $y_1$ $x_2$ $y_2$ $x_3$ $y_3$ $x_4$ $y_4$<br/>
</p>
<p>
You can assume that $-100 \leq x_1, y_1, x_2, y_2, x_3, y_3, x_4, y_4 \leq 100$.
Each value is a real number with at most 5 digits after the decimal point.
</p>
<H2>Output</H2>
<p>
For each dataset, print "<span>YES</span>" or "<span>NO</span>" in a line.
</p>
<H2>Sample Input</H2>
<pre>
2
0.0 0.0 1.0 1.0 1.0 0.0 2.0 1.0
3.0 2.0 9.0 6.0 13.0 5.0 7.0 9.0
</pre>
<H2>Output for the Sample Input</H2>
<pre>
YES
NO
</pre>
|
s076376739 | p00021 | Wrong Answer | for i in range(int(input())):
x1,y1,x2,y2,x3,y3,x4,y4=map(float,input().split())
if (x1-x2)*(y3-y4)==abs((y1-y2)*(y3-y4)):
print("YES")
else:
print("NO")
| 2
0.0 0.0 1.0 1.0 1.0 0.0 2.0 1.0
3.0 2.0 9.0 6.0 13.0 5.0 7.0 9.0
| YES
NO
|
<script type="text/x-mathjax-config">
MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }});
</script>
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
<H1>Parallelism</H1>
<p>
There are four points: $A(x_1, y_1)$, $B(x_2, y_2)$, $C(x_3, y_3)$, and $D(x_4, y_4)$. Write a program which determines whether the line $AB$ and the line $CD$ are parallel. If those two lines are parallel, your program should prints "<span>YES</span>" and if not prints "<span>NO</span>".
</p>
<H2>Input</H2>
<p>
Input consists of several datasets. In the first line, you are given the number of datasets $n$ ($n \leq 100$). There will be $n$ lines where each line correspondgs to each dataset. Each dataset consists of eight real numbers:<br/>
<br/>
$x_1$ $y_1$ $x_2$ $y_2$ $x_3$ $y_3$ $x_4$ $y_4$<br/>
</p>
<p>
You can assume that $-100 \leq x_1, y_1, x_2, y_2, x_3, y_3, x_4, y_4 \leq 100$.
Each value is a real number with at most 5 digits after the decimal point.
</p>
<H2>Output</H2>
<p>
For each dataset, print "<span>YES</span>" or "<span>NO</span>" in a line.
</p>
<H2>Sample Input</H2>
<pre>
2
0.0 0.0 1.0 1.0 1.0 0.0 2.0 1.0
3.0 2.0 9.0 6.0 13.0 5.0 7.0 9.0
</pre>
<H2>Output for the Sample Input</H2>
<pre>
YES
NO
</pre>
|
s221547971 | p00021 | Wrong Answer | for i in range(int(input())):
x1,y1,x2,y2,x3,y3,x4,y4=map(float,input().split())
if (x1-x2)*(y3-y4)==((y1-y2)*(y3-y4)):
print("YES")
else:
print("NO")
| 2
0.0 0.0 1.0 1.0 1.0 0.0 2.0 1.0
3.0 2.0 9.0 6.0 13.0 5.0 7.0 9.0
| YES
NO
|
<script type="text/x-mathjax-config">
MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }});
</script>
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
<H1>Parallelism</H1>
<p>
There are four points: $A(x_1, y_1)$, $B(x_2, y_2)$, $C(x_3, y_3)$, and $D(x_4, y_4)$. Write a program which determines whether the line $AB$ and the line $CD$ are parallel. If those two lines are parallel, your program should prints "<span>YES</span>" and if not prints "<span>NO</span>".
</p>
<H2>Input</H2>
<p>
Input consists of several datasets. In the first line, you are given the number of datasets $n$ ($n \leq 100$). There will be $n$ lines where each line correspondgs to each dataset. Each dataset consists of eight real numbers:<br/>
<br/>
$x_1$ $y_1$ $x_2$ $y_2$ $x_3$ $y_3$ $x_4$ $y_4$<br/>
</p>
<p>
You can assume that $-100 \leq x_1, y_1, x_2, y_2, x_3, y_3, x_4, y_4 \leq 100$.
Each value is a real number with at most 5 digits after the decimal point.
</p>
<H2>Output</H2>
<p>
For each dataset, print "<span>YES</span>" or "<span>NO</span>" in a line.
</p>
<H2>Sample Input</H2>
<pre>
2
0.0 0.0 1.0 1.0 1.0 0.0 2.0 1.0
3.0 2.0 9.0 6.0 13.0 5.0 7.0 9.0
</pre>
<H2>Output for the Sample Input</H2>
<pre>
YES
NO
</pre>
|
s329620826 | p00021 | Wrong Answer | for i in range(int(input())):
x1,y1,x2,y2,x3,y3,x4,y4=map(lambda x: int(100000*float(x)),input().split())
if (x1-x2)*(y3-y4)==abs((y1-y2)*(y3-y4)):
print("YES")
else:
print("NO")
| 2
0.0 0.0 1.0 1.0 1.0 0.0 2.0 1.0
3.0 2.0 9.0 6.0 13.0 5.0 7.0 9.0
| YES
NO
|
<script type="text/x-mathjax-config">
MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }});
</script>
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
<H1>Parallelism</H1>
<p>
There are four points: $A(x_1, y_1)$, $B(x_2, y_2)$, $C(x_3, y_3)$, and $D(x_4, y_4)$. Write a program which determines whether the line $AB$ and the line $CD$ are parallel. If those two lines are parallel, your program should prints "<span>YES</span>" and if not prints "<span>NO</span>".
</p>
<H2>Input</H2>
<p>
Input consists of several datasets. In the first line, you are given the number of datasets $n$ ($n \leq 100$). There will be $n$ lines where each line correspondgs to each dataset. Each dataset consists of eight real numbers:<br/>
<br/>
$x_1$ $y_1$ $x_2$ $y_2$ $x_3$ $y_3$ $x_4$ $y_4$<br/>
</p>
<p>
You can assume that $-100 \leq x_1, y_1, x_2, y_2, x_3, y_3, x_4, y_4 \leq 100$.
Each value is a real number with at most 5 digits after the decimal point.
</p>
<H2>Output</H2>
<p>
For each dataset, print "<span>YES</span>" or "<span>NO</span>" in a line.
</p>
<H2>Sample Input</H2>
<pre>
2
0.0 0.0 1.0 1.0 1.0 0.0 2.0 1.0
3.0 2.0 9.0 6.0 13.0 5.0 7.0 9.0
</pre>
<H2>Output for the Sample Input</H2>
<pre>
YES
NO
</pre>
|
s436173121 | p00021 | Wrong Answer | for i in range(int(input())):
x1,y1,x2,y2,x3,y3,x4,y4=map(lambda x: int(100000*float(x)),input().split())
if (x1-x2)*(y3-y4)==abs((y1-y2)*(x3-x4)):
print("YES")
else:
print("NO")
| 2
0.0 0.0 1.0 1.0 1.0 0.0 2.0 1.0
3.0 2.0 9.0 6.0 13.0 5.0 7.0 9.0
| YES
NO
|
<script type="text/x-mathjax-config">
MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }});
</script>
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
<H1>Parallelism</H1>
<p>
There are four points: $A(x_1, y_1)$, $B(x_2, y_2)$, $C(x_3, y_3)$, and $D(x_4, y_4)$. Write a program which determines whether the line $AB$ and the line $CD$ are parallel. If those two lines are parallel, your program should prints "<span>YES</span>" and if not prints "<span>NO</span>".
</p>
<H2>Input</H2>
<p>
Input consists of several datasets. In the first line, you are given the number of datasets $n$ ($n \leq 100$). There will be $n$ lines where each line correspondgs to each dataset. Each dataset consists of eight real numbers:<br/>
<br/>
$x_1$ $y_1$ $x_2$ $y_2$ $x_3$ $y_3$ $x_4$ $y_4$<br/>
</p>
<p>
You can assume that $-100 \leq x_1, y_1, x_2, y_2, x_3, y_3, x_4, y_4 \leq 100$.
Each value is a real number with at most 5 digits after the decimal point.
</p>
<H2>Output</H2>
<p>
For each dataset, print "<span>YES</span>" or "<span>NO</span>" in a line.
</p>
<H2>Sample Input</H2>
<pre>
2
0.0 0.0 1.0 1.0 1.0 0.0 2.0 1.0
3.0 2.0 9.0 6.0 13.0 5.0 7.0 9.0
</pre>
<H2>Output for the Sample Input</H2>
<pre>
YES
NO
</pre>
|
s079275669 | p00021 | Wrong Answer | for i in range(int(input())):
x1,y1,x2,y2,x3,y3,x4,y4=map(lambda x: int(100000*float(x)),input().split())
x12=x1-x2
y12=y1-y2
x34=x3-x4
y34=y3-y4
if (x12*x34+y12*y34)**2/(x12**2+y12**2)/(x34**2+y34**2)==1:
print("YES")
else:
print("NO")
| 2
0.0 0.0 1.0 1.0 1.0 0.0 2.0 1.0
3.0 2.0 9.0 6.0 13.0 5.0 7.0 9.0
| YES
NO
|
<script type="text/x-mathjax-config">
MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }});
</script>
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
<H1>Parallelism</H1>
<p>
There are four points: $A(x_1, y_1)$, $B(x_2, y_2)$, $C(x_3, y_3)$, and $D(x_4, y_4)$. Write a program which determines whether the line $AB$ and the line $CD$ are parallel. If those two lines are parallel, your program should prints "<span>YES</span>" and if not prints "<span>NO</span>".
</p>
<H2>Input</H2>
<p>
Input consists of several datasets. In the first line, you are given the number of datasets $n$ ($n \leq 100$). There will be $n$ lines where each line correspondgs to each dataset. Each dataset consists of eight real numbers:<br/>
<br/>
$x_1$ $y_1$ $x_2$ $y_2$ $x_3$ $y_3$ $x_4$ $y_4$<br/>
</p>
<p>
You can assume that $-100 \leq x_1, y_1, x_2, y_2, x_3, y_3, x_4, y_4 \leq 100$.
Each value is a real number with at most 5 digits after the decimal point.
</p>
<H2>Output</H2>
<p>
For each dataset, print "<span>YES</span>" or "<span>NO</span>" in a line.
</p>
<H2>Sample Input</H2>
<pre>
2
0.0 0.0 1.0 1.0 1.0 0.0 2.0 1.0
3.0 2.0 9.0 6.0 13.0 5.0 7.0 9.0
</pre>
<H2>Output for the Sample Input</H2>
<pre>
YES
NO
</pre>
|
s362020680 | p00021 | Wrong Answer | for i in range(int(input())):
x1,y1,x2,y2,x3,y3,x4,y4=map(lambda x: int(100000*float(x)),input().split())
x12=x1-x2
y12=y1-y2
x34=x3-x4
y34=y3-y4
if (x12*x34+y12*y34)**2==(x12**2+y12**2)*(x34**2+y34**2):
print("YES")
else:
print("NO")
| 2
0.0 0.0 1.0 1.0 1.0 0.0 2.0 1.0
3.0 2.0 9.0 6.0 13.0 5.0 7.0 9.0
| YES
NO
|
<script type="text/x-mathjax-config">
MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }});
</script>
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
<H1>Parallelism</H1>
<p>
There are four points: $A(x_1, y_1)$, $B(x_2, y_2)$, $C(x_3, y_3)$, and $D(x_4, y_4)$. Write a program which determines whether the line $AB$ and the line $CD$ are parallel. If those two lines are parallel, your program should prints "<span>YES</span>" and if not prints "<span>NO</span>".
</p>
<H2>Input</H2>
<p>
Input consists of several datasets. In the first line, you are given the number of datasets $n$ ($n \leq 100$). There will be $n$ lines where each line correspondgs to each dataset. Each dataset consists of eight real numbers:<br/>
<br/>
$x_1$ $y_1$ $x_2$ $y_2$ $x_3$ $y_3$ $x_4$ $y_4$<br/>
</p>
<p>
You can assume that $-100 \leq x_1, y_1, x_2, y_2, x_3, y_3, x_4, y_4 \leq 100$.
Each value is a real number with at most 5 digits after the decimal point.
</p>
<H2>Output</H2>
<p>
For each dataset, print "<span>YES</span>" or "<span>NO</span>" in a line.
</p>
<H2>Sample Input</H2>
<pre>
2
0.0 0.0 1.0 1.0 1.0 0.0 2.0 1.0
3.0 2.0 9.0 6.0 13.0 5.0 7.0 9.0
</pre>
<H2>Output for the Sample Input</H2>
<pre>
YES
NO
</pre>
|
s589452941 | p00021 | Wrong Answer | for i in range(int(input())):
x1,y1,x2,y2,x3,y3,x4,y4=map(lambda x: int(100000*float(x)),input().split())
x12=x1-x2
y12=y1-y2
x34=x3-x4
y34=y3-y4
if x12*y34==y12*x34:
print("YES")
else:
print("NO")
| 2
0.0 0.0 1.0 1.0 1.0 0.0 2.0 1.0
3.0 2.0 9.0 6.0 13.0 5.0 7.0 9.0
| YES
NO
|
<script type="text/x-mathjax-config">
MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }});
</script>
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
<H1>Parallelism</H1>
<p>
There are four points: $A(x_1, y_1)$, $B(x_2, y_2)$, $C(x_3, y_3)$, and $D(x_4, y_4)$. Write a program which determines whether the line $AB$ and the line $CD$ are parallel. If those two lines are parallel, your program should prints "<span>YES</span>" and if not prints "<span>NO</span>".
</p>
<H2>Input</H2>
<p>
Input consists of several datasets. In the first line, you are given the number of datasets $n$ ($n \leq 100$). There will be $n$ lines where each line correspondgs to each dataset. Each dataset consists of eight real numbers:<br/>
<br/>
$x_1$ $y_1$ $x_2$ $y_2$ $x_3$ $y_3$ $x_4$ $y_4$<br/>
</p>
<p>
You can assume that $-100 \leq x_1, y_1, x_2, y_2, x_3, y_3, x_4, y_4 \leq 100$.
Each value is a real number with at most 5 digits after the decimal point.
</p>
<H2>Output</H2>
<p>
For each dataset, print "<span>YES</span>" or "<span>NO</span>" in a line.
</p>
<H2>Sample Input</H2>
<pre>
2
0.0 0.0 1.0 1.0 1.0 0.0 2.0 1.0
3.0 2.0 9.0 6.0 13.0 5.0 7.0 9.0
</pre>
<H2>Output for the Sample Input</H2>
<pre>
YES
NO
</pre>
|
s113376380 | p00021 | Wrong Answer | n = int(raw_input())
for i in range(n):
x1, y1, x2, y2, x3, y3, x4, y4 = map(float, raw_input().split())
if (y1-y2) == 0 or (y3-y4) == 0:
if (y1-y2) == 0 and (y3-y4) == 0:
print "YES"
else:
print "NO"
else:
if (x1 - x2) / (y1 - y2) == (x3 - x4) / (y3 - y4):
print"YES"
else:
print "NO"
| 2
0.0 0.0 1.0 1.0 1.0 0.0 2.0 1.0
3.0 2.0 9.0 6.0 13.0 5.0 7.0 9.0
| YES
NO
|
<script type="text/x-mathjax-config">
MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }});
</script>
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
<H1>Parallelism</H1>
<p>
There are four points: $A(x_1, y_1)$, $B(x_2, y_2)$, $C(x_3, y_3)$, and $D(x_4, y_4)$. Write a program which determines whether the line $AB$ and the line $CD$ are parallel. If those two lines are parallel, your program should prints "<span>YES</span>" and if not prints "<span>NO</span>".
</p>
<H2>Input</H2>
<p>
Input consists of several datasets. In the first line, you are given the number of datasets $n$ ($n \leq 100$). There will be $n$ lines where each line correspondgs to each dataset. Each dataset consists of eight real numbers:<br/>
<br/>
$x_1$ $y_1$ $x_2$ $y_2$ $x_3$ $y_3$ $x_4$ $y_4$<br/>
</p>
<p>
You can assume that $-100 \leq x_1, y_1, x_2, y_2, x_3, y_3, x_4, y_4 \leq 100$.
Each value is a real number with at most 5 digits after the decimal point.
</p>
<H2>Output</H2>
<p>
For each dataset, print "<span>YES</span>" or "<span>NO</span>" in a line.
</p>
<H2>Sample Input</H2>
<pre>
2
0.0 0.0 1.0 1.0 1.0 0.0 2.0 1.0
3.0 2.0 9.0 6.0 13.0 5.0 7.0 9.0
</pre>
<H2>Output for the Sample Input</H2>
<pre>
YES
NO
</pre>
|
s025542791 | p00021 | Wrong Answer | for i in range(int(raw_input())):
x1, y1, x2, y2, x3, y3, x4, y4 = map(float, raw_input().split())
if (y1-y2) == 0 or (y3-y4) == 0:
if (y1-y2) == 0 and (y3-y4) == 0:
print "YES"
else:
print "NO"
else:
if (x1 - x2) / (y1 - y2) == (x3 - x4) / (y3 - y4):
print"YES"
else:
print "NO"
| 2
0.0 0.0 1.0 1.0 1.0 0.0 2.0 1.0
3.0 2.0 9.0 6.0 13.0 5.0 7.0 9.0
| YES
NO
|
<script type="text/x-mathjax-config">
MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }});
</script>
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
<H1>Parallelism</H1>
<p>
There are four points: $A(x_1, y_1)$, $B(x_2, y_2)$, $C(x_3, y_3)$, and $D(x_4, y_4)$. Write a program which determines whether the line $AB$ and the line $CD$ are parallel. If those two lines are parallel, your program should prints "<span>YES</span>" and if not prints "<span>NO</span>".
</p>
<H2>Input</H2>
<p>
Input consists of several datasets. In the first line, you are given the number of datasets $n$ ($n \leq 100$). There will be $n$ lines where each line correspondgs to each dataset. Each dataset consists of eight real numbers:<br/>
<br/>
$x_1$ $y_1$ $x_2$ $y_2$ $x_3$ $y_3$ $x_4$ $y_4$<br/>
</p>
<p>
You can assume that $-100 \leq x_1, y_1, x_2, y_2, x_3, y_3, x_4, y_4 \leq 100$.
Each value is a real number with at most 5 digits after the decimal point.
</p>
<H2>Output</H2>
<p>
For each dataset, print "<span>YES</span>" or "<span>NO</span>" in a line.
</p>
<H2>Sample Input</H2>
<pre>
2
0.0 0.0 1.0 1.0 1.0 0.0 2.0 1.0
3.0 2.0 9.0 6.0 13.0 5.0 7.0 9.0
</pre>
<H2>Output for the Sample Input</H2>
<pre>
YES
NO
</pre>
|
s076830264 | p00021 | Wrong Answer | for i in range(int(raw_input())):
x1, y1, x2, y2, x3, y3, x4, y4 = map(float, raw_input().split())
a = x1 - x2
b = y1 - y2
c = x3 - x4
d = x4 - y4
if b == 0 or d == 0:
if b == 0 and d == 0:
print "YES"
else:
print "NO"
else:
if a / b == c / d:
print"YES"
else:
print "NO"
| 2
0.0 0.0 1.0 1.0 1.0 0.0 2.0 1.0
3.0 2.0 9.0 6.0 13.0 5.0 7.0 9.0
| YES
NO
|
<script type="text/x-mathjax-config">
MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }});
</script>
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
<H1>Parallelism</H1>
<p>
There are four points: $A(x_1, y_1)$, $B(x_2, y_2)$, $C(x_3, y_3)$, and $D(x_4, y_4)$. Write a program which determines whether the line $AB$ and the line $CD$ are parallel. If those two lines are parallel, your program should prints "<span>YES</span>" and if not prints "<span>NO</span>".
</p>
<H2>Input</H2>
<p>
Input consists of several datasets. In the first line, you are given the number of datasets $n$ ($n \leq 100$). There will be $n$ lines where each line correspondgs to each dataset. Each dataset consists of eight real numbers:<br/>
<br/>
$x_1$ $y_1$ $x_2$ $y_2$ $x_3$ $y_3$ $x_4$ $y_4$<br/>
</p>
<p>
You can assume that $-100 \leq x_1, y_1, x_2, y_2, x_3, y_3, x_4, y_4 \leq 100$.
Each value is a real number with at most 5 digits after the decimal point.
</p>
<H2>Output</H2>
<p>
For each dataset, print "<span>YES</span>" or "<span>NO</span>" in a line.
</p>
<H2>Sample Input</H2>
<pre>
2
0.0 0.0 1.0 1.0 1.0 0.0 2.0 1.0
3.0 2.0 9.0 6.0 13.0 5.0 7.0 9.0
</pre>
<H2>Output for the Sample Input</H2>
<pre>
YES
NO
</pre>
|
s111215805 | p00021 | Wrong Answer | for i in range(int(raw_input())):
x1, y1, x2, y2, x3, y3, x4, y4 = map(float, raw_input().split())
a = x1 - x2
b = y1 - y2
c = x3 - x4
d = x4 - y4
if (b == 0 or d == 0):
if (b == 0 and d == 0):
print "YES"
else:
print "NO"
else:
if (a / b == c / d):
print"YES"
else:
print "NO"
| 2
0.0 0.0 1.0 1.0 1.0 0.0 2.0 1.0
3.0 2.0 9.0 6.0 13.0 5.0 7.0 9.0
| YES
NO
|
<script type="text/x-mathjax-config">
MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }});
</script>
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
<H1>Parallelism</H1>
<p>
There are four points: $A(x_1, y_1)$, $B(x_2, y_2)$, $C(x_3, y_3)$, and $D(x_4, y_4)$. Write a program which determines whether the line $AB$ and the line $CD$ are parallel. If those two lines are parallel, your program should prints "<span>YES</span>" and if not prints "<span>NO</span>".
</p>
<H2>Input</H2>
<p>
Input consists of several datasets. In the first line, you are given the number of datasets $n$ ($n \leq 100$). There will be $n$ lines where each line correspondgs to each dataset. Each dataset consists of eight real numbers:<br/>
<br/>
$x_1$ $y_1$ $x_2$ $y_2$ $x_3$ $y_3$ $x_4$ $y_4$<br/>
</p>
<p>
You can assume that $-100 \leq x_1, y_1, x_2, y_2, x_3, y_3, x_4, y_4 \leq 100$.
Each value is a real number with at most 5 digits after the decimal point.
</p>
<H2>Output</H2>
<p>
For each dataset, print "<span>YES</span>" or "<span>NO</span>" in a line.
</p>
<H2>Sample Input</H2>
<pre>
2
0.0 0.0 1.0 1.0 1.0 0.0 2.0 1.0
3.0 2.0 9.0 6.0 13.0 5.0 7.0 9.0
</pre>
<H2>Output for the Sample Input</H2>
<pre>
YES
NO
</pre>
|
s450460215 | p00021 | Wrong Answer | for i in range(int(raw_input())):
x1, y1, x2, y2, x3, y3, x4, y4 = map(float, raw_input().split())
a = x1 - x2
b = y1 - y2
c = x3 - x4
d = y3 - y4
if (b == 0 or d == 0):
if (b == 0 and d == 0):
print "YES"
else:
print "NO"
else:
if (a / b == c / d):
print"YES"
else:
print "NO"
| 2
0.0 0.0 1.0 1.0 1.0 0.0 2.0 1.0
3.0 2.0 9.0 6.0 13.0 5.0 7.0 9.0
| YES
NO
|
<script type="text/x-mathjax-config">
MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }});
</script>
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
<H1>Parallelism</H1>
<p>
There are four points: $A(x_1, y_1)$, $B(x_2, y_2)$, $C(x_3, y_3)$, and $D(x_4, y_4)$. Write a program which determines whether the line $AB$ and the line $CD$ are parallel. If those two lines are parallel, your program should prints "<span>YES</span>" and if not prints "<span>NO</span>".
</p>
<H2>Input</H2>
<p>
Input consists of several datasets. In the first line, you are given the number of datasets $n$ ($n \leq 100$). There will be $n$ lines where each line correspondgs to each dataset. Each dataset consists of eight real numbers:<br/>
<br/>
$x_1$ $y_1$ $x_2$ $y_2$ $x_3$ $y_3$ $x_4$ $y_4$<br/>
</p>
<p>
You can assume that $-100 \leq x_1, y_1, x_2, y_2, x_3, y_3, x_4, y_4 \leq 100$.
Each value is a real number with at most 5 digits after the decimal point.
</p>
<H2>Output</H2>
<p>
For each dataset, print "<span>YES</span>" or "<span>NO</span>" in a line.
</p>
<H2>Sample Input</H2>
<pre>
2
0.0 0.0 1.0 1.0 1.0 0.0 2.0 1.0
3.0 2.0 9.0 6.0 13.0 5.0 7.0 9.0
</pre>
<H2>Output for the Sample Input</H2>
<pre>
YES
NO
</pre>
|
s492824920 | p00021 | Wrong Answer | for i in range(int(raw_input())):
x1, y1, x2, y2, x3, y3, x4, y4 = map(float, raw_input().split())
a = x1 - x2
b = y1 - y2
c = x3 - x4
d = y3 - y4
if (b == 0 or d == 0):
if (b == 0 and d == 0):
print"YES"
else:
print"NO"
else:
if (a / b == c / d):
print"YES"
else:
print"NO"
| 2
0.0 0.0 1.0 1.0 1.0 0.0 2.0 1.0
3.0 2.0 9.0 6.0 13.0 5.0 7.0 9.0
| YES
NO
|
<script type="text/x-mathjax-config">
MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }});
</script>
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
<H1>Parallelism</H1>
<p>
There are four points: $A(x_1, y_1)$, $B(x_2, y_2)$, $C(x_3, y_3)$, and $D(x_4, y_4)$. Write a program which determines whether the line $AB$ and the line $CD$ are parallel. If those two lines are parallel, your program should prints "<span>YES</span>" and if not prints "<span>NO</span>".
</p>
<H2>Input</H2>
<p>
Input consists of several datasets. In the first line, you are given the number of datasets $n$ ($n \leq 100$). There will be $n$ lines where each line correspondgs to each dataset. Each dataset consists of eight real numbers:<br/>
<br/>
$x_1$ $y_1$ $x_2$ $y_2$ $x_3$ $y_3$ $x_4$ $y_4$<br/>
</p>
<p>
You can assume that $-100 \leq x_1, y_1, x_2, y_2, x_3, y_3, x_4, y_4 \leq 100$.
Each value is a real number with at most 5 digits after the decimal point.
</p>
<H2>Output</H2>
<p>
For each dataset, print "<span>YES</span>" or "<span>NO</span>" in a line.
</p>
<H2>Sample Input</H2>
<pre>
2
0.0 0.0 1.0 1.0 1.0 0.0 2.0 1.0
3.0 2.0 9.0 6.0 13.0 5.0 7.0 9.0
</pre>
<H2>Output for the Sample Input</H2>
<pre>
YES
NO
</pre>
|
s395911654 | p00021 | Wrong Answer | for i in range(int(raw_input())):
x1, y1, x2, y2, x3, y3, x4, y4 = map(float, raw_input().split())
a = x1-x2
b = y1-y2
c = x3-x4
d = y3-y4
if b == 0 or d == 0:
if b == 0 and d == 0:
print "YES"
else:
print "NO"
else:
if a / b == c / d:
print "YES"
else:
print "NO"
| 2
0.0 0.0 1.0 1.0 1.0 0.0 2.0 1.0
3.0 2.0 9.0 6.0 13.0 5.0 7.0 9.0
| YES
NO
|
<script type="text/x-mathjax-config">
MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }});
</script>
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
<H1>Parallelism</H1>
<p>
There are four points: $A(x_1, y_1)$, $B(x_2, y_2)$, $C(x_3, y_3)$, and $D(x_4, y_4)$. Write a program which determines whether the line $AB$ and the line $CD$ are parallel. If those two lines are parallel, your program should prints "<span>YES</span>" and if not prints "<span>NO</span>".
</p>
<H2>Input</H2>
<p>
Input consists of several datasets. In the first line, you are given the number of datasets $n$ ($n \leq 100$). There will be $n$ lines where each line correspondgs to each dataset. Each dataset consists of eight real numbers:<br/>
<br/>
$x_1$ $y_1$ $x_2$ $y_2$ $x_3$ $y_3$ $x_4$ $y_4$<br/>
</p>
<p>
You can assume that $-100 \leq x_1, y_1, x_2, y_2, x_3, y_3, x_4, y_4 \leq 100$.
Each value is a real number with at most 5 digits after the decimal point.
</p>
<H2>Output</H2>
<p>
For each dataset, print "<span>YES</span>" or "<span>NO</span>" in a line.
</p>
<H2>Sample Input</H2>
<pre>
2
0.0 0.0 1.0 1.0 1.0 0.0 2.0 1.0
3.0 2.0 9.0 6.0 13.0 5.0 7.0 9.0
</pre>
<H2>Output for the Sample Input</H2>
<pre>
YES
NO
</pre>
|
s258521992 | p00021 | Wrong Answer | for i in range(int(raw_input())):
x1, y1, x2, y2, x3, y3, x4, y4 = map(float, raw_input().split())
a = x1-x2
b = y1-y2
c = x3-x4
d = y3-y4
if a == 0 or c == 0:
if a == 0 and c == 0:
print "YES"
else:
print "NO"
else:
if b / a == d / c:
print "YES"
else:
print "NO"
| 2
0.0 0.0 1.0 1.0 1.0 0.0 2.0 1.0
3.0 2.0 9.0 6.0 13.0 5.0 7.0 9.0
| YES
NO
|
<script type="text/x-mathjax-config">
MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }});
</script>
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
<H1>Parallelism</H1>
<p>
There are four points: $A(x_1, y_1)$, $B(x_2, y_2)$, $C(x_3, y_3)$, and $D(x_4, y_4)$. Write a program which determines whether the line $AB$ and the line $CD$ are parallel. If those two lines are parallel, your program should prints "<span>YES</span>" and if not prints "<span>NO</span>".
</p>
<H2>Input</H2>
<p>
Input consists of several datasets. In the first line, you are given the number of datasets $n$ ($n \leq 100$). There will be $n$ lines where each line correspondgs to each dataset. Each dataset consists of eight real numbers:<br/>
<br/>
$x_1$ $y_1$ $x_2$ $y_2$ $x_3$ $y_3$ $x_4$ $y_4$<br/>
</p>
<p>
You can assume that $-100 \leq x_1, y_1, x_2, y_2, x_3, y_3, x_4, y_4 \leq 100$.
Each value is a real number with at most 5 digits after the decimal point.
</p>
<H2>Output</H2>
<p>
For each dataset, print "<span>YES</span>" or "<span>NO</span>" in a line.
</p>
<H2>Sample Input</H2>
<pre>
2
0.0 0.0 1.0 1.0 1.0 0.0 2.0 1.0
3.0 2.0 9.0 6.0 13.0 5.0 7.0 9.0
</pre>
<H2>Output for the Sample Input</H2>
<pre>
YES
NO
</pre>
|
s968276763 | p00021 | Wrong Answer | for i in range(int(raw_input())):
x1, y1, x2, y2, x3, y3, x4, y4 = map(float, raw_input().split())
a = x1-x2
b = y1-y2
c = x3-x4
d = y3-y4
if a == 0 or c == 0:
if a == 0 and c == 0:
print "YES"
else:
print "NO"
else:
if float(b / a) == float(d / c):
print "YES"
else:
print "NO"
| 2
0.0 0.0 1.0 1.0 1.0 0.0 2.0 1.0
3.0 2.0 9.0 6.0 13.0 5.0 7.0 9.0
| YES
NO
|
<script type="text/x-mathjax-config">
MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }});
</script>
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
<H1>Parallelism</H1>
<p>
There are four points: $A(x_1, y_1)$, $B(x_2, y_2)$, $C(x_3, y_3)$, and $D(x_4, y_4)$. Write a program which determines whether the line $AB$ and the line $CD$ are parallel. If those two lines are parallel, your program should prints "<span>YES</span>" and if not prints "<span>NO</span>".
</p>
<H2>Input</H2>
<p>
Input consists of several datasets. In the first line, you are given the number of datasets $n$ ($n \leq 100$). There will be $n$ lines where each line correspondgs to each dataset. Each dataset consists of eight real numbers:<br/>
<br/>
$x_1$ $y_1$ $x_2$ $y_2$ $x_3$ $y_3$ $x_4$ $y_4$<br/>
</p>
<p>
You can assume that $-100 \leq x_1, y_1, x_2, y_2, x_3, y_3, x_4, y_4 \leq 100$.
Each value is a real number with at most 5 digits after the decimal point.
</p>
<H2>Output</H2>
<p>
For each dataset, print "<span>YES</span>" or "<span>NO</span>" in a line.
</p>
<H2>Sample Input</H2>
<pre>
2
0.0 0.0 1.0 1.0 1.0 0.0 2.0 1.0
3.0 2.0 9.0 6.0 13.0 5.0 7.0 9.0
</pre>
<H2>Output for the Sample Input</H2>
<pre>
YES
NO
</pre>
|
s049870918 | p00021 | Wrong Answer | n=int(input())
for nn in range(n):
x1,y1,x2,y2,x3,y3,x4,y4=list(map(float,input().split()))
if x2-x1==0 or x4-x3==0:
if x1==x2 and x3==x4:
print("YES")
else:
print("NO")
else:
if (y2-y1)/(x2-x1)==(y4-y3)/(x4-x3):
print("YES")
else:
print("NO")
| 2
0.0 0.0 1.0 1.0 1.0 0.0 2.0 1.0
3.0 2.0 9.0 6.0 13.0 5.0 7.0 9.0
| YES
NO
|
<script type="text/x-mathjax-config">
MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }});
</script>
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
<H1>Parallelism</H1>
<p>
There are four points: $A(x_1, y_1)$, $B(x_2, y_2)$, $C(x_3, y_3)$, and $D(x_4, y_4)$. Write a program which determines whether the line $AB$ and the line $CD$ are parallel. If those two lines are parallel, your program should prints "<span>YES</span>" and if not prints "<span>NO</span>".
</p>
<H2>Input</H2>
<p>
Input consists of several datasets. In the first line, you are given the number of datasets $n$ ($n \leq 100$). There will be $n$ lines where each line correspondgs to each dataset. Each dataset consists of eight real numbers:<br/>
<br/>
$x_1$ $y_1$ $x_2$ $y_2$ $x_3$ $y_3$ $x_4$ $y_4$<br/>
</p>
<p>
You can assume that $-100 \leq x_1, y_1, x_2, y_2, x_3, y_3, x_4, y_4 \leq 100$.
Each value is a real number with at most 5 digits after the decimal point.
</p>
<H2>Output</H2>
<p>
For each dataset, print "<span>YES</span>" or "<span>NO</span>" in a line.
</p>
<H2>Sample Input</H2>
<pre>
2
0.0 0.0 1.0 1.0 1.0 0.0 2.0 1.0
3.0 2.0 9.0 6.0 13.0 5.0 7.0 9.0
</pre>
<H2>Output for the Sample Input</H2>
<pre>
YES
NO
</pre>
|
s979628658 | p00021 | Wrong Answer | #! -*- coding: utf-8-unix -*-
import sys
if __name__=='__main__':
lines = [x.strip() for x in sys.stdin.readlines() if x != '' and x != '\n'] | 2
0.0 0.0 1.0 1.0 1.0 0.0 2.0 1.0
3.0 2.0 9.0 6.0 13.0 5.0 7.0 9.0
| YES
NO
|
<script type="text/x-mathjax-config">
MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }});
</script>
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
<H1>Parallelism</H1>
<p>
There are four points: $A(x_1, y_1)$, $B(x_2, y_2)$, $C(x_3, y_3)$, and $D(x_4, y_4)$. Write a program which determines whether the line $AB$ and the line $CD$ are parallel. If those two lines are parallel, your program should prints "<span>YES</span>" and if not prints "<span>NO</span>".
</p>
<H2>Input</H2>
<p>
Input consists of several datasets. In the first line, you are given the number of datasets $n$ ($n \leq 100$). There will be $n$ lines where each line correspondgs to each dataset. Each dataset consists of eight real numbers:<br/>
<br/>
$x_1$ $y_1$ $x_2$ $y_2$ $x_3$ $y_3$ $x_4$ $y_4$<br/>
</p>
<p>
You can assume that $-100 \leq x_1, y_1, x_2, y_2, x_3, y_3, x_4, y_4 \leq 100$.
Each value is a real number with at most 5 digits after the decimal point.
</p>
<H2>Output</H2>
<p>
For each dataset, print "<span>YES</span>" or "<span>NO</span>" in a line.
</p>
<H2>Sample Input</H2>
<pre>
2
0.0 0.0 1.0 1.0 1.0 0.0 2.0 1.0
3.0 2.0 9.0 6.0 13.0 5.0 7.0 9.0
</pre>
<H2>Output for the Sample Input</H2>
<pre>
YES
NO
</pre>
|
s366144486 | p00021 | Wrong Answer | import sys
if __name__=='__main__':
lines = [x.strip() for x in sys.stdin.readlines() if x != '' and x != '\n']
n = int(lines[0])
for i in xrange(n):
x1, y1, x2, y2, x3, y3, x4, y4 = map(float, lines[i+1].split(' ')) | 2
0.0 0.0 1.0 1.0 1.0 0.0 2.0 1.0
3.0 2.0 9.0 6.0 13.0 5.0 7.0 9.0
| YES
NO
|
<script type="text/x-mathjax-config">
MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }});
</script>
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
<H1>Parallelism</H1>
<p>
There are four points: $A(x_1, y_1)$, $B(x_2, y_2)$, $C(x_3, y_3)$, and $D(x_4, y_4)$. Write a program which determines whether the line $AB$ and the line $CD$ are parallel. If those two lines are parallel, your program should prints "<span>YES</span>" and if not prints "<span>NO</span>".
</p>
<H2>Input</H2>
<p>
Input consists of several datasets. In the first line, you are given the number of datasets $n$ ($n \leq 100$). There will be $n$ lines where each line correspondgs to each dataset. Each dataset consists of eight real numbers:<br/>
<br/>
$x_1$ $y_1$ $x_2$ $y_2$ $x_3$ $y_3$ $x_4$ $y_4$<br/>
</p>
<p>
You can assume that $-100 \leq x_1, y_1, x_2, y_2, x_3, y_3, x_4, y_4 \leq 100$.
Each value is a real number with at most 5 digits after the decimal point.
</p>
<H2>Output</H2>
<p>
For each dataset, print "<span>YES</span>" or "<span>NO</span>" in a line.
</p>
<H2>Sample Input</H2>
<pre>
2
0.0 0.0 1.0 1.0 1.0 0.0 2.0 1.0
3.0 2.0 9.0 6.0 13.0 5.0 7.0 9.0
</pre>
<H2>Output for the Sample Input</H2>
<pre>
YES
NO
</pre>
|
s496834956 | p00021 | Wrong Answer | #! -*- coding: utf-8-unix -*-
import sys
if __name__=='__main__':
lines = [x.strip() for x in sys.stdin.readlines() if x != '' and x != '\n']
n = int(lines[0])
for i in xrange(n):
x1, y1, x2, y2, x3, y3, x4, y4 = map(float, lines[i+1].split(' '))
if x1 == x2 or y1 == y2 or x3 == x4 or y3 == y4:
print 'NO'
continue
a1 = (y2 - y1) / (x2 - x1)
b1 = y1 - a1 * x1
a2 = (y4 - y3) / (x4 - x3)
b2 = y3 - a2 * x3
if (a1 == a2) and (b1 != b2):
print 'YES'
else:
print 'NO' | 2
0.0 0.0 1.0 1.0 1.0 0.0 2.0 1.0
3.0 2.0 9.0 6.0 13.0 5.0 7.0 9.0
| YES
NO
|
<script type="text/x-mathjax-config">
MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }});
</script>
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
<H1>Parallelism</H1>
<p>
There are four points: $A(x_1, y_1)$, $B(x_2, y_2)$, $C(x_3, y_3)$, and $D(x_4, y_4)$. Write a program which determines whether the line $AB$ and the line $CD$ are parallel. If those two lines are parallel, your program should prints "<span>YES</span>" and if not prints "<span>NO</span>".
</p>
<H2>Input</H2>
<p>
Input consists of several datasets. In the first line, you are given the number of datasets $n$ ($n \leq 100$). There will be $n$ lines where each line correspondgs to each dataset. Each dataset consists of eight real numbers:<br/>
<br/>
$x_1$ $y_1$ $x_2$ $y_2$ $x_3$ $y_3$ $x_4$ $y_4$<br/>
</p>
<p>
You can assume that $-100 \leq x_1, y_1, x_2, y_2, x_3, y_3, x_4, y_4 \leq 100$.
Each value is a real number with at most 5 digits after the decimal point.
</p>
<H2>Output</H2>
<p>
For each dataset, print "<span>YES</span>" or "<span>NO</span>" in a line.
</p>
<H2>Sample Input</H2>
<pre>
2
0.0 0.0 1.0 1.0 1.0 0.0 2.0 1.0
3.0 2.0 9.0 6.0 13.0 5.0 7.0 9.0
</pre>
<H2>Output for the Sample Input</H2>
<pre>
YES
NO
</pre>
|
s071263923 | p00021 | Wrong Answer | #! -*- coding: utf-8-unix -*-
import sys
if __name__=='__main__':
# lines = [x.strip() for x in sys.stdin.readlines() if x != '' and x != '\n']
# n = int(lines[0])
n = int(raw_input())
for i in xrange(n):
# x1, y1, x2, y2, x3, y3, x4, y4 = map(float, lines[i+1].split(' '))
x1, y1, x2, y2, x3, y3, x4, y4 = map(float, raw_input().strip().split(' ')) | 2
0.0 0.0 1.0 1.0 1.0 0.0 2.0 1.0
3.0 2.0 9.0 6.0 13.0 5.0 7.0 9.0
| YES
NO
|
<script type="text/x-mathjax-config">
MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }});
</script>
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
<H1>Parallelism</H1>
<p>
There are four points: $A(x_1, y_1)$, $B(x_2, y_2)$, $C(x_3, y_3)$, and $D(x_4, y_4)$. Write a program which determines whether the line $AB$ and the line $CD$ are parallel. If those two lines are parallel, your program should prints "<span>YES</span>" and if not prints "<span>NO</span>".
</p>
<H2>Input</H2>
<p>
Input consists of several datasets. In the first line, you are given the number of datasets $n$ ($n \leq 100$). There will be $n$ lines where each line correspondgs to each dataset. Each dataset consists of eight real numbers:<br/>
<br/>
$x_1$ $y_1$ $x_2$ $y_2$ $x_3$ $y_3$ $x_4$ $y_4$<br/>
</p>
<p>
You can assume that $-100 \leq x_1, y_1, x_2, y_2, x_3, y_3, x_4, y_4 \leq 100$.
Each value is a real number with at most 5 digits after the decimal point.
</p>
<H2>Output</H2>
<p>
For each dataset, print "<span>YES</span>" or "<span>NO</span>" in a line.
</p>
<H2>Sample Input</H2>
<pre>
2
0.0 0.0 1.0 1.0 1.0 0.0 2.0 1.0
3.0 2.0 9.0 6.0 13.0 5.0 7.0 9.0
</pre>
<H2>Output for the Sample Input</H2>
<pre>
YES
NO
</pre>
|
s187331717 | p00021 | Wrong Answer | #! -*- coding: utf-8-unix -*-
import sys
if __name__=='__main__':
# lines = [x.strip() for x in sys.stdin.readlines() if x != '' and x != '\n']
# n = int(lines[0])
n = int(raw_input())
for i in xrange(n):
# x1, y1, x2, y2, x3, y3, x4, y4 = map(float, lines[i+1].split(' '))
x1, y1, x2, y2, x3, y3, x4, y4 = map(float, raw_input().strip().split(' '))
if x1 == x2 or x3 == x4:
if x1 == x2 and x3 == x4:
print 'YES'
else:
print 'NO'
if y1 == y2 or y3 == y4:
if y1 == y2 and y3 == y4:
print 'YES'
else:
print 'NO'
try:
a1 = (y2 - y1) / (x2 - x1)
b1 = y1 - a1 * x1
a2 = (y4 - y3) / (x4 - x3)
b2 = y3 - a2 * x3
if (a1 == a2) and (b1 != b2):
print 'YES'
else:
print 'NO'
except:
break | 2
0.0 0.0 1.0 1.0 1.0 0.0 2.0 1.0
3.0 2.0 9.0 6.0 13.0 5.0 7.0 9.0
| YES
NO
|
<script type="text/x-mathjax-config">
MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }});
</script>
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
<H1>Parallelism</H1>
<p>
There are four points: $A(x_1, y_1)$, $B(x_2, y_2)$, $C(x_3, y_3)$, and $D(x_4, y_4)$. Write a program which determines whether the line $AB$ and the line $CD$ are parallel. If those two lines are parallel, your program should prints "<span>YES</span>" and if not prints "<span>NO</span>".
</p>
<H2>Input</H2>
<p>
Input consists of several datasets. In the first line, you are given the number of datasets $n$ ($n \leq 100$). There will be $n$ lines where each line correspondgs to each dataset. Each dataset consists of eight real numbers:<br/>
<br/>
$x_1$ $y_1$ $x_2$ $y_2$ $x_3$ $y_3$ $x_4$ $y_4$<br/>
</p>
<p>
You can assume that $-100 \leq x_1, y_1, x_2, y_2, x_3, y_3, x_4, y_4 \leq 100$.
Each value is a real number with at most 5 digits after the decimal point.
</p>
<H2>Output</H2>
<p>
For each dataset, print "<span>YES</span>" or "<span>NO</span>" in a line.
</p>
<H2>Sample Input</H2>
<pre>
2
0.0 0.0 1.0 1.0 1.0 0.0 2.0 1.0
3.0 2.0 9.0 6.0 13.0 5.0 7.0 9.0
</pre>
<H2>Output for the Sample Input</H2>
<pre>
YES
NO
</pre>
|
s292356291 | p00021 | Wrong Answer | #! -*- coding: utf-8-unix -*-
import sys
if __name__=='__main__':
# lines = [x.strip() for x in sys.stdin.readlines() if x != '' and x != '\n']
# n = int(lines[0])
n = int(raw_input())
for i in xrange(n):
# x1, y1, x2, y2, x3, y3, x4, y4 = map(float, lines[i+1].split(' '))
x1, y1, x2, y2, x3, y3, x4, y4 = map(float, raw_input().strip().split(' '))
if x1 == x2 or x3 == x4:
if x1 == x2 and x3 == x4:
print 'YES'
else:
print 'NO'
continue
if y1 == y2 or y3 == y4:
if y1 == y2 and y3 == y4:
print 'YES'
else:
print 'NO'
continue
try:
a1 = (y2 - y1) / (x2 - x1)
b1 = y1 - a1 * x1
a2 = (y4 - y3) / (x4 - x3)
b2 = y3 - a2 * x3
if (a1 == a2) and (b1 != b2):
print 'YES'
else:
print 'NO'
except:
break | 2
0.0 0.0 1.0 1.0 1.0 0.0 2.0 1.0
3.0 2.0 9.0 6.0 13.0 5.0 7.0 9.0
| YES
NO
|
<script type="text/x-mathjax-config">
MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }});
</script>
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
<H1>Parallelism</H1>
<p>
There are four points: $A(x_1, y_1)$, $B(x_2, y_2)$, $C(x_3, y_3)$, and $D(x_4, y_4)$. Write a program which determines whether the line $AB$ and the line $CD$ are parallel. If those two lines are parallel, your program should prints "<span>YES</span>" and if not prints "<span>NO</span>".
</p>
<H2>Input</H2>
<p>
Input consists of several datasets. In the first line, you are given the number of datasets $n$ ($n \leq 100$). There will be $n$ lines where each line correspondgs to each dataset. Each dataset consists of eight real numbers:<br/>
<br/>
$x_1$ $y_1$ $x_2$ $y_2$ $x_3$ $y_3$ $x_4$ $y_4$<br/>
</p>
<p>
You can assume that $-100 \leq x_1, y_1, x_2, y_2, x_3, y_3, x_4, y_4 \leq 100$.
Each value is a real number with at most 5 digits after the decimal point.
</p>
<H2>Output</H2>
<p>
For each dataset, print "<span>YES</span>" or "<span>NO</span>" in a line.
</p>
<H2>Sample Input</H2>
<pre>
2
0.0 0.0 1.0 1.0 1.0 0.0 2.0 1.0
3.0 2.0 9.0 6.0 13.0 5.0 7.0 9.0
</pre>
<H2>Output for the Sample Input</H2>
<pre>
YES
NO
</pre>
|
s280496469 | p00021 | Wrong Answer | #! -*- coding: utf-8-unix -*-
import sys
if __name__=='__main__':
# lines = [x.strip() for x in sys.stdin.readlines() if x != '' and x != '\n']
# n = int(lines[0])
n = int(raw_input())
for i in xrange(n):
# x1, y1, x2, y2, x3, y3, x4, y4 = map(float, lines[i+1].split(' '))
x1, y1, x2, y2, x3, y3, x4, y4 = map(float, raw_input().strip().split(' '))
if x1 == x2 or x3 == x4:
if x1 == x2 and x3 == x4:
print 'YES'
else:
print 'NO'
continue
elif y1 == y2 or y3 == y4:
if y1 == y2 and y3 == y4:
print 'YES'
else:
print 'NO'
continue
else:
a1 = (y2 - y1) / (x2 - x1)
b1 = y1 - a1 * x1
a2 = (y4 - y3) / (x4 - x3)
b2 = y3 - a2 * x3
if (a1 == a2) and (b1 != b2):
print 'YES'
else:
print 'NO'
# except:
# break | 2
0.0 0.0 1.0 1.0 1.0 0.0 2.0 1.0
3.0 2.0 9.0 6.0 13.0 5.0 7.0 9.0
| YES
NO
|
<script type="text/x-mathjax-config">
MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }});
</script>
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
<H1>Parallelism</H1>
<p>
There are four points: $A(x_1, y_1)$, $B(x_2, y_2)$, $C(x_3, y_3)$, and $D(x_4, y_4)$. Write a program which determines whether the line $AB$ and the line $CD$ are parallel. If those two lines are parallel, your program should prints "<span>YES</span>" and if not prints "<span>NO</span>".
</p>
<H2>Input</H2>
<p>
Input consists of several datasets. In the first line, you are given the number of datasets $n$ ($n \leq 100$). There will be $n$ lines where each line correspondgs to each dataset. Each dataset consists of eight real numbers:<br/>
<br/>
$x_1$ $y_1$ $x_2$ $y_2$ $x_3$ $y_3$ $x_4$ $y_4$<br/>
</p>
<p>
You can assume that $-100 \leq x_1, y_1, x_2, y_2, x_3, y_3, x_4, y_4 \leq 100$.
Each value is a real number with at most 5 digits after the decimal point.
</p>
<H2>Output</H2>
<p>
For each dataset, print "<span>YES</span>" or "<span>NO</span>" in a line.
</p>
<H2>Sample Input</H2>
<pre>
2
0.0 0.0 1.0 1.0 1.0 0.0 2.0 1.0
3.0 2.0 9.0 6.0 13.0 5.0 7.0 9.0
</pre>
<H2>Output for the Sample Input</H2>
<pre>
YES
NO
</pre>
|
s589422042 | p00021 | Wrong Answer | #! -*- coding: utf-8-unix -*-
import sys
if __name__=='__main__':
# lines = [x.strip() for x in sys.stdin.readlines() if x != '' and x != '\n']
# n = int(lines[0])
n = int(raw_input())
for i in xrange(n):
# x1, y1, x2, y2, x3, y3, x4, y4 = map(float, lines[i+1].split(' '))
x1, y1, x2, y2, x3, y3, x4, y4 = map(float, raw_input().strip().split(' '))
if x1 == x2 or x3 == x4:
if x1 == x2 and x3 == x4:
print 'YES'
else:
print 'NO'
continue
elif y1 == y2 or y3 == y4:
if y1 == y2 and y3 == y4:
print 'YES'
else:
print 'NO'
continue
else:
a1 = (y2 - y1) / (x2 - x1)
b1 = y1 - a1 * x1
a2 = (y4 - y3) / (x4 - x3)
b2 = y3 - a2 * x3
if (a1 == a2):# and (b1 != b2):
print 'YES'
else:
print 'NO'
# except:
# break | 2
0.0 0.0 1.0 1.0 1.0 0.0 2.0 1.0
3.0 2.0 9.0 6.0 13.0 5.0 7.0 9.0
| YES
NO
|
<script type="text/x-mathjax-config">
MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }});
</script>
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
<H1>Parallelism</H1>
<p>
There are four points: $A(x_1, y_1)$, $B(x_2, y_2)$, $C(x_3, y_3)$, and $D(x_4, y_4)$. Write a program which determines whether the line $AB$ and the line $CD$ are parallel. If those two lines are parallel, your program should prints "<span>YES</span>" and if not prints "<span>NO</span>".
</p>
<H2>Input</H2>
<p>
Input consists of several datasets. In the first line, you are given the number of datasets $n$ ($n \leq 100$). There will be $n$ lines where each line correspondgs to each dataset. Each dataset consists of eight real numbers:<br/>
<br/>
$x_1$ $y_1$ $x_2$ $y_2$ $x_3$ $y_3$ $x_4$ $y_4$<br/>
</p>
<p>
You can assume that $-100 \leq x_1, y_1, x_2, y_2, x_3, y_3, x_4, y_4 \leq 100$.
Each value is a real number with at most 5 digits after the decimal point.
</p>
<H2>Output</H2>
<p>
For each dataset, print "<span>YES</span>" or "<span>NO</span>" in a line.
</p>
<H2>Sample Input</H2>
<pre>
2
0.0 0.0 1.0 1.0 1.0 0.0 2.0 1.0
3.0 2.0 9.0 6.0 13.0 5.0 7.0 9.0
</pre>
<H2>Output for the Sample Input</H2>
<pre>
YES
NO
</pre>
|
s243988524 | p00021 | Wrong Answer | #! -*- coding: utf-8-unix -*-
import sys
if __name__=='__main__':
# lines = [x.strip() for x in sys.stdin.readlines() if x != '' and x != '\n']
# n = int(lines[0])
n = int(raw_input())
for i in xrange(n):
# x1, y1, x2, y2, x3, y3, x4, y4 = map(float, lines[i+1].split(' '))
x1, y1, x2, y2, x3, y3, x4, y4 = map(float, raw_input().strip().split(' '))
if x1 == x2 or x3 == x4:
if x1 == x2 and x3 == x4:
print 'YES'
else:
print 'NO'
continue
elif y1 == y2 or y3 == y4:
if y1 == y2 and y3 == y4:
print 'YES'
else:
print 'NO'
continue
else:
if (y2 - y1) * (x4 - x3) == (y4 - y3) * (x2 - x1):
print 'YES'
else:
print 'NO'
# a1 = (y2 - y1) / (x2 - x1)
# b1 = y1 - a1 * x1
# a2 = (y4 - y3) / (x4 - x3)
# b2 = y3 - a2 * x3
# if (a1 == a2):# and (b1 != b2):
# print 'YES'
# else:
# print 'NO'
# except:
# break | 2
0.0 0.0 1.0 1.0 1.0 0.0 2.0 1.0
3.0 2.0 9.0 6.0 13.0 5.0 7.0 9.0
| YES
NO
|
<script type="text/x-mathjax-config">
MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }});
</script>
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
<H1>Parallelism</H1>
<p>
There are four points: $A(x_1, y_1)$, $B(x_2, y_2)$, $C(x_3, y_3)$, and $D(x_4, y_4)$. Write a program which determines whether the line $AB$ and the line $CD$ are parallel. If those two lines are parallel, your program should prints "<span>YES</span>" and if not prints "<span>NO</span>".
</p>
<H2>Input</H2>
<p>
Input consists of several datasets. In the first line, you are given the number of datasets $n$ ($n \leq 100$). There will be $n$ lines where each line correspondgs to each dataset. Each dataset consists of eight real numbers:<br/>
<br/>
$x_1$ $y_1$ $x_2$ $y_2$ $x_3$ $y_3$ $x_4$ $y_4$<br/>
</p>
<p>
You can assume that $-100 \leq x_1, y_1, x_2, y_2, x_3, y_3, x_4, y_4 \leq 100$.
Each value is a real number with at most 5 digits after the decimal point.
</p>
<H2>Output</H2>
<p>
For each dataset, print "<span>YES</span>" or "<span>NO</span>" in a line.
</p>
<H2>Sample Input</H2>
<pre>
2
0.0 0.0 1.0 1.0 1.0 0.0 2.0 1.0
3.0 2.0 9.0 6.0 13.0 5.0 7.0 9.0
</pre>
<H2>Output for the Sample Input</H2>
<pre>
YES
NO
</pre>
|
s509813559 | p00021 | Wrong Answer | #! -*- coding: utf-8-unix -*-
import sys
if __name__=='__main__':
# lines = [x.strip() for x in sys.stdin.readlines() if x != '' and x != '\n']
# n = int(lines[0])
n = int(raw_input())
for i in xrange(n):
# x1, y1, x2, y2, x3, y3, x4, y4 = map(float, lines[i+1].split(' '))
x1, y1, x2, y2, x3, y3, x4, y4 = map(float, raw_input().strip().split(' '))
if x1 == x2 or x3 == x4:
if x1 == x2 and x3 == x4:
print 'YES'
else:
print 'NO'
continue
elif y1 == y2 or y3 == y4:
if y1 == y2 and y3 == y4:
print 'YES'
else:
print 'NO'
continue
else:
# if (y2 - y1) * (x4 - x3) == (y4 - y3) * (x2 - x1):
if abs((y2 - y1) * (x4 - x3) - (y4 - y3) * (x2 - x1)) < 1e-5:
print 'YES'
else:
print 'NO'
# a1 = (y2 - y1) / (x2 - x1)
# b1 = y1 - a1 * x1
# a2 = (y4 - y3) / (x4 - x3)
# b2 = y3 - a2 * x3
# if (a1 == a2):# and (b1 != b2):
# print 'YES'
# else:
# print 'NO'
# except:
# break | 2
0.0 0.0 1.0 1.0 1.0 0.0 2.0 1.0
3.0 2.0 9.0 6.0 13.0 5.0 7.0 9.0
| YES
NO
|
<script type="text/x-mathjax-config">
MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }});
</script>
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
<H1>Parallelism</H1>
<p>
There are four points: $A(x_1, y_1)$, $B(x_2, y_2)$, $C(x_3, y_3)$, and $D(x_4, y_4)$. Write a program which determines whether the line $AB$ and the line $CD$ are parallel. If those two lines are parallel, your program should prints "<span>YES</span>" and if not prints "<span>NO</span>".
</p>
<H2>Input</H2>
<p>
Input consists of several datasets. In the first line, you are given the number of datasets $n$ ($n \leq 100$). There will be $n$ lines where each line correspondgs to each dataset. Each dataset consists of eight real numbers:<br/>
<br/>
$x_1$ $y_1$ $x_2$ $y_2$ $x_3$ $y_3$ $x_4$ $y_4$<br/>
</p>
<p>
You can assume that $-100 \leq x_1, y_1, x_2, y_2, x_3, y_3, x_4, y_4 \leq 100$.
Each value is a real number with at most 5 digits after the decimal point.
</p>
<H2>Output</H2>
<p>
For each dataset, print "<span>YES</span>" or "<span>NO</span>" in a line.
</p>
<H2>Sample Input</H2>
<pre>
2
0.0 0.0 1.0 1.0 1.0 0.0 2.0 1.0
3.0 2.0 9.0 6.0 13.0 5.0 7.0 9.0
</pre>
<H2>Output for the Sample Input</H2>
<pre>
YES
NO
</pre>
|
s309196263 | p00021 | Wrong Answer | #! -*- coding: utf-8-unix -*-
import sys
if __name__=='__main__':
# lines = [x.strip() for x in sys.stdin.readlines() if x != '' and x != '\n']
# n = int(lines[0])
n = int(raw_input())
for i in xrange(n):
# x1, y1, x2, y2, x3, y3, x4, y4 = map(float, lines[i+1].split(' '))
x1, y1, x2, y2, x3, y3, x4, y4 = map(float, raw_input().strip().split(' '))
# if x1 == x2 or x3 == x4:
# if x1 == x2 and x3 == x4:
# print 'YES'
# else:
# print 'NO'
# continue
# elif y1 == y2 or y3 == y4:
# if y1 == y2 and y3 == y4:
# print 'YES'
# else:
# print 'NO'
# continue
# else:
# if (y2 - y1) * (x4 - x3) == (y4 - y3) * (x2 - x1):
if abs((y2 - y1) * (x4 - x3) - (y4 - y3) * (x2 - x1)) < 1e-5:
print 'YES'
else:
print 'NO'
# a1 = (y2 - y1) / (x2 - x1)
# b1 = y1 - a1 * x1
# a2 = (y4 - y3) / (x4 - x3)
# b2 = y3 - a2 * x3
# if (a1 == a2):# and (b1 != b2):
# print 'YES'
# else:
# print 'NO'
# except:
# break | 2
0.0 0.0 1.0 1.0 1.0 0.0 2.0 1.0
3.0 2.0 9.0 6.0 13.0 5.0 7.0 9.0
| YES
NO
|
<script type="text/x-mathjax-config">
MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }});
</script>
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
<H1>Parallelism</H1>
<p>
There are four points: $A(x_1, y_1)$, $B(x_2, y_2)$, $C(x_3, y_3)$, and $D(x_4, y_4)$. Write a program which determines whether the line $AB$ and the line $CD$ are parallel. If those two lines are parallel, your program should prints "<span>YES</span>" and if not prints "<span>NO</span>".
</p>
<H2>Input</H2>
<p>
Input consists of several datasets. In the first line, you are given the number of datasets $n$ ($n \leq 100$). There will be $n$ lines where each line correspondgs to each dataset. Each dataset consists of eight real numbers:<br/>
<br/>
$x_1$ $y_1$ $x_2$ $y_2$ $x_3$ $y_3$ $x_4$ $y_4$<br/>
</p>
<p>
You can assume that $-100 \leq x_1, y_1, x_2, y_2, x_3, y_3, x_4, y_4 \leq 100$.
Each value is a real number with at most 5 digits after the decimal point.
</p>
<H2>Output</H2>
<p>
For each dataset, print "<span>YES</span>" or "<span>NO</span>" in a line.
</p>
<H2>Sample Input</H2>
<pre>
2
0.0 0.0 1.0 1.0 1.0 0.0 2.0 1.0
3.0 2.0 9.0 6.0 13.0 5.0 7.0 9.0
</pre>
<H2>Output for the Sample Input</H2>
<pre>
YES
NO
</pre>
|
s291380080 | p00021 | Wrong Answer | #! -*- coding: utf-8-unix -*-
import math
if __name__=='__main__':
# lines = [x.strip() for x in sys.stdin.readlines() if x != '' and x != '\n']
# n = int(lines[0])
n = int(raw_input())
for i in xrange(n):
# x1, y1, x2, y2, x3, y3, x4, y4 = map(float, lines[i+1].split(' '))
x1, y1, x2, y2, x3, y3, x4, y4 = map(float, raw_input().strip().split(' '))
# if x1 == x2 or x3 == x4:
# if x1 == x2 and x3 == x4:
# print 'YES'
# else:
# print 'NO'
# continue
# elif y1 == y2 or y3 == y4:
# if y1 == y2 and y3 == y4:
# print 'YES'
# else:
# print 'NO'
# continue
# else:
# if (y2 - y1) * (x4 - x3) == (y4 - y3) * (x2 - x1):
if math.fabs((y2 - y1) * (x4 - x3) - (y4 - y3) * (x2 - x1)) < 1e-5:
print 'YES'
else:
print 'NO'
# a1 = (y2 - y1) / (x2 - x1)
# b1 = y1 - a1 * x1
# a2 = (y4 - y3) / (x4 - x3)
# b2 = y3 - a2 * x3
# if (a1 == a2):# and (b1 != b2):
# print 'YES'
# else:
# print 'NO'
# except:
# break | 2
0.0 0.0 1.0 1.0 1.0 0.0 2.0 1.0
3.0 2.0 9.0 6.0 13.0 5.0 7.0 9.0
| YES
NO
|
<script type="text/x-mathjax-config">
MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }});
</script>
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
<H1>Parallelism</H1>
<p>
There are four points: $A(x_1, y_1)$, $B(x_2, y_2)$, $C(x_3, y_3)$, and $D(x_4, y_4)$. Write a program which determines whether the line $AB$ and the line $CD$ are parallel. If those two lines are parallel, your program should prints "<span>YES</span>" and if not prints "<span>NO</span>".
</p>
<H2>Input</H2>
<p>
Input consists of several datasets. In the first line, you are given the number of datasets $n$ ($n \leq 100$). There will be $n$ lines where each line correspondgs to each dataset. Each dataset consists of eight real numbers:<br/>
<br/>
$x_1$ $y_1$ $x_2$ $y_2$ $x_3$ $y_3$ $x_4$ $y_4$<br/>
</p>
<p>
You can assume that $-100 \leq x_1, y_1, x_2, y_2, x_3, y_3, x_4, y_4 \leq 100$.
Each value is a real number with at most 5 digits after the decimal point.
</p>
<H2>Output</H2>
<p>
For each dataset, print "<span>YES</span>" or "<span>NO</span>" in a line.
</p>
<H2>Sample Input</H2>
<pre>
2
0.0 0.0 1.0 1.0 1.0 0.0 2.0 1.0
3.0 2.0 9.0 6.0 13.0 5.0 7.0 9.0
</pre>
<H2>Output for the Sample Input</H2>
<pre>
YES
NO
</pre>
|
s451445785 | p00021 | Wrong Answer | class Point(object):
def __init__(self, x, y):
self.x = x
self.y = y
def __str__(self):
return "x = {0}, y = {1}".format(self.x, self.y)
class Line(Point):
eps = 0.000001
def __init__(self, p1, p2):
self.p1 = p1
self.p2 = p2
def isParallel(self, another_p):
try:
angle1 = (self.p1.y - self.p2.y) / (self.p1.x - self.p2.x)
angle2 = (another_p.p1.y - another_p.p2.y) / (another_p.p1.x - another_p.p2.x)
if angle1 >= angle2-self.eps and angle1 <= angle2+self.eps:
return True
else:
return False
except ZeroDivisionError:
if self.p1.x == self.p2.x and another_p.p1.x == another_p.p2.x:
return True
else:
return False
n = int(input())
for i in range(n):
x1, y1, x2, y2, x3, y3, x4, y4 = map(float, input().split())
A = Point(x1, y1)
B = Point(x2, y2)
C = Point(x3, y3)
D = Point(x4, y4)
AB = Line(A, B)
CD = Line(C, D)
if AB.isParallel(CD):
print("YES")
else:
print("NO") | 2
0.0 0.0 1.0 1.0 1.0 0.0 2.0 1.0
3.0 2.0 9.0 6.0 13.0 5.0 7.0 9.0
| YES
NO
|
<script type="text/x-mathjax-config">
MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }});
</script>
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
<H1>Parallelism</H1>
<p>
There are four points: $A(x_1, y_1)$, $B(x_2, y_2)$, $C(x_3, y_3)$, and $D(x_4, y_4)$. Write a program which determines whether the line $AB$ and the line $CD$ are parallel. If those two lines are parallel, your program should prints "<span>YES</span>" and if not prints "<span>NO</span>".
</p>
<H2>Input</H2>
<p>
Input consists of several datasets. In the first line, you are given the number of datasets $n$ ($n \leq 100$). There will be $n$ lines where each line correspondgs to each dataset. Each dataset consists of eight real numbers:<br/>
<br/>
$x_1$ $y_1$ $x_2$ $y_2$ $x_3$ $y_3$ $x_4$ $y_4$<br/>
</p>
<p>
You can assume that $-100 \leq x_1, y_1, x_2, y_2, x_3, y_3, x_4, y_4 \leq 100$.
Each value is a real number with at most 5 digits after the decimal point.
</p>
<H2>Output</H2>
<p>
For each dataset, print "<span>YES</span>" or "<span>NO</span>" in a line.
</p>
<H2>Sample Input</H2>
<pre>
2
0.0 0.0 1.0 1.0 1.0 0.0 2.0 1.0
3.0 2.0 9.0 6.0 13.0 5.0 7.0 9.0
</pre>
<H2>Output for the Sample Input</H2>
<pre>
YES
NO
</pre>
|
s594011966 | p00021 | Wrong Answer | n = int(raw_input())
for l in range(n):
x1,y1,x2,y2,x3,y3,x4,y4 = map(float,raw_input().split())
if y1 - y2 == 0 and y3 - y4 == 0 :
print 'YES'
elif y1 - y2 != 0 and y3 - y4 == 0 :
print 'NO'
elif y1 - y2 == 0 and y3 - y4 != 0 :
print 'NO'
else:
if (x1-x2)/(y1-y2) == (x3-x4)/(y3-y4):
print 'YES'
else:
print 'NO' | 2
0.0 0.0 1.0 1.0 1.0 0.0 2.0 1.0
3.0 2.0 9.0 6.0 13.0 5.0 7.0 9.0
| YES
NO
|
<script type="text/x-mathjax-config">
MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }});
</script>
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
<H1>Parallelism</H1>
<p>
There are four points: $A(x_1, y_1)$, $B(x_2, y_2)$, $C(x_3, y_3)$, and $D(x_4, y_4)$. Write a program which determines whether the line $AB$ and the line $CD$ are parallel. If those two lines are parallel, your program should prints "<span>YES</span>" and if not prints "<span>NO</span>".
</p>
<H2>Input</H2>
<p>
Input consists of several datasets. In the first line, you are given the number of datasets $n$ ($n \leq 100$). There will be $n$ lines where each line correspondgs to each dataset. Each dataset consists of eight real numbers:<br/>
<br/>
$x_1$ $y_1$ $x_2$ $y_2$ $x_3$ $y_3$ $x_4$ $y_4$<br/>
</p>
<p>
You can assume that $-100 \leq x_1, y_1, x_2, y_2, x_3, y_3, x_4, y_4 \leq 100$.
Each value is a real number with at most 5 digits after the decimal point.
</p>
<H2>Output</H2>
<p>
For each dataset, print "<span>YES</span>" or "<span>NO</span>" in a line.
</p>
<H2>Sample Input</H2>
<pre>
2
0.0 0.0 1.0 1.0 1.0 0.0 2.0 1.0
3.0 2.0 9.0 6.0 13.0 5.0 7.0 9.0
</pre>
<H2>Output for the Sample Input</H2>
<pre>
YES
NO
</pre>
|
s837938390 | p00021 | Wrong Answer | n = input() + 1
for val in range(1,n):
x1,y1,x2,y2,x3,y3,x4,y4 = map(float,raw_input().split())
if y1-y2 == 0 and y3-y4 == 0:
print 'YES'
elif y1-y2 != 0 and y3-y4 == 0:
print 'NO'
elif y1-y2 == 0 and y3-y4 != 0:
print 'NO'
else:
if (x1-x2)/(y1-y2) == (x3-x4)/(y3-y4):
print 'YES'
else:
print 'NO' | 2
0.0 0.0 1.0 1.0 1.0 0.0 2.0 1.0
3.0 2.0 9.0 6.0 13.0 5.0 7.0 9.0
| YES
NO
|
<script type="text/x-mathjax-config">
MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }});
</script>
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
<H1>Parallelism</H1>
<p>
There are four points: $A(x_1, y_1)$, $B(x_2, y_2)$, $C(x_3, y_3)$, and $D(x_4, y_4)$. Write a program which determines whether the line $AB$ and the line $CD$ are parallel. If those two lines are parallel, your program should prints "<span>YES</span>" and if not prints "<span>NO</span>".
</p>
<H2>Input</H2>
<p>
Input consists of several datasets. In the first line, you are given the number of datasets $n$ ($n \leq 100$). There will be $n$ lines where each line correspondgs to each dataset. Each dataset consists of eight real numbers:<br/>
<br/>
$x_1$ $y_1$ $x_2$ $y_2$ $x_3$ $y_3$ $x_4$ $y_4$<br/>
</p>
<p>
You can assume that $-100 \leq x_1, y_1, x_2, y_2, x_3, y_3, x_4, y_4 \leq 100$.
Each value is a real number with at most 5 digits after the decimal point.
</p>
<H2>Output</H2>
<p>
For each dataset, print "<span>YES</span>" or "<span>NO</span>" in a line.
</p>
<H2>Sample Input</H2>
<pre>
2
0.0 0.0 1.0 1.0 1.0 0.0 2.0 1.0
3.0 2.0 9.0 6.0 13.0 5.0 7.0 9.0
</pre>
<H2>Output for the Sample Input</H2>
<pre>
YES
NO
</pre>
|
s956265133 | p00021 | Wrong Answer | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
num = input()
for i in range(num):
d = map(float,sys.stdin.readline().split())
x1,y1,x2,y2,x3,y3,x4,y4 = d[0],d[1],d[2],d[3],d[4],d[5],d[6],d[7]
ab = [ x2-x1, y2-y1 ]
cd = [ x4-x3, y4-y3 ]
if ab[0] == 0 and cd[0] == 0:
print "YES"
elif ab[0] == 0 and cd[0] != 0:
print "NO"
elif ab[0] != 0 and cd[0] == 0:
print "NO"
elif ab[1]/ab[0] == cd[1]/cd[0]:
print "YES"
else:
print "NO" | 2
0.0 0.0 1.0 1.0 1.0 0.0 2.0 1.0
3.0 2.0 9.0 6.0 13.0 5.0 7.0 9.0
| YES
NO
|
<script type="text/x-mathjax-config">
MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }});
</script>
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
<H1>Parallelism</H1>
<p>
There are four points: $A(x_1, y_1)$, $B(x_2, y_2)$, $C(x_3, y_3)$, and $D(x_4, y_4)$. Write a program which determines whether the line $AB$ and the line $CD$ are parallel. If those two lines are parallel, your program should prints "<span>YES</span>" and if not prints "<span>NO</span>".
</p>
<H2>Input</H2>
<p>
Input consists of several datasets. In the first line, you are given the number of datasets $n$ ($n \leq 100$). There will be $n$ lines where each line correspondgs to each dataset. Each dataset consists of eight real numbers:<br/>
<br/>
$x_1$ $y_1$ $x_2$ $y_2$ $x_3$ $y_3$ $x_4$ $y_4$<br/>
</p>
<p>
You can assume that $-100 \leq x_1, y_1, x_2, y_2, x_3, y_3, x_4, y_4 \leq 100$.
Each value is a real number with at most 5 digits after the decimal point.
</p>
<H2>Output</H2>
<p>
For each dataset, print "<span>YES</span>" or "<span>NO</span>" in a line.
</p>
<H2>Sample Input</H2>
<pre>
2
0.0 0.0 1.0 1.0 1.0 0.0 2.0 1.0
3.0 2.0 9.0 6.0 13.0 5.0 7.0 9.0
</pre>
<H2>Output for the Sample Input</H2>
<pre>
YES
NO
</pre>
|
s010584063 | p00021 | Wrong Answer | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
num = input()
for i in range(num):
d = map(float,sys.stdin.readline().split())
x1,y1,x2,y2,x3,y3,x4,y4 = d[0],d[1],d[2],d[3],d[4],d[5],d[6],d[7]
ab = [ x2-x1, y2-y1 ]
cd = [ x4-x3, y4-y3 ]
if ab[0] == 0 and cd[0] == 0:
print "YES"
elif ab[0] == 0 and cd[0] != 0:
print "NO"
elif ab[0] != 0 and cd[0] == 0:
print "NO"
elif ab[1]/ab[0] - cd[1]/cd[0] < 1e-8:
print "YES"
else:
print "NO" | 2
0.0 0.0 1.0 1.0 1.0 0.0 2.0 1.0
3.0 2.0 9.0 6.0 13.0 5.0 7.0 9.0
| YES
NO
|
<script type="text/x-mathjax-config">
MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }});
</script>
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
<H1>Parallelism</H1>
<p>
There are four points: $A(x_1, y_1)$, $B(x_2, y_2)$, $C(x_3, y_3)$, and $D(x_4, y_4)$. Write a program which determines whether the line $AB$ and the line $CD$ are parallel. If those two lines are parallel, your program should prints "<span>YES</span>" and if not prints "<span>NO</span>".
</p>
<H2>Input</H2>
<p>
Input consists of several datasets. In the first line, you are given the number of datasets $n$ ($n \leq 100$). There will be $n$ lines where each line correspondgs to each dataset. Each dataset consists of eight real numbers:<br/>
<br/>
$x_1$ $y_1$ $x_2$ $y_2$ $x_3$ $y_3$ $x_4$ $y_4$<br/>
</p>
<p>
You can assume that $-100 \leq x_1, y_1, x_2, y_2, x_3, y_3, x_4, y_4 \leq 100$.
Each value is a real number with at most 5 digits after the decimal point.
</p>
<H2>Output</H2>
<p>
For each dataset, print "<span>YES</span>" or "<span>NO</span>" in a line.
</p>
<H2>Sample Input</H2>
<pre>
2
0.0 0.0 1.0 1.0 1.0 0.0 2.0 1.0
3.0 2.0 9.0 6.0 13.0 5.0 7.0 9.0
</pre>
<H2>Output for the Sample Input</H2>
<pre>
YES
NO
</pre>
|
s588147119 | p00021 | Wrong Answer | import sys
lines = sys.stdin.readlines()
for line in lines[1:]:
points = map(float, line.split())
x1, y1 = points[0], points[1]
x2, y2 = points[2], points[3]
x3, y3 = points[4], points[5]
x4, y4 = points[6], points[7]
xAB = x2 - x1
yAB = y2 - y1
xCD = x4 - x3
yCD = y4 - y3
if xAB * xCD == 0:
if xAB + xCD == 0:
print 'YES'
else:
print 'NO'
elif yAB * yCD == 0:
if yAB + yCD == 0:
print 'YES'
else:
print 'NO'
else:
gradientAB = yAB / xAB
gradientCD = yCD / xCD
if gradientAB == gradientCD:
print 'YES'
else:
print 'NO' | 2
0.0 0.0 1.0 1.0 1.0 0.0 2.0 1.0
3.0 2.0 9.0 6.0 13.0 5.0 7.0 9.0
| YES
NO
|
<script type="text/x-mathjax-config">
MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }});
</script>
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
<H1>Parallelism</H1>
<p>
There are four points: $A(x_1, y_1)$, $B(x_2, y_2)$, $C(x_3, y_3)$, and $D(x_4, y_4)$. Write a program which determines whether the line $AB$ and the line $CD$ are parallel. If those two lines are parallel, your program should prints "<span>YES</span>" and if not prints "<span>NO</span>".
</p>
<H2>Input</H2>
<p>
Input consists of several datasets. In the first line, you are given the number of datasets $n$ ($n \leq 100$). There will be $n$ lines where each line correspondgs to each dataset. Each dataset consists of eight real numbers:<br/>
<br/>
$x_1$ $y_1$ $x_2$ $y_2$ $x_3$ $y_3$ $x_4$ $y_4$<br/>
</p>
<p>
You can assume that $-100 \leq x_1, y_1, x_2, y_2, x_3, y_3, x_4, y_4 \leq 100$.
Each value is a real number with at most 5 digits after the decimal point.
</p>
<H2>Output</H2>
<p>
For each dataset, print "<span>YES</span>" or "<span>NO</span>" in a line.
</p>
<H2>Sample Input</H2>
<pre>
2
0.0 0.0 1.0 1.0 1.0 0.0 2.0 1.0
3.0 2.0 9.0 6.0 13.0 5.0 7.0 9.0
</pre>
<H2>Output for the Sample Input</H2>
<pre>
YES
NO
</pre>
|
s210164929 | p00021 | Wrong Answer | n = int(input())
for i in range(n):
x1, y1, x2, y2, x3, y3, x4, y4 = map(float, input().split())
print("YES" if y1 - y3 == y2 - y4 < 1e-10 else "NO") | 2
0.0 0.0 1.0 1.0 1.0 0.0 2.0 1.0
3.0 2.0 9.0 6.0 13.0 5.0 7.0 9.0
| YES
NO
|
<script type="text/x-mathjax-config">
MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }});
</script>
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
<H1>Parallelism</H1>
<p>
There are four points: $A(x_1, y_1)$, $B(x_2, y_2)$, $C(x_3, y_3)$, and $D(x_4, y_4)$. Write a program which determines whether the line $AB$ and the line $CD$ are parallel. If those two lines are parallel, your program should prints "<span>YES</span>" and if not prints "<span>NO</span>".
</p>
<H2>Input</H2>
<p>
Input consists of several datasets. In the first line, you are given the number of datasets $n$ ($n \leq 100$). There will be $n$ lines where each line correspondgs to each dataset. Each dataset consists of eight real numbers:<br/>
<br/>
$x_1$ $y_1$ $x_2$ $y_2$ $x_3$ $y_3$ $x_4$ $y_4$<br/>
</p>
<p>
You can assume that $-100 \leq x_1, y_1, x_2, y_2, x_3, y_3, x_4, y_4 \leq 100$.
Each value is a real number with at most 5 digits after the decimal point.
</p>
<H2>Output</H2>
<p>
For each dataset, print "<span>YES</span>" or "<span>NO</span>" in a line.
</p>
<H2>Sample Input</H2>
<pre>
2
0.0 0.0 1.0 1.0 1.0 0.0 2.0 1.0
3.0 2.0 9.0 6.0 13.0 5.0 7.0 9.0
</pre>
<H2>Output for the Sample Input</H2>
<pre>
YES
NO
</pre>
|
s989027748 | p00021 | Wrong Answer | import sys
f = sys.stdin
def take2(iterable):
i = iter(iterable)
while True:
yield next(i) + next(i) * 1j
n = int(f.readline())
for _ in range(n):
xy = [xiyi for xiyi in take2(map(float, f.readline().split()))]
a, b, c, d = xy
if a.real > b.real:
a, b = b, a
if c.real > d.real:
c, d = d, c
if (a - b) / abs(a - b) - (c - d) / abs(c - d) == 0:
print('YES')
else:
print('NO') | 2
0.0 0.0 1.0 1.0 1.0 0.0 2.0 1.0
3.0 2.0 9.0 6.0 13.0 5.0 7.0 9.0
| YES
NO
|
<script type="text/x-mathjax-config">
MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }});
</script>
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
<H1>Parallelism</H1>
<p>
There are four points: $A(x_1, y_1)$, $B(x_2, y_2)$, $C(x_3, y_3)$, and $D(x_4, y_4)$. Write a program which determines whether the line $AB$ and the line $CD$ are parallel. If those two lines are parallel, your program should prints "<span>YES</span>" and if not prints "<span>NO</span>".
</p>
<H2>Input</H2>
<p>
Input consists of several datasets. In the first line, you are given the number of datasets $n$ ($n \leq 100$). There will be $n$ lines where each line correspondgs to each dataset. Each dataset consists of eight real numbers:<br/>
<br/>
$x_1$ $y_1$ $x_2$ $y_2$ $x_3$ $y_3$ $x_4$ $y_4$<br/>
</p>
<p>
You can assume that $-100 \leq x_1, y_1, x_2, y_2, x_3, y_3, x_4, y_4 \leq 100$.
Each value is a real number with at most 5 digits after the decimal point.
</p>
<H2>Output</H2>
<p>
For each dataset, print "<span>YES</span>" or "<span>NO</span>" in a line.
</p>
<H2>Sample Input</H2>
<pre>
2
0.0 0.0 1.0 1.0 1.0 0.0 2.0 1.0
3.0 2.0 9.0 6.0 13.0 5.0 7.0 9.0
</pre>
<H2>Output for the Sample Input</H2>
<pre>
YES
NO
</pre>
|
s623895771 | p00021 | Wrong Answer | import sys
f = sys.stdin
def take2(iterable):
i = iter(iterable)
while True:
yield next(i) + next(i) * 1j
n = int(f.readline())
for _ in range(n):
xy = [xiyi for xiyi in take2(map(float, f.readline().split()))]
a, b, c, d = xy
if a.real > b.real:
a, b = b, a
if c.real > d.real:
c, d = d, c
temp = (a - b) / abs(a - b) - (c - d) / abs(c - d)
if abs(temp.real) < 0.01 and abs(temp.imag) < 0.01:
print('YES')
else:
print('NO') | 2
0.0 0.0 1.0 1.0 1.0 0.0 2.0 1.0
3.0 2.0 9.0 6.0 13.0 5.0 7.0 9.0
| YES
NO
|
<script type="text/x-mathjax-config">
MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }});
</script>
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
<H1>Parallelism</H1>
<p>
There are four points: $A(x_1, y_1)$, $B(x_2, y_2)$, $C(x_3, y_3)$, and $D(x_4, y_4)$. Write a program which determines whether the line $AB$ and the line $CD$ are parallel. If those two lines are parallel, your program should prints "<span>YES</span>" and if not prints "<span>NO</span>".
</p>
<H2>Input</H2>
<p>
Input consists of several datasets. In the first line, you are given the number of datasets $n$ ($n \leq 100$). There will be $n$ lines where each line correspondgs to each dataset. Each dataset consists of eight real numbers:<br/>
<br/>
$x_1$ $y_1$ $x_2$ $y_2$ $x_3$ $y_3$ $x_4$ $y_4$<br/>
</p>
<p>
You can assume that $-100 \leq x_1, y_1, x_2, y_2, x_3, y_3, x_4, y_4 \leq 100$.
Each value is a real number with at most 5 digits after the decimal point.
</p>
<H2>Output</H2>
<p>
For each dataset, print "<span>YES</span>" or "<span>NO</span>" in a line.
</p>
<H2>Sample Input</H2>
<pre>
2
0.0 0.0 1.0 1.0 1.0 0.0 2.0 1.0
3.0 2.0 9.0 6.0 13.0 5.0 7.0 9.0
</pre>
<H2>Output for the Sample Input</H2>
<pre>
YES
NO
</pre>
|
s621510529 | p00021 | Wrong Answer | import sys
f = sys.stdin
def take2(iterable):
i = iter(iterable)
while True:
yield next(i) + next(i) * 1j
n = int(f.readline())
for _ in range(n):
xy = [xiyi for xiyi in take2(map(float, f.readline().split()))]
a, b, c, d = xy
temp = (a - b) / (c - d)
if abs(temp.imag) < 0.001:
if a - c == 0:
print('NO')
else:
temp = (a - b) / (a - c)
if abs(temp.imag) < 0.001:
print('NO')
else:
print('YES')
else:
print('NO') | 2
0.0 0.0 1.0 1.0 1.0 0.0 2.0 1.0
3.0 2.0 9.0 6.0 13.0 5.0 7.0 9.0
| YES
NO
|
<script type="text/x-mathjax-config">
MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }});
</script>
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
<H1>Parallelism</H1>
<p>
There are four points: $A(x_1, y_1)$, $B(x_2, y_2)$, $C(x_3, y_3)$, and $D(x_4, y_4)$. Write a program which determines whether the line $AB$ and the line $CD$ are parallel. If those two lines are parallel, your program should prints "<span>YES</span>" and if not prints "<span>NO</span>".
</p>
<H2>Input</H2>
<p>
Input consists of several datasets. In the first line, you are given the number of datasets $n$ ($n \leq 100$). There will be $n$ lines where each line correspondgs to each dataset. Each dataset consists of eight real numbers:<br/>
<br/>
$x_1$ $y_1$ $x_2$ $y_2$ $x_3$ $y_3$ $x_4$ $y_4$<br/>
</p>
<p>
You can assume that $-100 \leq x_1, y_1, x_2, y_2, x_3, y_3, x_4, y_4 \leq 100$.
Each value is a real number with at most 5 digits after the decimal point.
</p>
<H2>Output</H2>
<p>
For each dataset, print "<span>YES</span>" or "<span>NO</span>" in a line.
</p>
<H2>Sample Input</H2>
<pre>
2
0.0 0.0 1.0 1.0 1.0 0.0 2.0 1.0
3.0 2.0 9.0 6.0 13.0 5.0 7.0 9.0
</pre>
<H2>Output for the Sample Input</H2>
<pre>
YES
NO
</pre>
|
s651291164 | p00021 | Wrong Answer | import sys
f = sys.stdin
def take2(iterable):
i = iter(iterable)
while True:
yield next(i) + next(i) * 1j
n = int(f.readline())
for _ in range(n):
a, b, c, d = [xiyi for xiyi in take2(map(float, f.readline().split()))]
ab, cd = a - b, c - d
if abs((ab * cd).real) < 0.00001:
print('YES')
else:
print('NO') | 2
0.0 0.0 1.0 1.0 1.0 0.0 2.0 1.0
3.0 2.0 9.0 6.0 13.0 5.0 7.0 9.0
| YES
NO
|
<script type="text/x-mathjax-config">
MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }});
</script>
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
<H1>Parallelism</H1>
<p>
There are four points: $A(x_1, y_1)$, $B(x_2, y_2)$, $C(x_3, y_3)$, and $D(x_4, y_4)$. Write a program which determines whether the line $AB$ and the line $CD$ are parallel. If those two lines are parallel, your program should prints "<span>YES</span>" and if not prints "<span>NO</span>".
</p>
<H2>Input</H2>
<p>
Input consists of several datasets. In the first line, you are given the number of datasets $n$ ($n \leq 100$). There will be $n$ lines where each line correspondgs to each dataset. Each dataset consists of eight real numbers:<br/>
<br/>
$x_1$ $y_1$ $x_2$ $y_2$ $x_3$ $y_3$ $x_4$ $y_4$<br/>
</p>
<p>
You can assume that $-100 \leq x_1, y_1, x_2, y_2, x_3, y_3, x_4, y_4 \leq 100$.
Each value is a real number with at most 5 digits after the decimal point.
</p>
<H2>Output</H2>
<p>
For each dataset, print "<span>YES</span>" or "<span>NO</span>" in a line.
</p>
<H2>Sample Input</H2>
<pre>
2
0.0 0.0 1.0 1.0 1.0 0.0 2.0 1.0
3.0 2.0 9.0 6.0 13.0 5.0 7.0 9.0
</pre>
<H2>Output for the Sample Input</H2>
<pre>
YES
NO
</pre>
|
s711091054 | p00021 | Wrong Answer | for _ in range(int(input())):
a,b,c,d,e,f,g,h=map(float, input().split())
# if (b-d)/(a-c) == (f-h)/(e-g):
print("Yes")
# else:
print("No") | 2
0.0 0.0 1.0 1.0 1.0 0.0 2.0 1.0
3.0 2.0 9.0 6.0 13.0 5.0 7.0 9.0
| YES
NO
|
<script type="text/x-mathjax-config">
MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }});
</script>
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
<H1>Parallelism</H1>
<p>
There are four points: $A(x_1, y_1)$, $B(x_2, y_2)$, $C(x_3, y_3)$, and $D(x_4, y_4)$. Write a program which determines whether the line $AB$ and the line $CD$ are parallel. If those two lines are parallel, your program should prints "<span>YES</span>" and if not prints "<span>NO</span>".
</p>
<H2>Input</H2>
<p>
Input consists of several datasets. In the first line, you are given the number of datasets $n$ ($n \leq 100$). There will be $n$ lines where each line correspondgs to each dataset. Each dataset consists of eight real numbers:<br/>
<br/>
$x_1$ $y_1$ $x_2$ $y_2$ $x_3$ $y_3$ $x_4$ $y_4$<br/>
</p>
<p>
You can assume that $-100 \leq x_1, y_1, x_2, y_2, x_3, y_3, x_4, y_4 \leq 100$.
Each value is a real number with at most 5 digits after the decimal point.
</p>
<H2>Output</H2>
<p>
For each dataset, print "<span>YES</span>" or "<span>NO</span>" in a line.
</p>
<H2>Sample Input</H2>
<pre>
2
0.0 0.0 1.0 1.0 1.0 0.0 2.0 1.0
3.0 2.0 9.0 6.0 13.0 5.0 7.0 9.0
</pre>
<H2>Output for the Sample Input</H2>
<pre>
YES
NO
</pre>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.