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 a correct Python 3 solution for this coding contest problem.
Write a program which calculates the area and circumference of a circle for given radius r.
Constraints
* 0 < r < 10000
Input
A real number r is given.
Output
Print the area and circumference of the circle in a line. Put a single space between ... | instruction | 0 | 88,324 | 23 | 176,648 |
"Correct Solution:
```
r=float(input())
p=3.141592653589
print(f'{p*r*r} {2*p*r}')
``` | output | 1 | 88,324 | 23 | 176,649 |
Provide a correct Python 3 solution for this coding contest problem.
Write a program which calculates the area and circumference of a circle for given radius r.
Constraints
* 0 < r < 10000
Input
A real number r is given.
Output
Print the area and circumference of the circle in a line. Put a single space between ... | instruction | 0 | 88,325 | 23 | 176,650 |
"Correct Solution:
```
a=float(input())
b=a*3.14159265358979
print(a*b,2*b)
``` | output | 1 | 88,325 | 23 | 176,651 |
Provide a correct Python 3 solution for this coding contest problem.
Write a program which calculates the area and circumference of a circle for given radius r.
Constraints
* 0 < r < 10000
Input
A real number r is given.
Output
Print the area and circumference of the circle in a line. Put a single space between ... | instruction | 0 | 88,326 | 23 | 176,652 |
"Correct Solution:
```
r=float(input())
pi=3.141592653589
print(r**2*pi,2*r*pi)
``` | output | 1 | 88,326 | 23 | 176,653 |
Provide a correct Python 3 solution for this coding contest problem.
Write a program which calculates the area and circumference of a circle for given radius r.
Constraints
* 0 < r < 10000
Input
A real number r is given.
Output
Print the area and circumference of the circle in a line. Put a single space between ... | instruction | 0 | 88,327 | 23 | 176,654 |
"Correct Solution:
```
from math import pi
r = float(input())
print(r * r * pi, 2 * r * pi)
``` | output | 1 | 88,327 | 23 | 176,655 |
Provide a correct Python 3 solution for this coding contest problem.
Write a program which calculates the area and circumference of a circle for given radius r.
Constraints
* 0 < r < 10000
Input
A real number r is given.
Output
Print the area and circumference of the circle in a line. Put a single space between ... | instruction | 0 | 88,328 | 23 | 176,656 |
"Correct Solution:
```
r = float(input())
x = 3.141592653589
A = r**2*x
B = 2*r*x
print(A,B)
``` | output | 1 | 88,328 | 23 | 176,657 |
Provide a correct Python 3 solution for this coding contest problem.
Write a program which calculates the area and circumference of a circle for given radius r.
Constraints
* 0 < r < 10000
Input
A real number r is given.
Output
Print the area and circumference of the circle in a line. Put a single space between ... | instruction | 0 | 88,329 | 23 | 176,658 |
"Correct Solution:
```
r = float(input())
pi = 3.141592653589
print("%.6f %.6f"%(r*r*pi,r*2*pi))
``` | output | 1 | 88,329 | 23 | 176,659 |
Provide a correct Python 3 solution for this coding contest problem.
Write a program which calculates the area and circumference of a circle for given radius r.
Constraints
* 0 < r < 10000
Input
A real number r is given.
Output
Print the area and circumference of the circle in a line. Put a single space between ... | instruction | 0 | 88,330 | 23 | 176,660 |
"Correct Solution:
```
import math
r = float(input())
print(r ** 2 * math.pi, 2 * math.pi * r)
``` | output | 1 | 88,330 | 23 | 176,661 |
Provide a correct Python 3 solution for this coding contest problem.
Write a program which calculates the area and circumference of a circle for given radius r.
Constraints
* 0 < r < 10000
Input
A real number r is given.
Output
Print the area and circumference of the circle in a line. Put a single space between ... | instruction | 0 | 88,331 | 23 | 176,662 |
"Correct Solution:
```
import math
r = float(input())
print(r**2*math.pi,r*2*math.pi)
``` | output | 1 | 88,331 | 23 | 176,663 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Write a program which calculates the area and circumference of a circle for given radius r.
Constraints
* 0 < r < 10000
Input
A real number r is given.
Output
Print the area and circumfere... | instruction | 0 | 88,332 | 23 | 176,664 |
Yes | output | 1 | 88,332 | 23 | 176,665 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Write a program which calculates the area and circumference of a circle for given radius r.
Constraints
* 0 < r < 10000
Input
A real number r is given.
Output
Print the area and circumfere... | instruction | 0 | 88,333 | 23 | 176,666 |
Yes | output | 1 | 88,333 | 23 | 176,667 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Write a program which calculates the area and circumference of a circle for given radius r.
Constraints
* 0 < r < 10000
Input
A real number r is given.
Output
Print the area and circumfere... | instruction | 0 | 88,334 | 23 | 176,668 |
Yes | output | 1 | 88,334 | 23 | 176,669 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Write a program which calculates the area and circumference of a circle for given radius r.
Constraints
* 0 < r < 10000
Input
A real number r is given.
Output
Print the area and circumfere... | instruction | 0 | 88,335 | 23 | 176,670 |
Yes | output | 1 | 88,335 | 23 | 176,671 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Write a program which calculates the area and circumference of a circle for given radius r.
Constraints
* 0 < r < 10000
Input
A real number r is given.
Output
Print the area and circumfere... | instruction | 0 | 88,336 | 23 | 176,672 |
No | output | 1 | 88,336 | 23 | 176,673 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Write a program which calculates the area and circumference of a circle for given radius r.
Constraints
* 0 < r < 10000
Input
A real number r is given.
Output
Print the area and circumfere... | instruction | 0 | 88,337 | 23 | 176,674 |
No | output | 1 | 88,337 | 23 | 176,675 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Write a program which calculates the area and circumference of a circle for given radius r.
Constraints
* 0 < r < 10000
Input
A real number r is given.
Output
Print the area and circumfere... | instruction | 0 | 88,338 | 23 | 176,676 |
No | output | 1 | 88,338 | 23 | 176,677 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Write a program which calculates the area and circumference of a circle for given radius r.
Constraints
* 0 < r < 10000
Input
A real number r is given.
Output
Print the area and circumfere... | instruction | 0 | 88,339 | 23 | 176,678 |
No | output | 1 | 88,339 | 23 | 176,679 |
Provide tags and a correct Python 3 solution for this coding contest problem.
There is a white sheet of paper lying on a rectangle table. The sheet is a rectangle with its sides parallel to the sides of the table. If you will take a look from above and assume that the bottom left corner of the table has coordinates (0... | instruction | 0 | 88,463 | 23 | 176,926 |
Tags: geometry, math
Correct Solution:
```
import sys
def over_lap(rect1, rect2):
x1, y1, x2, y2 = rect1
x3, y3, x4, y4 = rect2
if x2 < x3 or x4 < x1 or y2 < y3 or y4 < y1:
return (0, 0, 0, 0)
else:
return (max(x1, x3), max(y1, y3), min(x2, x4), min(y2, y4))
def get_area(rect):
x1,... | output | 1 | 88,463 | 23 | 176,927 |
Provide tags and a correct Python 3 solution for this coding contest problem.
There is a white sheet of paper lying on a rectangle table. The sheet is a rectangle with its sides parallel to the sides of the table. If you will take a look from above and assume that the bottom left corner of the table has coordinates (0... | instruction | 0 | 88,464 | 23 | 176,928 |
Tags: geometry, math
Correct Solution:
```
import sys
def intersection(x1,y1,x2,y2,x3,y3,x4,y4):
a1=max(x1,x3)
b1=max(y1,y3)
a2=min(x2,x4)
b2=min(y2,y4)
x_dist=min(x2,x4)-max(x1,x3)
y_dist=min(y2,y4)-max(y1,y3)
if(x_dist<=0 or y_dist<=0):
return [0,0,0,0]
return [a1,b1,a2,b2]
def area(x1,y1,x2,y2):
ret... | output | 1 | 88,464 | 23 | 176,929 |
Provide tags and a correct Python 3 solution for this coding contest problem.
There is a white sheet of paper lying on a rectangle table. The sheet is a rectangle with its sides parallel to the sides of the table. If you will take a look from above and assume that the bottom left corner of the table has coordinates (0... | instruction | 0 | 88,465 | 23 | 176,930 |
Tags: geometry, math
Correct Solution:
```
c = lambda s: [(s[0 if (i&1) else 2], s[1 if (i&2) else 3]) for i in range(4)]
ins = lambda p,s: s[0] <= p[0] <= s[2] and s[1] <= p[1] <= s[3]
w = list(map(int,input().split()))
b = [list(map(int,input().split())) for _ in '12']
cn = [set(i for i,p in enumerate(c(w)) if ins(... | output | 1 | 88,465 | 23 | 176,931 |
Provide tags and a correct Python 3 solution for this coding contest problem.
There is a white sheet of paper lying on a rectangle table. The sheet is a rectangle with its sides parallel to the sides of the table. If you will take a look from above and assume that the bottom left corner of the table has coordinates (0... | instruction | 0 | 88,466 | 23 | 176,932 |
Tags: geometry, math
Correct Solution:
```
x1, y1, x2, y2 = map(int, input().split())
x3, y3, x4, y4 = map(int, input().split())
x5, y5, x6, y6 = map(int, input().split())
def per(a):
x1, y1, x2, y2, x3, y3, x4, y4 = a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7]
left = max(x1, x3)
right = min(x2, x4)
... | output | 1 | 88,466 | 23 | 176,933 |
Provide tags and a correct Python 3 solution for this coding contest problem.
There is a white sheet of paper lying on a rectangle table. The sheet is a rectangle with its sides parallel to the sides of the table. If you will take a look from above and assume that the bottom left corner of the table has coordinates (0... | instruction | 0 | 88,467 | 23 | 176,934 |
Tags: geometry, math
Correct Solution:
```
i1 = input('').split(' ')
x1 = int(i1[0])
y1 = int(i1[1])
x2 = int(i1[2])
y2 = int(i1[3])
i1 = input('').split(' ')
x3 = int(i1[0])
y3 = int(i1[1])
x4 = int(i1[2])
y4 = int(i1[3])
i1 = input('').split(' ')
x5 = int(i1[0])
y5 = int(i1[1])
x6 = int(i1[2])
y6 = int(i1[3])
def ch... | output | 1 | 88,467 | 23 | 176,935 |
Provide tags and a correct Python 3 solution for this coding contest problem.
There is a white sheet of paper lying on a rectangle table. The sheet is a rectangle with its sides parallel to the sides of the table. If you will take a look from above and assume that the bottom left corner of the table has coordinates (0... | instruction | 0 | 88,468 | 23 | 176,936 |
Tags: geometry, math
Correct Solution:
```
def inside(x1, y1, x2, y2, x3, y3, x4, y4):
return x3 <= x1 <= x4 and y3 <= y1 <= y4 and x3 <= x2 <= x4 and y3 <= y2 <= y4
x1, y1, x2, y2 = map(int, input().split())
x3, y3, x4, y4 = map(int, input().split())
x5, y5, x6, y6 = map(int, input().split())
ok = False
if inside(... | output | 1 | 88,468 | 23 | 176,937 |
Provide tags and a correct Python 3 solution for this coding contest problem.
There is a white sheet of paper lying on a rectangle table. The sheet is a rectangle with its sides parallel to the sides of the table. If you will take a look from above and assume that the bottom left corner of the table has coordinates (0... | instruction | 0 | 88,469 | 23 | 176,938 |
Tags: geometry, math
Correct Solution:
```
def cut(A, B):
"""
B interior in A
"""
return [(max([A[0][0], B[0][0]]), max([A[0][1], B[0][1]])),
(min([A[1][0], B[1][0]]), min([A[1][1], B[1][1]]))]
def area(A):
if A[1][0] < A[0][0] or A[1][1] < A[0][1]:
return 0
return max([(A... | output | 1 | 88,469 | 23 | 176,939 |
Provide tags and a correct Python 3 solution for this coding contest problem.
There is a white sheet of paper lying on a rectangle table. The sheet is a rectangle with its sides parallel to the sides of the table. If you will take a look from above and assume that the bottom left corner of the table has coordinates (0... | instruction | 0 | 88,470 | 23 | 176,940 |
Tags: geometry, math
Correct Solution:
```
def intersection(a, b):
return max(a[0], b[0]), max(a[1], b[1]), min(a[2], b[2]), min(a[3], b[3])
def area(lst):
return max(lst[2] - lst[0], 0) * max(lst[3] - lst[1], 0)
w = [int(i) for i in input().split()]
lst1 = [int(i) for i in input().split()]
lst2 = [int(i) f... | output | 1 | 88,470 | 23 | 176,941 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
There is a white sheet of paper lying on a rectangle table. The sheet is a rectangle with its sides parallel to the sides of the table. If you will take a look from above and assume that the bot... | instruction | 0 | 88,471 | 23 | 176,942 |
Yes | output | 1 | 88,471 | 23 | 176,943 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
There is a white sheet of paper lying on a rectangle table. The sheet is a rectangle with its sides parallel to the sides of the table. If you will take a look from above and assume that the bot... | instruction | 0 | 88,472 | 23 | 176,944 |
Yes | output | 1 | 88,472 | 23 | 176,945 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
There is a white sheet of paper lying on a rectangle table. The sheet is a rectangle with its sides parallel to the sides of the table. If you will take a look from above and assume that the bot... | instruction | 0 | 88,473 | 23 | 176,946 |
Yes | output | 1 | 88,473 | 23 | 176,947 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
There is a white sheet of paper lying on a rectangle table. The sheet is a rectangle with its sides parallel to the sides of the table. If you will take a look from above and assume that the bot... | instruction | 0 | 88,474 | 23 | 176,948 |
Yes | output | 1 | 88,474 | 23 | 176,949 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
There is a white sheet of paper lying on a rectangle table. The sheet is a rectangle with its sides parallel to the sides of the table. If you will take a look from above and assume that the bot... | instruction | 0 | 88,475 | 23 | 176,950 |
No | output | 1 | 88,475 | 23 | 176,951 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
There is a white sheet of paper lying on a rectangle table. The sheet is a rectangle with its sides parallel to the sides of the table. If you will take a look from above and assume that the bot... | instruction | 0 | 88,476 | 23 | 176,952 |
No | output | 1 | 88,476 | 23 | 176,953 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
There is a white sheet of paper lying on a rectangle table. The sheet is a rectangle with its sides parallel to the sides of the table. If you will take a look from above and assume that the bot... | instruction | 0 | 88,477 | 23 | 176,954 |
No | output | 1 | 88,477 | 23 | 176,955 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
There is a white sheet of paper lying on a rectangle table. The sheet is a rectangle with its sides parallel to the sides of the table. If you will take a look from above and assume that the bot... | instruction | 0 | 88,478 | 23 | 176,956 |
No | output | 1 | 88,478 | 23 | 176,957 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
This time our child has a simple polygon. He has to find the number of ways to split the polygon into non-degenerate triangles, each way must satisfy the following requirements:
* each vertex... | instruction | 0 | 88,799 | 23 | 177,598 |
No | output | 1 | 88,799 | 23 | 177,599 |
Provide a correct Python 3 solution for this coding contest problem.
You are given three integers A, B and C.
Determine if there exists an equilateral triangle whose sides have lengths A, B and C.
Constraints
* All values in input are integers.
* 1 \leq A,B,C \leq 100
Input
Input is given from Standard Input in t... | instruction | 0 | 89,046 | 23 | 178,092 |
"Correct Solution:
```
x, y, z = map(int,input().split())
if x == y == z:
print("Yes")
else:
print("No")
``` | output | 1 | 89,046 | 23 | 178,093 |
Provide a correct Python 3 solution for this coding contest problem.
You are given three integers A, B and C.
Determine if there exists an equilateral triangle whose sides have lengths A, B and C.
Constraints
* All values in input are integers.
* 1 \leq A,B,C \leq 100
Input
Input is given from Standard Input in t... | instruction | 0 | 89,047 | 23 | 178,094 |
"Correct Solution:
```
x,y,z= map(int,input().split())
if x==y and y==z:
print("Yes")
else:
print("No")
``` | output | 1 | 89,047 | 23 | 178,095 |
Provide a correct Python 3 solution for this coding contest problem.
You are given three integers A, B and C.
Determine if there exists an equilateral triangle whose sides have lengths A, B and C.
Constraints
* All values in input are integers.
* 1 \leq A,B,C \leq 100
Input
Input is given from Standard Input in t... | instruction | 0 | 89,048 | 23 | 178,096 |
"Correct Solution:
```
A,B,C=[int(i) for i in input().split(" ")]
print("Yes" if A==B==C else "No")
``` | output | 1 | 89,048 | 23 | 178,097 |
Provide a correct Python 3 solution for this coding contest problem.
You are given three integers A, B and C.
Determine if there exists an equilateral triangle whose sides have lengths A, B and C.
Constraints
* All values in input are integers.
* 1 \leq A,B,C \leq 100
Input
Input is given from Standard Input in t... | instruction | 0 | 89,049 | 23 | 178,098 |
"Correct Solution:
```
A,B,C=map(int,input().split())
if A==C and A==B:
print('Yes')
else :
print('No')
``` | output | 1 | 89,049 | 23 | 178,099 |
Provide a correct Python 3 solution for this coding contest problem.
You are given three integers A, B and C.
Determine if there exists an equilateral triangle whose sides have lengths A, B and C.
Constraints
* All values in input are integers.
* 1 \leq A,B,C \leq 100
Input
Input is given from Standard Input in t... | instruction | 0 | 89,050 | 23 | 178,100 |
"Correct Solution:
```
A, B, C = map(int, input().split())
if (A==B and B==C):
print('Yes')
else:
print('No')
``` | output | 1 | 89,050 | 23 | 178,101 |
Provide a correct Python 3 solution for this coding contest problem.
You are given three integers A, B and C.
Determine if there exists an equilateral triangle whose sides have lengths A, B and C.
Constraints
* All values in input are integers.
* 1 \leq A,B,C \leq 100
Input
Input is given from Standard Input in t... | instruction | 0 | 89,051 | 23 | 178,102 |
"Correct Solution:
```
a, b, c = map(int, input().split())
print("Yes" if a == b and a == c and b == c else "No")
``` | output | 1 | 89,051 | 23 | 178,103 |
Provide a correct Python 3 solution for this coding contest problem.
You are given three integers A, B and C.
Determine if there exists an equilateral triangle whose sides have lengths A, B and C.
Constraints
* All values in input are integers.
* 1 \leq A,B,C \leq 100
Input
Input is given from Standard Input in t... | instruction | 0 | 89,052 | 23 | 178,104 |
"Correct Solution:
```
i = input().split()
if i[0]==i[1] and i[1]==i[2]:
print("Yes")
else:
print("No")
``` | output | 1 | 89,052 | 23 | 178,105 |
Provide a correct Python 3 solution for this coding contest problem.
You are given three integers A, B and C.
Determine if there exists an equilateral triangle whose sides have lengths A, B and C.
Constraints
* All values in input are integers.
* 1 \leq A,B,C \leq 100
Input
Input is given from Standard Input in t... | instruction | 0 | 89,053 | 23 | 178,106 |
"Correct Solution:
```
a,b,c = input().split()
print("Yes" if a == b == c else "No")
``` | output | 1 | 89,053 | 23 | 178,107 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You are given three integers A, B and C.
Determine if there exists an equilateral triangle whose sides have lengths A, B and C.
Constraints
* All values in input are integers.
* 1 \leq A,B,C ... | instruction | 0 | 89,054 | 23 | 178,108 |
Yes | output | 1 | 89,054 | 23 | 178,109 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You are given three integers A, B and C.
Determine if there exists an equilateral triangle whose sides have lengths A, B and C.
Constraints
* All values in input are integers.
* 1 \leq A,B,C ... | instruction | 0 | 89,055 | 23 | 178,110 |
Yes | output | 1 | 89,055 | 23 | 178,111 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You are given three integers A, B and C.
Determine if there exists an equilateral triangle whose sides have lengths A, B and C.
Constraints
* All values in input are integers.
* 1 \leq A,B,C ... | instruction | 0 | 89,056 | 23 | 178,112 |
Yes | output | 1 | 89,056 | 23 | 178,113 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You are given three integers A, B and C.
Determine if there exists an equilateral triangle whose sides have lengths A, B and C.
Constraints
* All values in input are integers.
* 1 \leq A,B,C ... | instruction | 0 | 89,057 | 23 | 178,114 |
Yes | output | 1 | 89,057 | 23 | 178,115 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You are given three integers A, B and C.
Determine if there exists an equilateral triangle whose sides have lengths A, B and C.
Constraints
* All values in input are integers.
* 1 \leq A,B,C ... | instruction | 0 | 89,058 | 23 | 178,116 |
No | output | 1 | 89,058 | 23 | 178,117 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You are given three integers A, B and C.
Determine if there exists an equilateral triangle whose sides have lengths A, B and C.
Constraints
* All values in input are integers.
* 1 \leq A,B,C ... | instruction | 0 | 89,059 | 23 | 178,118 |
No | output | 1 | 89,059 | 23 | 178,119 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You are given three integers A, B and C.
Determine if there exists an equilateral triangle whose sides have lengths A, B and C.
Constraints
* All values in input are integers.
* 1 \leq A,B,C ... | instruction | 0 | 89,060 | 23 | 178,120 |
No | output | 1 | 89,060 | 23 | 178,121 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You are given three integers A, B and C.
Determine if there exists an equilateral triangle whose sides have lengths A, B and C.
Constraints
* All values in input are integers.
* 1 \leq A,B,C ... | instruction | 0 | 89,061 | 23 | 178,122 |
No | output | 1 | 89,061 | 23 | 178,123 |
Provide a correct Python 3 solution for this coding contest problem.
Amidakuji is a traditional method of lottery in Japan.
To make an amidakuji, we first draw W parallel vertical lines, and then draw horizontal lines that connect them. The length of each vertical line is H+1 [cm], and the endpoints of the horizontal... | instruction | 0 | 89,062 | 23 | 178,124 |
"Correct Solution:
```
H, W, K = map(int, input().split())
bit = []
for i in range(1 << (W - 1)):
flag = True
for j in range(W - 1):
if i & 1 << j and i & 1 << (j + 1):
flag = False
break
if flag:
bit.append(i)
MOD = 10 ** 9 + 7
dp = [[0] * W for i in range(H + 1)]... | output | 1 | 89,062 | 23 | 178,125 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.