submission_id string | problem_id string | status string | code string | input string | output string | problem_description string |
|---|---|---|---|---|---|---|
s772287528 | p00021 | Wrong Answer | 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>
| |
s235107142 | p00021 | Wrong Answer |
n=int(input())
for i in range(n):
xy=list(map(float,input().split(" ")))
X1=xy[2]-xy[0]
Y1=xy[3]-xy[1]
X2=xy[6]-xy[4]
Y2=xy[7]-xy[5]
area=X1*X2-Y1*Y2
if area==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>
|
s561866681 | p00021 | Wrong Answer |
n=int(input())
for i in range(n):
xy=list(map(float,input().split(" ")))
X1=xy[2]-xy[0]
Y1=xy[3]-xy[1]
X2=xy[6]-xy[4]
Y2=xy[7]-xy[5]
area=X1*X2-Y1*Y2
if abs(area)<10e-12:
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>
|
s420059656 | p00021 | Wrong Answer |
n=int(input())
for i in range(n):
xy=list(map(float,input().split(" ")))
X1=xy[2]-xy[0]
Y1=xy[3]-xy[1]
X2=xy[6]-xy[4]
Y2=xy[7]-xy[5]
area=X1*X2-Y1*Y2
if abs(area)<10e-12:
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>
|
s052027973 | p00021 | Wrong Answer |
n=int(input())
for i in range(n):
xy=list(map(float,input().split(" ")))
X1=xy[2]-xy[0]
Y1=xy[3]-xy[1]
X2=xy[6]-xy[4]
Y2=xy[7]-xy[5]
area=X1*X2-Y1*Y2
if abs(area)<1e-12:
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>
|
s972107447 | p00021 | Wrong Answer |
n=int(input())
for i in range(n):
xy=list(map(float,input().split(" ")))
X1=xy[2]-xy[0]
Y1=xy[3]-xy[1]
X2=xy[6]-xy[4]
Y2=xy[7]-xy[5]
area=X1*X2-Y1*Y2
if abs(area)<=1e-12:
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>
|
s258281771 | p00021 | Wrong Answer | n=int(input())
for i in range(n):
xy=list(map(float,input().split(" ")))
X1=xy[2]-xy[0]
Y1=xy[3]-xy[1]
X2=xy[6]-xy[4]
Y2=xy[7]-xy[5]
area=X1*X2-Y1*Y2
if abs(area)<=1e-10:
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>
|
s429631644 | p00021 | Wrong Answer | n=int(input())
for j in range(n):
p=[float(i) for i in input().split()]
try:
ab=round((p[3]-p[1])/(p[2]-p[0]),5)
cd=round((p[7]-p[5])/(p[6]-p[4]),5)
except:
ab=1
cd=0
if ab==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>
|
s639719187 | p00021 | Wrong Answer | n=int(input())
for j in range(n):
p=[float(i) for i in input().split()]
if p[2]-p[0]==0 or p[6]-p[4]==0:
print(["YES","NO"][bool(p[2]-p[0]+p[6]-p[4])])
else:
print(["YES","NO"][bool(round((p[3]-p[1])/(p[2]-p[0]),5)-round((p[7]-p[5])/(p[6]-p[4]),5))])
| 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>
|
s500067968 | p00021 | Wrong Answer | n=int(input())
for j in range(n):
p=[float(i) for i in input().split()]
if p[2]-p[0]==0 or p[6]-p[4]==0:
print(["YES","NO"][bool(p[2]-p[0]+p[6]-p[4])])
else:
print(["YES","NO"][bool(((p[3]-p[1])/(p[2]-p[0]))-((p[7]-p[5])/(p[6]-p[4])))])
| 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>
|
s914628042 | p00021 | Wrong Answer | n=int(input())
for j in range(n):
p=[float(i) for i in input().split()]
if round((p[2]-p[0])*(p[7]-p[5])-(p[3]-p[1])*(p[6]-p[4]),8)==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>
|
s984719735 | p00021 | Wrong Answer | for _ in range(int(input())):
x1, y1, x2, y2, x3, y3, x4, y4 = map(float, input().split())
print(["NO","YES"][(x1 - x2) * (y3 - y4) == (x3 - x4) * (y1 - y2)])
| 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>
|
s490534530 | p00021 | Wrong Answer | for _ in range(int(input())):
x1, y1, x2, y2, x3, y3, x4, y4 = map(float, input().split())
print(["NO","YES"][abs((x1 - x2) * (y3 - y4) - (x3 - x4) * (y1 - y2)) < 10e-5])
| 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>
|
s319076156 | p00021 | Wrong Answer | for _ in range(int(input())):
x1, y1, x2, y2, x3, y3, x4, y4 = map(float, input().split())
print(["NO","YES"][abs((x1 - x2) * (y3 - y4) - (x3 - x4) * (y1 - y2)) < 10e-4])
| 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>
|
s641199626 | p00021 | Wrong Answer | for _ in range(int(input())):
x1, y1, x2, y2, x3, y3, x4, y4 = map(float, input().split())
print(["NO","YES"][abs((x1 - x2) * (y3 - y4) - (x3 - x4) * (y1 - y2)) < 10e-3])
| 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>
|
s631246373 | p00021 | Wrong Answer | import math
def get_input():
while True:
try:
yield ''.join(input())
except EOFError:
break
N = int(input())
for l in range(N):
P = [float(i) for i in input().split()]
for i in range(len(P)):
P[i] = int(P[i]*100000)
x1,y1,x2,y2,x3,y3,x4,y4 = P
xa = x2-x1
ya = y2-y1
xb = x4-x3
yb = y4-y3
if xa*yb-ya*xb == 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>
|
s936720272 | p00021 | Wrong Answer | import math
def get_input():
while True:
try:
yield ''.join(input())
except EOFError:
break
N = int(input())
for l in range(N):
P = [int(100000*float(i)) for i in input().split()]
x1,y1,x2,y2,x3,y3,x4,y4 = P
xa = x2-x1
ya = y2-y1
xb = x4-x3
yb = y4-y3
if xa*yb-ya*xb == 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>
|
s620726649 | p00021 | Wrong Answer | import math
def get_input():
while True:
try:
yield ''.join(input())
except EOFError:
break
N = int(input())
for l in range(N):
P = [float(i) for i in input().split()]
x1,y1,x2,y2,x3,y3,x4,y4 = P
xa = x2-x1
ya = y2-y1
xb = x4-x3
yb = y4-y3
if xa*yb-ya*xb < 0.0000000001:
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>
|
s384485867 | p00021 | Wrong Answer | import math
def get_input():
while True:
try:
yield ''.join(input())
except EOFError:
break
N = int(input())
for l in range(N):
P = [float(i) for i in input().split()]
x1,y1,x2,y2,x3,y3,x4,y4 = P
xa = x2-x1
ya = y2-y1
xb = x4-x3
yb = y4-y3
if xa*yb-ya*xb < 1e-10:
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>
|
s232837970 | p00021 | Wrong Answer | r=[]
for i in range(int(input())):
d=[float(i) for i in input().split()]
if d[0]-d[2] != 0 and d[4]-d[6] != 0:
a=(d[1]-d[3])/(d[0]-d[2])
b=(d[5]-d[7])/(d[4]-d[6])
if a==b:r.extend([1])
else:r.extend([0])
else:
r.extend([0])
[print("YES") if i else print("NO") for i in r]
| 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>
|
s069208278 | p00021 | Wrong Answer | r=[]
for i in range(int(input())):
d=[float(i) for i in input().split()]
if d[0]-d[2] != 0 and d[4]-d[6] != 0:
a=(d[1]-d[3])/(d[0]-d[2])
b=(d[5]-d[7])/(d[4]-d[6])
if a==b:r.extend([1])
else:r.extend([0])
elif (d[0]==d[2] and d[4]==d[6]):
r.extend([1])
elif (d[1]==d[3] and d[5]==d[7]):
r.extend([1])
else:
r.extend([0])
[print("YES") if i else print("NO") for i in r]
| 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>
|
s729014578 | p00021 | Wrong Answer | r=[]
for i in range(int(input())):
d=[float(i) for i in input().split()]
if d[0]-d[2] != 0 and d[4]-d[6] != 0:
a=(d[1]-d[3])/(d[0]-d[2])
b=(d[5]-d[7])/(d[4]-d[6])
if a==b:r.extend([1])
else:r.extend([0])
elif (d[0]==d[2] and d[4]==d[6]):
r.extend([1])
else:
r.extend([0])
[print("YES") if i else print("NO") for i in r]
| 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>
|
s834091137 | p00021 | Wrong Answer | #!/usr/bin/env python
n = input()
for loop in range(n):
S = raw_input().split()
x1, y1, x2, y2, x3, y3, x4, y4 = map(float, S)
v1 = [x2 - x1, y2 - y1]
v2 = [x4 - x3, y4 - y3]
norm = (v1[0] * v1[0] + v1[1] * v1[1]) * (v2[0] * v2[0] + v2[1] * v2[1])
inn = v1[0] * v2[0] + v1[1] * v2[1]
if abs(norm) - inn * inn < 1e-10:
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>
|
s292034485 | p00021 | Wrong Answer | #!/usr/bin/env python
n = input()
for loop in range(n):
S = raw_input().split()
lst = map(float, S)
for i in range(len(lst)):
lst[i] = int(lst[i] * 1e+5)
v1 = [lst[2] - lst[0], lst[3] - lst[1]]
v2 = [lst[6] - lst[4], lst[7] - lst[5]]
norm = (v1[0] * v1[0] + v1[1] * v1[1]) * (v2[0] * v2[0] + v2[1] * v2[1])
inn = v1[0] * v2[0] + v1[1] * v2[1]
if abs(norm) - inn * inn < 1e-10:
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>
|
s540174293 | p00021 | Wrong Answer | #!/usr/bin/env python
n = input()
for loop in range(n):
S = raw_input().split()
x1, y1, x2, y2, x3, y3, x4, y4 = map(float, S)
v1 = [x2 - x1, y2 - y1]
v2 = [x4 - x3, y4 - y3]
if v1[0] * v2[1] == v2[0] * v1[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>
|
s404200176 | p00021 | Wrong Answer | # coding: utf-8
n = int(raw_input())
for i in range(n):
data = map(float, raw_input().split(' '))
x1 = data[0]
y1 = data[1]
x2 = data[2]
y2 = data[3]
x3 = data[4]
y3 = data[5]
x4 = data[6]
y4 = data[7]
try:
if (x1 == x2) and (x3 == x4):
print("YES")
elif (y2-y1)/(x2-x1) == (y4-y3)/(x4-x3):
print("YES")
else:
print("NO")
except ZeroDivisionError:
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>
|
s134178270 | p00021 | Wrong Answer | # coding: utf-8
n = int(raw_input())
for i in range(n):
data = map(float, raw_input().split(' '))
x1 = data[0]
y1 = data[1]
x2 = data[2]
y2 = data[3]
x3 = data[4]
y3 = data[5]
x4 = data[6]
y4 = data[7]
try:
if (x1 == x2) and (x3 == x4):
print("YES")
elif (y2-y1)/(x2-x1)*1.0 == (y4-y3)/(x4-x3)*1.0:
print("YES")
else:
print("NO")
except ZeroDivisionError:
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>
|
s543084699 | p00021 | Wrong Answer | # AOJ 0021: Parallelism
# Python3 2018.6.15 bal4u
EPS = 1e-7
def EQ(a, b):
return abs(a - b) < EPS
n = int(input())
for i in range(n):
ax1, ay1, ax2, ay2, bx1, by1, bx2, by2 = list(map(float, input().split()))
f = False
if EQ(ax1, ax2) and EQ(bx1, bx2): f = True
elif EQ((ay2-ay1)*(bx2-bx1), (ax2-ax1)*(by2-by1)): f = True
print('YES' if f 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>
|
s896247635 | p00021 | Wrong Answer | # AOJ 0021: Parallelism
# Python3 2018.6.15 bal4u
EPS = 1e-7
def EQ(a, b):
return True if abs(a - b) < EPS else False
n = int(input())
for i in range(n):
ax1, ay1, ax2, ay2, bx1, by1, bx2, by2 = list(map(float, input().split()))
f = False
if EQ(ax1, ax2) and EQ(bx1, bx2): f = True
elif EQ((ay2-ay1)*(bx2-bx1), (ax2-ax1)*(by2-by1)): f = True
print('YES' if f 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>
|
s563903599 | p00021 | Wrong Answer | # AOJ 0021: Parallelism
# Python3 2018.6.15 bal4u
EPS = 1e-7
def EQ(a, b):
return True if abs(a - b) < EPS else False
n = int(input())
for i in range(n):
ax1, ay1, ax2, ay2, bx1, by1, bx2, by2 = list(map(float, input().split()))
print('YES' if EQ((ay2-ay1)*(bx2-bx1), (ax2-ax1)*(by2-by1)) 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>
|
s452098459 | p00021 | Wrong Answer | # AOJ 0021: Parallelism
# Python3 2018.6.15 bal4u
n = int(input())
for i in range(n):
ax1, ay1, ax2, ay2, bx1, by1, bx2, by2 = list(map(float, input().split()))
if abs((ay2-ay1)*(bx2-bx1)-(by2-by1)*(ax2-ax1)) < 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>
|
s796086102 | p00021 | Wrong Answer | # AOJ 0021: Parallelism
# Python3 2018.6.15 bal4u
n = int(input())
for i in range(n):
asx, asy, aex, aey, bsx, bsy, bex, bey = list(map(float, input().split()))
if (asx == aex and asy == aey) or (bsx == bex and bsy == bey): print('NO')
elif abs((asy-aey)*(bsx-bex)-(asx-aex)*(bsy-bey)) < 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>
|
s949542096 | p00021 | Wrong Answer | # AOJ 0021: Parallelism
# Python3 2018.6.15 bal4u
n = int(input())
for i in range(n):
asx, asy, aex, aey, bsx, bsy, bex, bey = list(map(float, input().split()))
# if (asx == aex and asy == aey) or (bsx == bex and bsy == bey): print('NO')
if abs((asy-aey)*(bsx-bex)-(asx-aex)*(bsy-bey)) == 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>
|
s377680968 | p00021 | Wrong Answer | # AOJ 0021: Parallelism
# Python3 2018.6.15 bal4u
n = int(input())
for i in range(n):
asx, asy, aex, aey, bsx, bsy, bex, bey = list(map(float, input().split()))
if (asx == aex and asy == aey) or (bsx == bex and bsy == bey): print('NO')
if abs((asy-aey)*(bsx-bex)-(asx-aex)*(bsy-bey)) == 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>
|
s441510822 | p00021 | Wrong Answer | # AOJ 0021: Parallelism
# Python3 2018.6.15 bal4u
EPS = 1e-8
def dot(a, b):
return a.real*b.real + a.imag*b.imag
def cross(a, b):
return a.real*b.imag - a.imag*b.real
def norm(a):
return a.real**2 + a.imag**2
def project(line, p):
base = line[1]-line[0]
r = dot(p-line[0], base) / norm(base)
return line[0] + base*r
def symmetric_Point(line, p):
return p + 2*(project(line, p)-p)
def isParallelLL(line1, line2):
t = cross(line1[1]-line1[0], line2[1]-line2[0])
return -EPS <= t and t <= EPS
for _ in range(int(input())):
p = list(map(float, input().split()))
p1 = complex(p[0], p[1])
p2 = complex(p[2], p[3])
p3 = complex(p[4], p[5])
p4 = complex(p[6], p[7])
print('YES' if isParallelLL([p1,p2], [p3,p4]) 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>
|
s719850779 | p00021 | Wrong Answer | n = int(input())
for _ in range(n):
x1,y1,x2,y2,x3,y3,x4,y4 = [float(x) for x in input().split()]
a = [x2-x1, y2-y1]
b = [x4-x3, y4-y3]
if a[0]*b[1] == a[1]*b[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>
|
s977209103 | p00021 | Wrong Answer | def gcd(u,v):
r=0
while v != 0:
r=u%v;u=v;v=r
return u
for i in xrange(int(raw_input())):
a = [float(n) for n in raw_input().split()]
x1=a[2]-a[0]
y1=a[3]-a[1]
x2=a[6]-a[4]
y2=a[7]-a[5]
if x1/gcd(x1,y1)-x2/gcd(x1,y1) == 0 and y1/gcd(x1,y1)-y2/gcd(x1,y1) == 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>
|
s423997749 | p00021 | Wrong Answer | ans = []
n = input()
for i in range(n):
x1,y1,x2,y2,x3,y3,x4,y4 = map(float,raw_input().split())
if (x2-x1 ==0) or (y2-y1 == 0):
if (x2-x1 ==0) and (y2-y1 == 0):
ans.append('YES')
else:
ans.append('NO')
elif (x4-x3 ==0) or (y4-y3 == 0):
if (x4-x3 ==0) and (y4-y3 == 0):
ans.append('YES')
else:
ans.append('NO')
elif ((y2-y1)/(x2-x1) == (y4-y3)/(x4-x3)):
ans.append('YES')
else:
ans.append('NO')
for i in ans:
print i | 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>
|
s220110251 | p00021 | Wrong Answer | ans = []
n = input()
for i in range(n):
x1,y1,x2,y2,x3,y3,x4,y4 = map(float,raw_input().split())
if (x2-x1 ==0):
if (y2-y1 == 0):
ans.append('YES')
else:
ans.append('NO')
elif (x4-x3 ==0):
if (y4-y3 == 0):
ans.append('YES')
else:
ans.append('NO')
elif ((y2-y1)/(x2-x1) == (y4-y3)/(x4-x3)):
ans.append('YES')
else:
ans.append('NO')
for i in ans:
print i | 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>
|
s694133456 | p00021 | Wrong Answer | for i in range(int(input())):
try:
x1, y1, x2, y2, x3, y3, x4, y4 = map(float,raw_input().split())
if (y2-y1)/(x2-x1) == (y4-y3)/(x4-x3):
ans = (y2-y1)/(x2-x1)
if y1-ans*x1 == y3-ans*x3:
print "NO"
else: print "YES"
else:
print "NO"
except ZeroDivisionError: 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>
|
s815480290 | p00021 | Wrong Answer | #!/usr/bin/python
import sys
from collections import namedtuple
from math import sqrt
Point = namedtuple('Point', 'x y')
def datasets():
for i in range(int(sys.stdin.readline().strip())):
x1, y1, x2, y2, x3, y3, x4, y4 = [float(w) for w in sys.stdin.readline().strip().split()]
p1 = Point(x1, y1)
p2 = Point(x2, y2)
p3 = Point(x3, y3)
p4 = Point(x4, y4)
yield p1, p2, p3, p4
def main():
for A, B, C, D in datasets():
a1 = (B.y - A.y) * -1
b1 = B.x - A.x
a2 = (D.y - C.y) * -1
b2 = D.y - C.y
if a1*b2 == a2*b1:
print "YES"
else:
print "NO"
if __name__ == '__main__':
main() | 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>
|
s102659023 | p00021 | Wrong Answer | #!/usr/bin/python
import sys
from collections import namedtuple
from math import sqrt
Point = namedtuple('Point', 'x y')
def datasets():
for i in range(int(raw_input().strip())):
x1, y1, x2, y2, x3, y3, x4, y4 = [float(w) for w in raw_input().split()]
p1 = Point(x1, y1)
p2 = Point(x2, y2)
p3 = Point(x3, y3)
p4 = Point(x4, y4)
yield p1, p2, p3, p4
def main():
for A, B, C, D in datasets():
a1 = (B.y - A.y) * -1
b1 = B.x - A.x
a2 = (D.y - C.y) * -1
b2 = D.y - C.y
if a1*b2 == a2*b1:
print "YES"
else:
print "NO"
if __name__ == '__main__':
main() | 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>
|
s092870561 | p00021 | Wrong Answer | #!/usr/bin/python
import sys
from collections import namedtuple
from math import sqrt
Point = namedtuple('Point', 'x y')
def datasets():
for i in range(int(raw_input().strip())):
x1, y1, x2, y2, x3, y3, x4, y4 = [float(w) for w in raw_input().split()]
p1 = Point(x1, y1)
p2 = Point(x2, y2)
p3 = Point(x3, y3)
p4 = Point(x4, y4)
yield p1, p2, p3, p4
def main():
for A, B, C, D in datasets():
a1 = (B.y - A.y) * -1
b1 = B.x - A.x
a2 = (D.y - C.y) * -1
b2 = D.y - C.y
if a1*b2 - a2*b1 == 0:
print "YES"
else:
print "NO"
if __name__ == '__main__':
main() | 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>
|
s378461620 | p00021 | Wrong Answer | class Point(object):
x = 0.0
y = 0.0
def __init__(self, x, y):
self.x = x
self.y = y
def __sub__(left, right):
return Point(left.x - right.x, left.y - right.y)
#cross
def __mul__(left, right):
return left.x * right.y - left.y * right.x
for i in range(int(raw_input())):
(x1, y1, x2, y2, x3, y3, x4, y4) = [float(i) for i in raw_input().split()]
a = Point(x1, y1)
b = Point(x2, y2)
c = Point(x3, y3)
d = Point(x4, y4)
ab = a - b
cd = c - d
if(a * b == 0.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>
|
s862139037 | p00021 | Wrong Answer | for i in range(int(input())):
try:
x1,y1,x2,y2,x3,y3,x4,y4 = map(float,raw_input().split())
a1 = (y2-y1)/(x2-x1); a2 = (y4-y3)/(x4-x3)
b1 = y1-(a1*x1) ; b2 = y3-(a2*x3)
if a1 == a2:
if b1 == b2:
print "NO"
else:
print "YES"
else:
print "NO"
except ZeroDivisionError:
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>
|
s460519209 | p00021 | Wrong Answer | def ren(x1,y1,x2,y2):
a,b,g = None,None,None
try:
a = (y2-y1)/(x2-x1)
if a == 0: b = y1
else: b = y1-a*x1
except ZeroDivisionError: g = x1
return a,b,g
for i in range(int(input())):
x1,y1,x2,y2,x3,y3,x4,y4 = map(float,raw_input().split())
ans1 = list(ren(x1,y1,x2,y2))
ans2 = list(ren(x3,y3,x4,y4))
if ans1[2] != None and ans2[2] != None:
if ans1[2] == ans2[2]: print "NO"
else: print "YES"
else:
if ans1[2] != None or ans2[2] != None: print "NO" ; continue
elif ans1[0] == ans2[0]:
if ans1[1] == ans2[1]: 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>
|
s612359115 | p00021 | Wrong Answer | def cal(x1,y1,x2,y2):
t = y1 - y2
v = x1 - x2
if v == 0:
return 0
else:
return t/v
if __name__ == "__main__":
a = int(raw_input())
for i in range(a):
x1,y1,x2,y2,x3,y3,x4,y4 = map(float,raw_input().split(' '))
m1 = cal(x1,y1,x2,y2)
m2 = cal(x3,y3,x4,y4)
if m1 == m2:
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>
|
s679912304 | p00021 | Wrong Answer | import math
n = int(raw_input())
for i in range(n):
x1,y1,x2,y2,x3,y3,x4,y4 = map(float, raw_input().split())
if (abs((y1-y2)*(x3-x4)-(y3-y4)*(x1-x2))<1e-6): 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>
|
s984514040 | p00021 | Wrong Answer | import sys
def solve():
n = int(raw_input())
for i in range(n):
d = [float(c) for c in raw_input().split()]
print "YES" if (d[7] - d[5])*(d[2] - d[0]) == (d[6] - d[4]) * (d[3] - d[1]) else "NO"
if __name__ == "__main__":
solve()
| 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>
|
s422261707 | p00021 | Wrong Answer | import sys
def solve():
n = int(raw_input())
for i in range(n):
d = [float(c) for c in raw_input().split()]
print "YES" if (d[7] - d[5])*(d[2] - d[0]) == (d[6] - d[4]) * (d[3] - d[1]) else "NO"
if __name__ == "__main__":
solve()
| 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>
|
s044931689 | p00021 | Wrong Answer | n = int(raw_input())
for i in range(n):
d = [float(x) for x in raw_input().split()]
print "YES" if (d[2]-d[0])*(d[7]-d[5])==(d[3]-d[1])*(d[6]-d[4]) 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>
|
s518107265 | p00021 | Wrong Answer | import sys
def solve():
n = int(raw_input())
for i in range(n):
d = [float(c) for c in raw_input().split()]
print "YES" if (d[7] - d[5])*(d[2] - d[0]) == (d[6] - d[4]) * (d[3] - d[1]) else "NO"
if __name__ == "__main__":
solve()
| 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>
|
s887560538 | p00021 | Wrong Answer | n = input()+1
for v in range(1,n):
(x1,y1,x2,y2,x3,y3,x4,y4)=map(float,raw_input().split())
if x2-x1==0 or x4-x3==0:
if x2-x1==0 and x4-x3==0:
print "YES"
else:
print "NO"
elif y2-y1==0 or y4-y3==0:
if y2-y1==0 and y4-y3==0:
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>
|
s943222831 | p00021 | Wrong Answer | n = input()+1
for v in range(1,n):
(x1,y1,x2,y2,x3,y3,x4,y4)=map(float,raw_input().split())
if x2-x1==0 or x4-x3==0:
if x2-x1==0 and x4-x3==0:
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>
|
s450116909 | p00021 | Wrong Answer | n = input()+1
for v in range(1,n):
(x1,y1,x2,y2,x3,y3,x4,y4)=map(float,raw_input().split())
if x2-x1==0.0 or x4-x3==0.0:
if x2-x1==0.0 and x4-x3==0.0:
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>
|
s708834395 | p00021 | Wrong Answer | n = input()+1
for v in range(1,n):
(x1,y1,x2,y2,x3,y3,x4,y4)=map(float,raw_input().split())
if x2-x1==0 and x4-x3==0:
print "YES"
elif x2-x1!=0 and x4-x3==0:
print "NO"
elif x2-x1==0 and x4-x3!=0:
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>
|
s399337746 | p00021 | Wrong Answer | n = input()+1
for v in range(1,n):
x=map(float,raw_input().split())
if x[2]-x[0]==0 and x[6]-x[4]==0:
print "YES"
elif x[2]-x[0]!=0 and x[6]-x[4]==0:
print "NO"
elif x[2]-x[0]==0 and x[6]-x[4]!=0:
print "NO"
else:
if (x[3]-x[1])/(x[2]-x[0]) == (x[7]-x[5])/(x[6]-x[4]):
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>
|
s352804790 | p00021 | Wrong Answer | n = input()+1
for val in range(1,n):
x=map(float,raw_input().split(" "))
if x[2]-x[0]==0 and x[6]-x[4]==0:
print "YES"
elif x[2]-x[0]!=0 and x[6]-x[4]==0:
print "NO"
elif x[2]-x[0]==0 and x[6]-x[4]!=0:
print "NO"
else:
if (x[3]-x[1])/(x[2]-x[0]) == (x[7]-x[5])/(x[6]-x[4]):
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>
|
s727991386 | p00021 | Wrong Answer | n = input() + 1
for v in range(1,n):
x = map(float,raw_input().split(' '))
if x[0]-x[2] == 0 and x[4]-x[6] == 0:
print 'YES'
elif x[0]-x[2] != 0 and x[4]-x[6] == 0:
print 'NO'
elif x[0]-x[2] == 0 and x[4]-x[6] != 0:
print 'NO'
else:
if (x[1]-x[3])/(x[0]-x[2]) == (x[5]-x[7])/(x[4]-x[6]):
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>
|
s742690917 | p00021 | Wrong Answer | n = input()+1
for val in range(1,n):
x=map(float,raw_input().split(" "))
if x[2]-x[0]==0 and x[6]-x[4]==0:
print "YES"
elif x[2]-x[0]!=0 and x[6]-x[4]==0:
print "NO"
elif x[2]-x[0]==0 and x[6]-x[4]!=0:
print "NO"
elif x[2]-x[0]!=0 and x[6]-x[4]!=0:
if (x[3]-x[1])/(x[2]-x[0]) == (x[7]-x[5])/(x[6]-x[4]):
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>
|
s557008496 | p00021 | Wrong Answer | n = input()+1
for val in range(1,n):
x=map(float,raw_input().split(" "))
if (x[3]-x[1])*(x[6]-x[4])==(x[2]-x[0])*(x[7]-x[5]):
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>
|
s486278541 | p00021 | Wrong Answer | n = input()
for val in range(n):
x=map(float,raw_input().split(" "))
if (x[3]-x[1])*(x[6]-x[4])==(x[2]-x[0])*(x[7]-x[5]):
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>
|
s851036146 | p00021 | Wrong Answer | n = input()
for i in range(n):
x=[float(a) for a in raw_input().split()]
if (x[3]-x[1])*(x[6]-x[4])==(x[2]-x[0])*(x[7]-x[5]):
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>
|
s302080764 | p00021 | Wrong Answer | n = int(raw_input())
for i in range(n):
x=[float(a) for a in raw_input().split()]
if (x[3]-x[1])*(x[6]-x[4])==(x[2]-x[0])*(x[7]-x[5]):
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>
|
s428980435 | p00021 | Wrong Answer | n = input() + 1
for v in range(1,n):
x = map(float,raw_input().split(' '))
if x[1]-x[3] == 0 and x[5]-x[7] == 0:
print 'YES'
elif x[1]-x[3] != 0 and x[5]-x[7] == 0:
print 'NO'
elif x[1]-x[3] == 0 and x[5]-x[7] != 0:
print 'NO'
else:
if (x[0]-x[2])/(x[1]-x[3]) == (x[4]-x[6])/(x[5]-x[7]):
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>
|
s899849951 | p00021 | Wrong Answer | for _ in range(int(raw_input())):
x1,y1,x2,y2,x3,y3,x4,y4 = map(float, raw_input().split())
if (x2 - x1) * (y4 - y3) - (y2 - y1) * (x4 - x3) == 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>
|
s689208784 | p00021 | Wrong Answer | for _ in range(int(raw_input())):
x1,y1,x2,y2,x3,y3,x4,y4 = map(float, raw_input().split())
if (x2 - x1) * (y4 - y3) == (y2 - y1) * (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>
|
s105862828 | p00021 | Wrong Answer | for _ in range(int(raw_input())):
d = map(float, raw_input().split())
print "YES" if (d[2]-d[0])*(d[7]-d[5])==(d[3]-d[1])*(d[6]-d[4]) 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>
|
s962060891 | 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 (x2 - x1) * (y4 - y3) == (y2 - y1) * (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>
|
s655140625 | 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())
a = (x2 - x1)
b = (x4 - x3)
if a == 0 or b == 0:
print 'NO'
else:
if (y2 - y1) / a == (y4 - y3) / b:
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>
|
s037943548 | 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())
x1 = (x1 - x2)
y1 = (y1 - y2)
x3 = (x3 - x4)
y3 = (y3 - y4)
if 0 in (x1, x3):
if (x1, x3) == (0, 0):
print 'YES'
else:
print 'NO'
else:
if (y1 / x1) == (y3 / 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>
|
s362601533 | p00021 | Wrong Answer | #!/usr/bin/python
# -*- coding:utf-8 -*-
def main():
numData = int(raw_input())
count = 0
while count < numData:
line = raw_input()
coords = map(float, line.strip().split())
result = isParallel(coords[0], coords[1], coords[2], coords[3], coords[4], coords[5], coords[6], coords[7])
if result :
print "YES"
else:
print "NO"
count += 1
def isParallel(x1, y1, x2, y2, x3, y3, x4, y4):
# 小数点以下最大5桁までの精度で計算すればよい
x1 = int(x1 * 100000)
y1 = int(y1 * 100000)
x2 = int(x2 * 100000)
y2 = int(y2 * 100000)
x3 = int(x3 * 100000)
y3 = int(y3 * 100000)
x4 = int(x4 * 100000)
y4 = int(y4 * 100000)
# 直線ABの傾きが無限大かどうか
if (y2 == y1):
# 傾き無限大ならば、CDもそうなら平行
return y4 == y3
else:
# 有限の傾きならば傾きが等しければOK
return (x2 - x1)/(y2 - y1) == (x4 - x3)/(y4 - y3)
main() | 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>
|
s285710417 | p00021 | Wrong Answer | #!/usr/bin/python
def main():
numData = int(raw_input())
count = 0
while count < numData:
line = raw_input()
coords = map(float, line.strip().split())
result = isParallel(coords[0], coords[1], coords[2], coords[3], coords[4], coords[5], coords[6], coords[7])
if result :
print "YES"
else:
print "NO"
count += 1
def isParallel(x1, y1, x2, y2, x3, y3, x4, y4):
x1 = int(x1 * 100000)
y1 = int(y1 * 100000)
x2 = int(x2 * 100000)
y2 = int(y2 * 100000)
x3 = int(x3 * 100000)
y3 = int(y3 * 100000)
x4 = int(x4 * 100000)
y4 = int(y4 * 100000)
if (x2 == x1):
return x4 == x3
else:
if (x4 == x3):
return False
return (y2 - y1)/(x2 - x1) == (y4 - y3)/(x4 - x3)
main() | 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>
|
s223890618 | p00021 | Wrong Answer | #!/usr/bin/python
def main():
numData = int(raw_input())
count = 0
while count < numData:
line = raw_input()
coords = map(float, line.strip().split())
result = isParallel(coords[0], coords[1], coords[2], coords[3], coords[4], coords[5], coords[6], coords[7])
if result :
print "YES"
else:
print "NO"
count += 1
def isParallel(x1, y1, x2, y2, x3, y3, x4, y4):
x1 = int(x1 * 100000)
y1 = int(y1 * 100000)
x2 = int(x2 * 100000)
y2 = int(y2 * 100000)
x3 = int(x3 * 100000)
y3 = int(y3 * 100000)
x4 = int(x4 * 100000)
y4 = int(y4 * 100000)
if (x2 == x1):
return x4 == x3
else:
if (x4 == x3):
return False
return (y2 - y1)*(x4 - x3) == (y4 - y3)*(x2 - x1)
main() | 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>
|
s083358927 | p00021 | Wrong Answer | #!/usr/bin/python
def main():
numData = int(raw_input())
count = 0
while count < numData:
line = raw_input()
coords = map(float, line.strip().split())
result = isParallel(coords[0], coords[1], coords[2], coords[3], coords[4], coords[5], coords[6], coords[7])
if result:
print "YES"
else:
print "NO"
count += 1
def isParallel(x1, y1, x2, y2, x3, y3, x4, y4):
x1 = int(x1 * 100000)
y1 = int(y1 * 100000)
x2 = int(x2 * 100000)
y2 = int(y2 * 100000)
x3 = int(x3 * 100000)
y3 = int(y3 * 100000)
x4 = int(x4 * 100000)
y4 = int(y4 * 100000)
v1 = (x2 - x1, y2 - y1)
v2 = (x4 - x3, y4 - y3)
return v1[0] * v2[1] - v1[1] * v2[0] == 0
main() | 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>
|
s562277240 | p00021 | Wrong Answer | #!/usr/bin/python
def main():
numData = int(raw_input())
count = 0
while count < numData:
line = raw_input()
coords = map(float, line.strip().split())
result = isParallel(coords[0], coords[1], coords[2], coords[3], coords[4], coords[5], coords[6], coords[7])
if result:
print "YES"
else:
print "NO"
count += 1
def isParallel(x1, y1, x2, y2, x3, y3, x4, y4):
x1 = int(x1 * 100000)
y1 = int(y1 * 100000)
x2 = int(x2 * 100000)
y2 = int(y2 * 100000)
x3 = int(x3 * 100000)
y3 = int(y3 * 100000)
x4 = int(x4 * 100000)
y4 = int(y4 * 100000)
v1 = (x2 - x1, y2 - y1)
v2 = (x4 - x3, y4 - y3)
return v1[0] * v2[1] - v1[1] * v2[0] <= 0.0001
main() | 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>
|
s828316336 | p00021 | Wrong Answer | #!/usr/bin/python
def main():
numData = int(raw_input())
for i in range(numData):
line = raw_input()
coords = map(float, line.strip().split())
result = isParallel(coords[0], coords[1], coords[2], coords[3], coords[4], coords[5], coords[6], coords[7])
if result:
print "YES"
else:
print "NO"
def isParallel(x1, y1, x2, y2, x3, y3, x4, y4):
x1 = int(x1 * 100000)
y1 = int(y1 * 100000)
x2 = int(x2 * 100000)
y2 = int(y2 * 100000)
x3 = int(x3 * 100000)
y3 = int(y3 * 100000)
x4 = int(x4 * 100000)
y4 = int(y4 * 100000)
v1 = (x2 - x1, y2 - y1)
v2 = (x4 - x3, y4 - y3)
return v1[0] * v2[1] - v1[1] * v2[0] <= 0.0001
main() | 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>
|
s490640414 | p00021 | Wrong Answer | num =input()
for i in range(num):
x = map(float, raw_input().split(' '))
if x[1]-x[3] == 0 or x[5]-x[7] == 0:
if x[1]-x[3] == 0 and x[5]-x[7] == 0:
print 'YES'
else:
print 'NO'
elif (x[0]-x[2])/(x[1]-x[3]) == (x[4]-x[6])/(x[5]-x[7]):
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>
|
s656539566 | p00021 | Wrong Answer |
import sys
def norm2d(vec):
return (vec[0]**2 + vec[1]**2)**0.5
def normalize(vec):
l = norm2d(vec)
vec[0] /= l
vec[1] /= l
return vec
lineNumber = 0
#for line in ["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"]:
for line in sys.stdin.readlines():
lineNumber += 1
if lineNumber == 1: continue
# get data
List = map(float, line.strip().split(" "))
# set data
a = [List[0], List[1]]
b = [List[2], List[3]]
c = [List[4], List[5]]
d = [List[6], List[7]]
vec1 = [a[0]-b[0], a[1]-b[1]]
vec2 = [c[0]-d[0], c[1]-d[1]]
vec1 = normalize(vec1)
vec2 = normalize(vec2)
if abs( vec1[0] - vec2[0] ) < 10**(-6) \
and abs( vec1[1] - vec2[1] ) < 10**(-6):
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>
|
s865256665 | p00021 | Wrong Answer |
import sys
def norm2d(vec):
return (vec[0]**2 + vec[1]**2)**0.5
def normalize(vec):
l = norm2d(vec)
vec[0] /= l
vec[1] /= l
return vec
lineNumber = 0
#for line in ["2", "0.0 0.0 -9.0 -9.0 1.0 0.0 2.0 1.0", "3.0 2.0 15.0 10.0 13.0 5.0 7.0 9.0"]:
for line in sys.stdin.readlines():
lineNumber += 1
if lineNumber == 1: continue
# get data
List = map(float, line.strip().split(" "))
# set data
a = [List[0], List[1]]
b = [List[2], List[3]]
c = [List[4], List[5]]
d = [List[6], List[7]]
vec1 = [a[0]-b[0], a[1]-b[1]]
vec2 = [c[0]-d[0], c[1]-d[1]]
if vec1[0] < 0: vec1[0] *= -1; vec1[1] *= -1
if vec2[0] < 0: vec2[0] *= -1; vec2[1] *= -1
vec1 = normalize(vec1)
vec2 = normalize(vec2)
if abs( vec1[0] - vec2[0] ) < 10**(-6) \
and abs( vec1[1] - vec2[1] ) < 10**(-6):
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>
|
s671455370 | p00021 | Wrong Answer |
import sys
def norm2d(vec):
return (vec[0]**2 + vec[1]**2)**0.5
def normalize(vec):
l = norm2d(vec)
vec[0] /= l
vec[1] /= l
return vec
lineNumber = 0
#for line in ["2", "0.0 0.0 -9.0 -9.0 1.0 0.0 2.0 1.0", "3.0 2.0 15.0 10.0 13.0 5.0 7.0 9.0"]:
for line in sys.stdin.readlines():
lineNumber += 1
if lineNumber == 1: continue
# get data
List = map(float, line.strip().split(" "))
# set data
a = [List[0], List[1]]
b = [List[2], List[3]]
c = [List[4], List[5]]
d = [List[6], List[7]]
vec1 = [a[0]-b[0], a[1]-b[1]]
vec2 = [c[0]-d[0], c[1]-d[1]]
print vec1; print vec2
if vec1[0] < 0:
vec1[0] *= -1
vec1[1] *= -1
if vec2[0] < 0:
vec2[0] *= -1
vec2[1] *= -1
vec1 = normalize(vec1)
vec2 = normalize(vec2)
if abs( vec1[0] - vec2[0] ) < 10**(-6) \
and abs( vec1[1] - vec2[1] ) < 10**(-6):
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>
|
s308077276 | 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())
a = (y2-y1)*(x4-x3)
c = (y4-y3)*(x2-x1)
if a == 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>
|
s499117011 | 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())
a = (y2-y1)*(x4-x3)
c = (y4-y3)*(x2-x1)
if a == 0 and c == 0:
if y1 == y3:
print "YES"
elif a == 0 and c == 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>
|
s798636477 | 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 x2-x1==0 and x4-x3==0:
print "YES"
elif y2-y1==0 and y4-y3==0:
print "YES"
elif (y2-y1)*(x4-x3) == (y4-y3)*(x2-x1):
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>
|
s861521277 | 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 x2-x1==0.0 and x4-x3==0.0:
print "YES"
elif y2-y1==0.0 and y4-y3==0.0:
print "YES"
elif (y2-y1)*(x4-x3) == (y4-y3)*(x2-x1):
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>
|
s388507494 | 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 x2-x1==0.0 and x4-x3==0.0:
print "YES"
elif y2-y1==0.0 and y4-y3==0.0:
print "YES"
elif (y2-y1)*(x4-x3) - (y4-y3)*(x2-x1)<0.000001:
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>
|
s392765497 | p00021 | Wrong Answer | import math
n = int(raw_input())
for i in range(n):
x1,y1,x2,y2,x3,y3,x4,y4 = map(float, raw_input().split())
if x2-x1==0.0 and x4-x3==0.0:
print "YES"
elif y2-y1==0.0 and y4-y3==0.0:
print "YES"
elif math.fabs((y2-y1)*(x4-x3) - (y4-y3)*(x2-x1))<0.000001:
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>
|
s023939057 | p00021 | Wrong Answer | import math
n = int(raw_input())
for i in range(n):
x1,y1,x2,y2,x3,y3,x4,y4 = map(float, raw_input().split())
if x2-x1==0.0 and x4-x3==0.0:
print "YES"
elif y2-y1==0.0 and y4-y3==0.0:
print "YES"
elif y4-y3==0.0 or x2-x1==0.0:
print "NO"
elif (y2-y1)*(x4-x3)/(y4-y3)/(x2-x1)==1.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>
|
s360751432 | 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 abs((y4-y3)*(x2-x1)-(y2-y1)*(x4-x3)) < 1.e-13:
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>
|
s302863907 | p00021 | Wrong Answer | import math
N=range(int(raw_input()))
for i in N:
a,w,b,x,c,y,d,z=map(float, raw_input().split())
print ["NO","YES"][abs((w-x)*(c-d)-(y-z)*(a-b))<1e-8] | 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>
|
s131607554 | p00021 | Wrong Answer | import math
N=range(int(raw_input()))
for i in N:
a,w,b,x,c,y,d,z=map(float, raw_input().split())
print ["NO","YES"][(w-x)*(c-d)==(y-z)*(a-b)] | 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>
|
s049755767 | p00021 | Wrong Answer | import math
N=range(int(raw_input()))
for i in N:
a,w,b,x,c,y,d,z=map(float, raw_input().split())
print ["NO","YES"][abs((w-x)*(c-d)-(y-z)*(a-b))<1e-9] | 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>
|
s433306813 | p00021 | Wrong Answer | import math
for i in range(int(raw_input())):
a,w,b,x,c,y,d,z=map(float, raw_input().split())
print ["NO","YES"][abs((w-x)*(c-d)-(y-z)*(a-b))<1e-8] | 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>
|
s500214813 | p00021 | Wrong Answer | for i in range(input()):
ax,ay,bx,by,cx,cy,dx,dy = map(float, raw_input().split())
ab = (ay - by) * (ax - bx)
cd = (cy - dy) * (cx - dx)
if int(ab - 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>
|
s226016570 | p00021 | Wrong Answer | for i in range(input()):
ax,ay,bx,by,cx,cy,dx,dy = map(float, raw_input().split())
if (ay-by)*(cx-dx) == (cy-dy)*(ax-bx):
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>
|
s161674499 | p00021 | Wrong Answer | for i in range(input()):
ax,ay,bx,by,cx,cy,dx,dy = map(float, raw_input().split())
if (ay-by)*(cx-dx)-(cy-dy)*(ax-bx) == 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>
|
s556112541 | p00021 | Wrong Answer | n = int(raw_input())
for i in range(n):
p = map( float, raw_input().split() )
flag = ( p[ 1 ] - p[ 0 ] ) * ( p[ 7 ] - p[ 6 ] ) == ( p[ 3 ] - p[ 2 ] ) * ( p[ 5 ] - p[ 4 ] )
print ( flag and 'YES' ) or '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>
|
s462013448 | p00021 | Wrong Answer | cnt = int(raw_input())
for i in range(cnt):
x1,y1,x2,y2,x3,y3,x4,y4 = map(float, raw_input().split())
flg = False
if x1 == x2 or x3 == x4:
flg = (x2 - x1 == x4 - x3)
else:
flg = ((y2 - y1)/(x2 - x1) == (y4 - y3)/(x4 - x3))
print flg | 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>
|
s561420769 | p00021 | Wrong Answer | cnt = int(raw_input())
for i in range(cnt):
x1,y1,x2,y2,x3,y3,x4,y4 = map(float, raw_input().split())
flg = False
if x1 == x2 or x3 == x4:
flg = (x2 - x1 == x4 - x3)
else:
flg = ((y2 - y1)/(x2 - x1) == (y4 - y3)/(x4 - x3))
if flg: 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>
|
s190428073 | p00021 | Wrong Answer | for i in range(input()):
x1, y1, x2, y2, x3, y3, x4, y4 = map(float, raw_input().split())
if (x1 == x2 and x3 == x4) or (y1 == y2 and y3 == y4):
print "YES"
continue
elif (y1-y2)*(x3-x4) == (y3-y4)*(x1-x2):
print "YES"
continue
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.