message stringlengths 2 44.5k | message_type stringclasses 2
values | message_id int64 0 1 | conversation_id int64 276 109k | cluster float64 23 23 | __index_level_0__ int64 552 217k |
|---|---|---|---|---|---|
Provide tags and a correct Python 3 solution for this coding contest problem.
There is a right triangle with legs of length a and b. Your task is to determine whether it is possible to locate the triangle on the plane in such a way that none of its sides is parallel to the coordinate axes. All the vertices must have i... | instruction | 0 | 12,813 | 23 | 25,626 |
Tags: brute force, geometry, implementation, math
Correct Solution:
```
import math
squares = set()
for i in range(1, 1001):
squares.add(i ** 2)
def check(n):
global squares
for i in range(1, 1001):
if (n - i ** 2) in squares:
return True
return False
a, b = map(int, input().split()... | output | 1 | 12,813 | 23 | 25,627 |
Provide tags and a correct Python 3 solution for this coding contest problem.
There is a right triangle with legs of length a and b. Your task is to determine whether it is possible to locate the triangle on the plane in such a way that none of its sides is parallel to the coordinate axes. All the vertices must have i... | instruction | 0 | 12,814 | 23 | 25,628 |
Tags: brute force, geometry, implementation, math
Correct Solution:
```
x,y = map(int,input().split())
if x>=y:
a=x
b=y
else:
a=y
b=x
lmb = a/b
f=1
for i in range(1,b):
p = lmb*pow((b**2-i**2),1/2)
q = lmb*i
if p-int(p)<=0.00001 and q-int(q)<=0.00001:
print("YES")
print("0 0")
pri... | output | 1 | 12,814 | 23 | 25,629 |
Provide tags and a correct Python 3 solution for this coding contest problem.
There is a right triangle with legs of length a and b. Your task is to determine whether it is possible to locate the triangle on the plane in such a way that none of its sides is parallel to the coordinate axes. All the vertices must have i... | instruction | 0 | 12,815 | 23 | 25,630 |
Tags: brute force, geometry, implementation, math
Correct Solution:
```
import os
import sys
from io import BytesIO, IOBase
def main():
pass
# region fastio
BUFSIZE = 8192
class FastIO(IOBase):
newlines = 0
def __init__(self, file):
self._fd = file.fileno()
self.buffer = BytesIO()
... | output | 1 | 12,815 | 23 | 25,631 |
Provide tags and a correct Python 3 solution for this coding contest problem.
There is a right triangle with legs of length a and b. Your task is to determine whether it is possible to locate the triangle on the plane in such a way that none of its sides is parallel to the coordinate axes. All the vertices must have i... | instruction | 0 | 12,816 | 23 | 25,632 |
Tags: brute force, geometry, implementation, math
Correct Solution:
```
from math import *
a,b=map(int,input().split())
def gen(n):
for x in range(1,n):
y = round(sqrt(n*n-x*x))
if x*x+y*y == n*n:
yield (x,y)
for u in gen(a):
for v in gen(b):
if u[0]*v[0]-u[1]*v[1]==0 and u[0]!=v[0]:
print("YES\n0 0")
... | output | 1 | 12,816 | 23 | 25,633 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
There is a right triangle with legs of length a and b. Your task is to determine whether it is possible to locate the triangle on the plane in such a way that none of its sides is parallel to th... | instruction | 0 | 12,817 | 23 | 25,634 |
Yes | output | 1 | 12,817 | 23 | 25,635 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
There is a right triangle with legs of length a and b. Your task is to determine whether it is possible to locate the triangle on the plane in such a way that none of its sides is parallel to th... | instruction | 0 | 12,818 | 23 | 25,636 |
Yes | output | 1 | 12,818 | 23 | 25,637 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
There is a right triangle with legs of length a and b. Your task is to determine whether it is possible to locate the triangle on the plane in such a way that none of its sides is parallel to th... | instruction | 0 | 12,819 | 23 | 25,638 |
Yes | output | 1 | 12,819 | 23 | 25,639 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
There is a right triangle with legs of length a and b. Your task is to determine whether it is possible to locate the triangle on the plane in such a way that none of its sides is parallel to th... | instruction | 0 | 12,820 | 23 | 25,640 |
Yes | output | 1 | 12,820 | 23 | 25,641 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
There is a right triangle with legs of length a and b. Your task is to determine whether it is possible to locate the triangle on the plane in such a way that none of its sides is parallel to th... | instruction | 0 | 12,821 | 23 | 25,642 |
No | output | 1 | 12,821 | 23 | 25,643 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
There is a right triangle with legs of length a and b. Your task is to determine whether it is possible to locate the triangle on the plane in such a way that none of its sides is parallel to th... | instruction | 0 | 12,822 | 23 | 25,644 |
No | output | 1 | 12,822 | 23 | 25,645 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
There is a right triangle with legs of length a and b. Your task is to determine whether it is possible to locate the triangle on the plane in such a way that none of its sides is parallel to th... | instruction | 0 | 12,823 | 23 | 25,646 |
No | output | 1 | 12,823 | 23 | 25,647 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
There is a right triangle with legs of length a and b. Your task is to determine whether it is possible to locate the triangle on the plane in such a way that none of its sides is parallel to th... | instruction | 0 | 12,824 | 23 | 25,648 |
No | output | 1 | 12,824 | 23 | 25,649 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Anton's favourite geometric figures are regular polyhedrons. Note that there are five kinds of regular polyhedrons:
* Tetrahedron. Tetrahedron has 4 triangular faces.
* Cube. Cube has 6 square faces.
* Octahedron. Octahedron has 8 ... | instruction | 0 | 12,982 | 23 | 25,964 |
Tags: implementation, strings
Correct Solution:
```
t=0
for i in range(int(input())):
x=input()
if x=='Tetrahedron':
t+=4
if x=='Cube':
t+=6
if x=='Octahedron':
t+=8
if x=='Dodecahedron':
t+=12
if x=='Icosahedron':
t+=20
print(t)
``` | output | 1 | 12,982 | 23 | 25,965 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Anton's favourite geometric figures are regular polyhedrons. Note that there are five kinds of regular polyhedrons:
* Tetrahedron. Tetrahedron has 4 triangular faces.
* Cube. Cube has 6 square faces.
* Octahedron. Octahedron has 8 ... | instruction | 0 | 12,983 | 23 | 25,966 |
Tags: implementation, strings
Correct Solution:
```
Anzahl = int(input())
Sammlung = []
for i in range(Anzahl):
Sammlung.append(input())
Seitenzahl = {"Tetrahedron":4,"Cube":6,"Octahedron":8,"Dodecahedron":12,"Icosahedron":20}
Sammlung = [Seitenzahl[i] for i in Sammlung]
print(sum(Sammlung))
``` | output | 1 | 12,983 | 23 | 25,967 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Anton's favourite geometric figures are regular polyhedrons. Note that there are five kinds of regular polyhedrons:
* Tetrahedron. Tetrahedron has 4 triangular faces.
* Cube. Cube has 6 square faces.
* Octahedron. Octahedron has 8 ... | instruction | 0 | 12,984 | 23 | 25,968 |
Tags: implementation, strings
Correct Solution:
```
import math as mt
import sys,string,bisect
input=sys.stdin.readline
import random
from collections import deque,defaultdict
L=lambda : list(map(int,input().split()))
Ls=lambda : list(input().split())
M=lambda : map(int,input().split())
I=lambda :int(input())
d={}
d["... | output | 1 | 12,984 | 23 | 25,969 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Anton's favourite geometric figures are regular polyhedrons. Note that there are five kinds of regular polyhedrons:
* Tetrahedron. Tetrahedron has 4 triangular faces.
* Cube. Cube has 6 square faces.
* Octahedron. Octahedron has 8 ... | instruction | 0 | 12,985 | 23 | 25,970 |
Tags: implementation, strings
Correct Solution:
```
n = int(input())
x = 0
for i in range(n):
a = input()
if a == "Tetrahedron":
x+=4
elif a == "Cube":
x+=6
elif a == "Octahedron":
x+=8
elif a == "Dodecahedron":
x+=12
elif a == "Icosahedron":
x+=20
print(x)
``` | output | 1 | 12,985 | 23 | 25,971 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Anton's favourite geometric figures are regular polyhedrons. Note that there are five kinds of regular polyhedrons:
* Tetrahedron. Tetrahedron has 4 triangular faces.
* Cube. Cube has 6 square faces.
* Octahedron. Octahedron has 8 ... | instruction | 0 | 12,986 | 23 | 25,972 |
Tags: implementation, strings
Correct Solution:
```
shapes = {
"Tetrahedron": 4,
"Cube": 6,
"Octahedron": 8,
"Dodecahedron": 12,
"Icosahedron": 20,
}
num = int(input())
result = sum(shapes[input()] for _ in range(num))
print(result)
``` | output | 1 | 12,986 | 23 | 25,973 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Anton's favourite geometric figures are regular polyhedrons. Note that there are five kinds of regular polyhedrons:
* Tetrahedron. Tetrahedron has 4 triangular faces.
* Cube. Cube has 6 square faces.
* Octahedron. Octahedron has 8 ... | instruction | 0 | 12,987 | 23 | 25,974 |
Tags: implementation, strings
Correct Solution:
```
n=int(input())
dic={'Cube':6,'Tetrahedron':4,'Octahedron':8,'Dodecahedron':12,'Icosahedron':20}
t=0
for i in range(n):
t+=dic[input()]
print(t)
``` | output | 1 | 12,987 | 23 | 25,975 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Anton's favourite geometric figures are regular polyhedrons. Note that there are five kinds of regular polyhedrons:
* Tetrahedron. Tetrahedron has 4 triangular faces.
* Cube. Cube has 6 square faces.
* Octahedron. Octahedron has 8 ... | instruction | 0 | 12,988 | 23 | 25,976 |
Tags: implementation, strings
Correct Solution:
```
n = int(input())
p=[]
for i in range(0, n):
m= list(input())
k=""
l=k.join(m)
p.append(l)
j=[]
for i in range(0, n):
if p[i]=='Tetrahedron':
r=4
j.append(r)
elif p[i]=='Cube':
r=6
j.append(r)
elif p[i]=='Oc... | output | 1 | 12,988 | 23 | 25,977 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Anton's favourite geometric figures are regular polyhedrons. Note that there are five kinds of regular polyhedrons:
* Tetrahedron. Tetrahedron has 4 triangular faces.
* Cube. Cube has 6 square faces.
* Octahedron. Octahedron has 8 ... | instruction | 0 | 12,989 | 23 | 25,978 |
Tags: implementation, strings
Correct Solution:
```
n = int(input())
List = []
a = 0
for i in range(0, n):
List = input()
if List[0] == "T":
a += 4
if List[0] == "C":
a += 6
if List[0] == "O":
a += 8
if List[0] == "D":
a += 12
if List[0] == "I":
a += 20
pr... | output | 1 | 12,989 | 23 | 25,979 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Anton's favourite geometric figures are regular polyhedrons. Note that there are five kinds of regular polyhedrons:
* Tetrahedron. Tetrahedron has 4 triangular faces.
* Cube. Cube has 6 s... | instruction | 0 | 12,990 | 23 | 25,980 |
Yes | output | 1 | 12,990 | 23 | 25,981 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Anton's favourite geometric figures are regular polyhedrons. Note that there are five kinds of regular polyhedrons:
* Tetrahedron. Tetrahedron has 4 triangular faces.
* Cube. Cube has 6 s... | instruction | 0 | 12,991 | 23 | 25,982 |
Yes | output | 1 | 12,991 | 23 | 25,983 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Anton's favourite geometric figures are regular polyhedrons. Note that there are five kinds of regular polyhedrons:
* Tetrahedron. Tetrahedron has 4 triangular faces.
* Cube. Cube has 6 s... | instruction | 0 | 12,992 | 23 | 25,984 |
Yes | output | 1 | 12,992 | 23 | 25,985 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Anton's favourite geometric figures are regular polyhedrons. Note that there are five kinds of regular polyhedrons:
* Tetrahedron. Tetrahedron has 4 triangular faces.
* Cube. Cube has 6 s... | instruction | 0 | 12,993 | 23 | 25,986 |
Yes | output | 1 | 12,993 | 23 | 25,987 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Anton's favourite geometric figures are regular polyhedrons. Note that there are five kinds of regular polyhedrons:
* Tetrahedron. Tetrahedron has 4 triangular faces.
* Cube. Cube has 6 s... | instruction | 0 | 12,994 | 23 | 25,988 |
No | output | 1 | 12,994 | 23 | 25,989 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Anton's favourite geometric figures are regular polyhedrons. Note that there are five kinds of regular polyhedrons:
* Tetrahedron. Tetrahedron has 4 triangular faces.
* Cube. Cube has 6 s... | instruction | 0 | 12,995 | 23 | 25,990 |
No | output | 1 | 12,995 | 23 | 25,991 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Anton's favourite geometric figures are regular polyhedrons. Note that there are five kinds of regular polyhedrons:
* Tetrahedron. Tetrahedron has 4 triangular faces.
* Cube. Cube has 6 s... | instruction | 0 | 12,996 | 23 | 25,992 |
No | output | 1 | 12,996 | 23 | 25,993 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Anton's favourite geometric figures are regular polyhedrons. Note that there are five kinds of regular polyhedrons:
* Tetrahedron. Tetrahedron has 4 triangular faces.
* Cube. Cube has 6 s... | instruction | 0 | 12,997 | 23 | 25,994 |
No | output | 1 | 12,997 | 23 | 25,995 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Bill is a famous mathematician in BubbleLand. Thanks to his revolutionary math discoveries he was able to make enough money to build a beautiful house. Unfortunately, for not paying property tax... | instruction | 0 | 13,031 | 23 | 26,062 |
No | output | 1 | 13,031 | 23 | 26,063 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Bill is a famous mathematician in BubbleLand. Thanks to his revolutionary math discoveries he was able to make enough money to build a beautiful house. Unfortunately, for not paying property tax... | instruction | 0 | 13,032 | 23 | 26,064 |
No | output | 1 | 13,032 | 23 | 26,065 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Bill is a famous mathematician in BubbleLand. Thanks to his revolutionary math discoveries he was able to make enough money to build a beautiful house. Unfortunately, for not paying property tax... | instruction | 0 | 13,033 | 23 | 26,066 |
No | output | 1 | 13,033 | 23 | 26,067 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Bill is a famous mathematician in BubbleLand. Thanks to his revolutionary math discoveries he was able to make enough money to build a beautiful house. Unfortunately, for not paying property tax... | instruction | 0 | 13,034 | 23 | 26,068 |
No | output | 1 | 13,034 | 23 | 26,069 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
There are N(N+1)/2 dots arranged to form an equilateral triangle whose sides consist of N dots, as shown below. The j-th dot from the left in the i-th row from the top is denoted by (i, j) (1 \l... | instruction | 0 | 13,186 | 23 | 26,372 |
No | output | 1 | 13,186 | 23 | 26,373 |
Provide a correct Python 3 solution for this coding contest problem.
For given $n$ segments which are parallel to X-axis or Y-axis, find the number of intersections of them.
Constraints
* $1 \leq n \leq 100,000$
* $ -1,000,000,000 \leq x_1, y_1, x_2, y_2 \leq 1,000,000,000$
* Two parallel segments never overlap or t... | instruction | 0 | 13,275 | 23 | 26,550 |
"Correct Solution:
```
# Acceptance of input
import sys
file_input = sys.stdin
n = file_input.readline()
EP = []
for line in file_input:
x1, y1, x2, y2 = (map(int, line.split()))
# point[2] corresponds to the position of the end point.
# 1 is left, 2 is lower, 3 is upper and 4 is right.
if y1 < y2:
... | output | 1 | 13,275 | 23 | 26,551 |
Provide a correct Python 3 solution for this coding contest problem.
For given $n$ segments which are parallel to X-axis or Y-axis, find the number of intersections of them.
Constraints
* $1 \leq n \leq 100,000$
* $ -1,000,000,000 \leq x_1, y_1, x_2, y_2 \leq 1,000,000,000$
* Two parallel segments never overlap or t... | instruction | 0 | 13,276 | 23 | 26,552 |
"Correct Solution:
```
# Acceptance of input
import sys
file_input = sys.stdin
n = file_input.readline()
EP = []
l = -1000000001
u = 1000000001
vs_x = set()
for line in file_input:
x1, y1, x2, y2 = (map(int, line.split()))
if x1 == x2:
if y1 < y2:
EP.append((y1, l, x1))
EP.ap... | output | 1 | 13,276 | 23 | 26,553 |
Provide a correct Python 3 solution for this coding contest problem.
For given $n$ segments which are parallel to X-axis or Y-axis, find the number of intersections of them.
Constraints
* $1 \leq n \leq 100,000$
* $ -1,000,000,000 \leq x_1, y_1, x_2, y_2 \leq 1,000,000,000$
* Two parallel segments never overlap or t... | instruction | 0 | 13,277 | 23 | 26,554 |
"Correct Solution:
```
import sys
import bisect
readline = sys.stdin.readline
n = int(readline())
EP = []
l = -1000000001
u = 1000000001
vs_x = set()
h_num = 0
for _ in [0] * n:
x1, y1, x2, y2 = (map(int, readline().split()))
if x1 == x2:
if y1 < y2:
EP.append((y1, l, x1))
EP.app... | output | 1 | 13,277 | 23 | 26,555 |
Provide a correct Python 3 solution for this coding contest problem.
For given $n$ segments which are parallel to X-axis or Y-axis, find the number of intersections of them.
Constraints
* $1 \leq n \leq 100,000$
* $ -1,000,000,000 \leq x_1, y_1, x_2, y_2 \leq 1,000,000,000$
* Two parallel segments never overlap or t... | instruction | 0 | 13,278 | 23 | 26,556 |
"Correct Solution:
```
from sys import stdin
from operator import itemgetter
readline = stdin.readline
#readline = open('???.txt').readline
VERTICAL_LOW, HORIZONTAL, VERTICAL_HIGH = 0, 1, 2
import math
class segment_tree:
# self.table is 1-indexed
# math.log2 not implemented 3.2.3
def __init__(self... | output | 1 | 13,278 | 23 | 26,557 |
Provide a correct Python 3 solution for this coding contest problem.
For given $n$ segments which are parallel to X-axis or Y-axis, find the number of intersections of them.
Constraints
* $1 \leq n \leq 100,000$
* $ -1,000,000,000 \leq x_1, y_1, x_2, y_2 \leq 1,000,000,000$
* Two parallel segments never overlap or t... | instruction | 0 | 13,279 | 23 | 26,558 |
"Correct Solution:
```
import cmath
import itertools
import math
import operator
import os
import sys
from collections import defaultdict
if os.getenv("LOCAL"):
sys.stdin = open("_in.txt", "r")
sys.setrecursionlimit(10 ** 9)
INF = float("inf")
IINF = 10 ** 18
MOD = 10 ** 9 + 7
# MOD = 998244353
PI = cmath.pi
TAU... | output | 1 | 13,279 | 23 | 26,559 |
Provide a correct Python 3 solution for this coding contest problem.
For given $n$ segments which are parallel to X-axis or Y-axis, find the number of intersections of them.
Constraints
* $1 \leq n \leq 100,000$
* $ -1,000,000,000 \leq x_1, y_1, x_2, y_2 \leq 1,000,000,000$
* Two parallel segments never overlap or t... | instruction | 0 | 13,280 | 23 | 26,560 |
"Correct Solution:
```
# Acceptance of input
import sys
file_input = sys.stdin
n = file_input.readline()
EP = []
l = -1000000001
r = 1000000001
for line in file_input:
x1, y1, x2, y2 = (map(int, line.split()))
if y1 == y2:
EP.append((min(x1, x2), l, y1))
EP.append((max(x1, x2), r, y1))
e... | output | 1 | 13,280 | 23 | 26,561 |
Provide a correct Python 3 solution for this coding contest problem.
For given $n$ segments which are parallel to X-axis or Y-axis, find the number of intersections of them.
Constraints
* $1 \leq n \leq 100,000$
* $ -1,000,000,000 \leq x_1, y_1, x_2, y_2 \leq 1,000,000,000$
* Two parallel segments never overlap or t... | instruction | 0 | 13,281 | 23 | 26,562 |
"Correct Solution:
```
#!/usr/bin/env python3
# CGL_6_A: Segment Set - Segment Intersections: Manhattan Geometry
from enum import IntEnum
class Action(IntEnum):
ADD = 1
SEARCH = 2
REMOVE = 3
class Color(IntEnum):
BLACK = 0
RED = 1
@staticmethod
def flip(c):
return [Color.RED, C... | output | 1 | 13,281 | 23 | 26,563 |
Provide a correct Python 3 solution for this coding contest problem.
For given $n$ segments which are parallel to X-axis or Y-axis, find the number of intersections of them.
Constraints
* $1 \leq n \leq 100,000$
* $ -1,000,000,000 \leq x_1, y_1, x_2, y_2 \leq 1,000,000,000$
* Two parallel segments never overlap or t... | instruction | 0 | 13,282 | 23 | 26,564 |
"Correct Solution:
```
from enum import IntEnum
class Action(IntEnum):
ADD = 1
SEARCH = 2
REMOVE = 3
class Color(IntEnum):
BLACK = 0
RED = 1
@staticmethod
def flip(c):
return [Color.RED, Color.BLACK][c.value]
class Node:
__slots__ = ('value', 'left', 'right', 'color', 'val... | output | 1 | 13,282 | 23 | 26,565 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
For given $n$ segments which are parallel to X-axis or Y-axis, find the number of intersections of them.
Constraints
* $1 \leq n \leq 100,000$
* $ -1,000,000,000 \leq x_1, y_1, x_2, y_2 \leq 1... | instruction | 0 | 13,283 | 23 | 26,566 |
Yes | output | 1 | 13,283 | 23 | 26,567 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
For given $n$ segments which are parallel to X-axis or Y-axis, find the number of intersections of them.
Constraints
* $1 \leq n \leq 100,000$
* $ -1,000,000,000 \leq x_1, y_1, x_2, y_2 \leq 1... | instruction | 0 | 13,284 | 23 | 26,568 |
Yes | output | 1 | 13,284 | 23 | 26,569 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
For given $n$ segments which are parallel to X-axis or Y-axis, find the number of intersections of them.
Constraints
* $1 \leq n \leq 100,000$
* $ -1,000,000,000 \leq x_1, y_1, x_2, y_2 \leq 1... | instruction | 0 | 13,285 | 23 | 26,570 |
Yes | output | 1 | 13,285 | 23 | 26,571 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
For given $n$ segments which are parallel to X-axis or Y-axis, find the number of intersections of them.
Constraints
* $1 \leq n \leq 100,000$
* $ -1,000,000,000 \leq x_1, y_1, x_2, y_2 \leq 1... | instruction | 0 | 13,286 | 23 | 26,572 |
Yes | output | 1 | 13,286 | 23 | 26,573 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
For given $n$ segments which are parallel to X-axis or Y-axis, find the number of intersections of them.
Constraints
* $1 \leq n \leq 100,000$
* $ -1,000,000,000 \leq x_1, y_1, x_2, y_2 \leq 1... | instruction | 0 | 13,287 | 23 | 26,574 |
No | output | 1 | 13,287 | 23 | 26,575 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
For given $n$ segments which are parallel to X-axis or Y-axis, find the number of intersections of them.
Constraints
* $1 \leq n \leq 100,000$
* $ -1,000,000,000 \leq x_1, y_1, x_2, y_2 \leq 1... | instruction | 0 | 13,288 | 23 | 26,576 |
No | output | 1 | 13,288 | 23 | 26,577 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
For given $n$ segments which are parallel to X-axis or Y-axis, find the number of intersections of them.
Constraints
* $1 \leq n \leq 100,000$
* $ -1,000,000,000 \leq x_1, y_1, x_2, y_2 \leq 1... | instruction | 0 | 13,289 | 23 | 26,578 |
No | output | 1 | 13,289 | 23 | 26,579 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
For given $n$ segments which are parallel to X-axis or Y-axis, find the number of intersections of them.
Constraints
* $1 \leq n \leq 100,000$
* $ -1,000,000,000 \leq x_1, y_1, x_2, y_2 \leq 1... | instruction | 0 | 13,290 | 23 | 26,580 |
No | output | 1 | 13,290 | 23 | 26,581 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
There are n segments drawn on a plane; the i-th segment connects two points (x_{i, 1}, y_{i, 1}) and (x_{i, 2}, y_{i, 2}). Each segment is non-degenerate, and is either horizontal or vertical — ... | instruction | 0 | 13,394 | 23 | 26,788 |
No | output | 1 | 13,394 | 23 | 26,789 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.