message stringlengths 2 39.6k | message_type stringclasses 2
values | message_id int64 0 1 | conversation_id int64 219 108k | cluster float64 11 11 | __index_level_0__ int64 438 217k |
|---|---|---|---|---|---|
Provide tags and a correct Python 3 solution for this coding contest problem.
Vasya adores sport programming. He can't write programs but he loves to watch the contests' progress. Vasya even has a favorite coder and Vasya pays special attention to him.
One day Vasya decided to collect the results of all contests wher... | instruction | 0 | 6,869 | 11 | 13,738 |
Tags: brute force
Correct Solution:
```
def main():
n = int(input())
scores = list(map(int , input().split()))
m, M, count = scores[0], scores[0], 0
for i in range(1, n):
if m < scores[i]:
m = scores[i]
count += 1
elif M > scores[i]:
M = scores[i]
... | output | 1 | 6,869 | 11 | 13,739 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Vasya adores sport programming. He can't write programs but he loves to watch the contests' progress. Vasya even has a favorite coder and Vasya pays special attention to him.
One day Vasya deci... | instruction | 0 | 6,870 | 11 | 13,740 |
Yes | output | 1 | 6,870 | 11 | 13,741 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Vasya adores sport programming. He can't write programs but he loves to watch the contests' progress. Vasya even has a favorite coder and Vasya pays special attention to him.
One day Vasya deci... | instruction | 0 | 6,871 | 11 | 13,742 |
Yes | output | 1 | 6,871 | 11 | 13,743 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Vasya adores sport programming. He can't write programs but he loves to watch the contests' progress. Vasya even has a favorite coder and Vasya pays special attention to him.
One day Vasya deci... | instruction | 0 | 6,872 | 11 | 13,744 |
Yes | output | 1 | 6,872 | 11 | 13,745 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Vasya adores sport programming. He can't write programs but he loves to watch the contests' progress. Vasya even has a favorite coder and Vasya pays special attention to him.
One day Vasya deci... | instruction | 0 | 6,873 | 11 | 13,746 |
Yes | output | 1 | 6,873 | 11 | 13,747 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Vasya adores sport programming. He can't write programs but he loves to watch the contests' progress. Vasya even has a favorite coder and Vasya pays special attention to him.
One day Vasya deci... | instruction | 0 | 6,874 | 11 | 13,748 |
No | output | 1 | 6,874 | 11 | 13,749 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Vasya adores sport programming. He can't write programs but he loves to watch the contests' progress. Vasya even has a favorite coder and Vasya pays special attention to him.
One day Vasya deci... | instruction | 0 | 6,875 | 11 | 13,750 |
No | output | 1 | 6,875 | 11 | 13,751 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Vasya adores sport programming. He can't write programs but he loves to watch the contests' progress. Vasya even has a favorite coder and Vasya pays special attention to him.
One day Vasya deci... | instruction | 0 | 6,876 | 11 | 13,752 |
No | output | 1 | 6,876 | 11 | 13,753 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Vasya adores sport programming. He can't write programs but he loves to watch the contests' progress. Vasya even has a favorite coder and Vasya pays special attention to him.
One day Vasya deci... | instruction | 0 | 6,877 | 11 | 13,754 |
No | output | 1 | 6,877 | 11 | 13,755 |
Provide tags and a correct Python 3 solution for this coding contest problem.
You are given a problemset consisting of n problems. The difficulty of the i-th problem is a_i. It is guaranteed that all difficulties are distinct and are given in the increasing order.
You have to assemble the contest which consists of so... | instruction | 0 | 7,549 | 11 | 15,098 |
Tags: dp, greedy, math
Correct Solution:
```
import sys
def input(): return sys.stdin.readline()[:-1]
# def input(): return sys.stdin.buffer.readline()[:-1]
n = int(input())
a = [int(x) for x in input().split()]
ans = 1
cur = 1
for i in range(1, n):
if a[i - 1] * 2 >= a[i]:
cur += 1
else:
cur ... | output | 1 | 7,549 | 11 | 15,099 |
Provide tags and a correct Python 3 solution for this coding contest problem.
You are given a problemset consisting of n problems. The difficulty of the i-th problem is a_i. It is guaranteed that all difficulties are distinct and are given in the increasing order.
You have to assemble the contest which consists of so... | instruction | 0 | 7,550 | 11 | 15,100 |
Tags: dp, greedy, math
Correct Solution:
```
n=int(input())
a=list(map(int,input().split()))
p=0
m=1
for i in a:
if i>p*2:
c=1
else:
c+=1
m=max(c,m)
p=i
m=max(m,c)
print(m)
``` | output | 1 | 7,550 | 11 | 15,101 |
Provide tags and a correct Python 3 solution for this coding contest problem.
You are given a problemset consisting of n problems. The difficulty of the i-th problem is a_i. It is guaranteed that all difficulties are distinct and are given in the increasing order.
You have to assemble the contest which consists of so... | instruction | 0 | 7,551 | 11 | 15,102 |
Tags: dp, greedy, math
Correct Solution:
```
#iamanshup
n = int(input())
l = list(map(int, input().split()))
ans = 1
m = 1
for i in range(n-1):
if 2*l[i]>=l[i+1]:
m+=1
else:
m = 1
ans = max(ans, m)
print(ans)
``` | output | 1 | 7,551 | 11 | 15,103 |
Provide tags and a correct Python 3 solution for this coding contest problem.
You are given a problemset consisting of n problems. The difficulty of the i-th problem is a_i. It is guaranteed that all difficulties are distinct and are given in the increasing order.
You have to assemble the contest which consists of so... | instruction | 0 | 7,552 | 11 | 15,104 |
Tags: dp, greedy, math
Correct Solution:
```
from collections import deque
from sys import stdin
lines = deque(line.strip() for line in stdin.readlines())
def nextline():
return lines.popleft()
def types(cast, sep=None):
return tuple(cast(x) for x in strs(sep=sep))
def ints(sep=None):
return types(int, s... | output | 1 | 7,552 | 11 | 15,105 |
Provide tags and a correct Python 3 solution for this coding contest problem.
You are given a problemset consisting of n problems. The difficulty of the i-th problem is a_i. It is guaranteed that all difficulties are distinct and are given in the increasing order.
You have to assemble the contest which consists of so... | instruction | 0 | 7,553 | 11 | 15,106 |
Tags: dp, greedy, math
Correct Solution:
```
n= int(input())
l=list(map(int,input().split()))
if(n==1):
print(1)
else:
t=[]
ans=1
for i in range(n-1):
if(l[i]*2>=l[i+1]):
ans+=1
else:
t.append(ans)
if(i==n-2):
t.append(1)
ans=1
if(i==n-2 and l[i]*2>=l[i+1]):
t.append(ans)
print(max(t))
`... | output | 1 | 7,553 | 11 | 15,107 |
Provide tags and a correct Python 3 solution for this coding contest problem.
You are given a problemset consisting of n problems. The difficulty of the i-th problem is a_i. It is guaranteed that all difficulties are distinct and are given in the increasing order.
You have to assemble the contest which consists of so... | instruction | 0 | 7,554 | 11 | 15,108 |
Tags: dp, greedy, math
Correct Solution:
```
n = int(input())
a = list(map(int, input().split()))
x = [0]
for i in range(1, n):
if a[i - 1] * 2 < a[i]:
x.append(i)
x.append(n)
ans = 0
m = len(x)
for i in range(1, m):
ans = max(ans, x[i] - x[i - 1])
print(ans)
``` | output | 1 | 7,554 | 11 | 15,109 |
Provide tags and a correct Python 3 solution for this coding contest problem.
You are given a problemset consisting of n problems. The difficulty of the i-th problem is a_i. It is guaranteed that all difficulties are distinct and are given in the increasing order.
You have to assemble the contest which consists of so... | instruction | 0 | 7,555 | 11 | 15,110 |
Tags: dp, greedy, math
Correct Solution:
```
n = int(input())
a = list(map(int, input().split()))
a.append(a[n - 1] * 3)
max_ans = 1
ans = 1
for i in range(n):
if a[i] * 2 < a[i + 1]:
if ans > max_ans:
max_ans = ans
ans = 1
else:
ans += 1
print(max_ans)
``` | output | 1 | 7,555 | 11 | 15,111 |
Provide tags and a correct Python 3 solution for this coding contest problem.
You are given a problemset consisting of n problems. The difficulty of the i-th problem is a_i. It is guaranteed that all difficulties are distinct and are given in the increasing order.
You have to assemble the contest which consists of so... | instruction | 0 | 7,556 | 11 | 15,112 |
Tags: dp, greedy, math
Correct Solution:
```
amount = int(input())
diffs = [int(i) for i in input().split()]
ret = 1
m = 1
for i in range(1, amount):
if diffs[i] <= diffs[i - 1] * 2:
m += 1
ret = max(ret, m)
else:
m = 1
print(ret)
``` | output | 1 | 7,556 | 11 | 15,113 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You are given a problemset consisting of n problems. The difficulty of the i-th problem is a_i. It is guaranteed that all difficulties are distinct and are given in the increasing order.
You ha... | instruction | 0 | 7,557 | 11 | 15,114 |
Yes | output | 1 | 7,557 | 11 | 15,115 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You are given a problemset consisting of n problems. The difficulty of the i-th problem is a_i. It is guaranteed that all difficulties are distinct and are given in the increasing order.
You ha... | instruction | 0 | 7,558 | 11 | 15,116 |
Yes | output | 1 | 7,558 | 11 | 15,117 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You are given a problemset consisting of n problems. The difficulty of the i-th problem is a_i. It is guaranteed that all difficulties are distinct and are given in the increasing order.
You ha... | instruction | 0 | 7,559 | 11 | 15,118 |
Yes | output | 1 | 7,559 | 11 | 15,119 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You are given a problemset consisting of n problems. The difficulty of the i-th problem is a_i. It is guaranteed that all difficulties are distinct and are given in the increasing order.
You ha... | instruction | 0 | 7,560 | 11 | 15,120 |
Yes | output | 1 | 7,560 | 11 | 15,121 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You are given a problemset consisting of n problems. The difficulty of the i-th problem is a_i. It is guaranteed that all difficulties are distinct and are given in the increasing order.
You ha... | instruction | 0 | 7,561 | 11 | 15,122 |
No | output | 1 | 7,561 | 11 | 15,123 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You are given a problemset consisting of n problems. The difficulty of the i-th problem is a_i. It is guaranteed that all difficulties are distinct and are given in the increasing order.
You ha... | instruction | 0 | 7,562 | 11 | 15,124 |
No | output | 1 | 7,562 | 11 | 15,125 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You are given a problemset consisting of n problems. The difficulty of the i-th problem is a_i. It is guaranteed that all difficulties are distinct and are given in the increasing order.
You ha... | instruction | 0 | 7,563 | 11 | 15,126 |
No | output | 1 | 7,563 | 11 | 15,127 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You are given a problemset consisting of n problems. The difficulty of the i-th problem is a_i. It is guaranteed that all difficulties are distinct and are given in the increasing order.
You ha... | instruction | 0 | 7,564 | 11 | 15,128 |
No | output | 1 | 7,564 | 11 | 15,129 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Not so long ago company R2 bought company R1 and consequently, all its developments in the field of multicore processors. Now the R2 laboratory is testing one of the R1 processors.
The testing ... | instruction | 0 | 7,911 | 11 | 15,822 |
Yes | output | 1 | 7,911 | 11 | 15,823 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Not so long ago company R2 bought company R1 and consequently, all its developments in the field of multicore processors. Now the R2 laboratory is testing one of the R1 processors.
The testing ... | instruction | 0 | 7,912 | 11 | 15,824 |
Yes | output | 1 | 7,912 | 11 | 15,825 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Not so long ago company R2 bought company R1 and consequently, all its developments in the field of multicore processors. Now the R2 laboratory is testing one of the R1 processors.
The testing ... | instruction | 0 | 7,913 | 11 | 15,826 |
Yes | output | 1 | 7,913 | 11 | 15,827 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Not so long ago company R2 bought company R1 and consequently, all its developments in the field of multicore processors. Now the R2 laboratory is testing one of the R1 processors.
The testing ... | instruction | 0 | 7,914 | 11 | 15,828 |
Yes | output | 1 | 7,914 | 11 | 15,829 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Not so long ago company R2 bought company R1 and consequently, all its developments in the field of multicore processors. Now the R2 laboratory is testing one of the R1 processors.
The testing ... | instruction | 0 | 7,915 | 11 | 15,830 |
No | output | 1 | 7,915 | 11 | 15,831 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Not so long ago company R2 bought company R1 and consequently, all its developments in the field of multicore processors. Now the R2 laboratory is testing one of the R1 processors.
The testing ... | instruction | 0 | 7,916 | 11 | 15,832 |
No | output | 1 | 7,916 | 11 | 15,833 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Not so long ago company R2 bought company R1 and consequently, all its developments in the field of multicore processors. Now the R2 laboratory is testing one of the R1 processors.
The testing ... | instruction | 0 | 7,917 | 11 | 15,834 |
No | output | 1 | 7,917 | 11 | 15,835 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Not so long ago company R2 bought company R1 and consequently, all its developments in the field of multicore processors. Now the R2 laboratory is testing one of the R1 processors.
The testing ... | instruction | 0 | 7,918 | 11 | 15,836 |
No | output | 1 | 7,918 | 11 | 15,837 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
This is an interactive problem. In the interaction section below you will see the information about flushing the output.
In this problem, you will be playing a game with Hongcow. How lucky of y... | instruction | 0 | 8,055 | 11 | 16,110 |
Yes | output | 1 | 8,055 | 11 | 16,111 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
This is an interactive problem. In the interaction section below you will see the information about flushing the output.
In this problem, you will be playing a game with Hongcow. How lucky of y... | instruction | 0 | 8,056 | 11 | 16,112 |
Yes | output | 1 | 8,056 | 11 | 16,113 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
This is an interactive problem. In the interaction section below you will see the information about flushing the output.
In this problem, you will be playing a game with Hongcow. How lucky of y... | instruction | 0 | 8,057 | 11 | 16,114 |
Yes | output | 1 | 8,057 | 11 | 16,115 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
This is an interactive problem. In the interaction section below you will see the information about flushing the output.
In this problem, you will be playing a game with Hongcow. How lucky of y... | instruction | 0 | 8,058 | 11 | 16,116 |
Yes | output | 1 | 8,058 | 11 | 16,117 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
This is an interactive problem. In the interaction section below you will see the information about flushing the output.
In this problem, you will be playing a game with Hongcow. How lucky of y... | instruction | 0 | 8,059 | 11 | 16,118 |
No | output | 1 | 8,059 | 11 | 16,119 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
This is an interactive problem. In the interaction section below you will see the information about flushing the output.
In this problem, you will be playing a game with Hongcow. How lucky of y... | instruction | 0 | 8,060 | 11 | 16,120 |
No | output | 1 | 8,060 | 11 | 16,121 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
This is an interactive problem. In the interaction section below you will see the information about flushing the output.
In this problem, you will be playing a game with Hongcow. How lucky of y... | instruction | 0 | 8,061 | 11 | 16,122 |
No | output | 1 | 8,061 | 11 | 16,123 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
This is an interactive problem. In the interaction section below you will see the information about flushing the output.
In this problem, you will be playing a game with Hongcow. How lucky of y... | instruction | 0 | 8,062 | 11 | 16,124 |
No | output | 1 | 8,062 | 11 | 16,125 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
In this problem, you should process T testcases.
For each testcase, you are given four integers N, M, A, B.
Calculate \sum_{i = 0}^{N - 1} floor((A \times i + B) / M).
Constraints
* 1 \leq T... | instruction | 0 | 8,176 | 11 | 16,352 |
Yes | output | 1 | 8,176 | 11 | 16,353 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
In this problem, you should process T testcases.
For each testcase, you are given four integers N, M, A, B.
Calculate \sum_{i = 0}^{N - 1} floor((A \times i + B) / M).
Constraints
* 1 \leq T... | instruction | 0 | 8,180 | 11 | 16,360 |
No | output | 1 | 8,180 | 11 | 16,361 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You are the top spy of AtCoder Kingdom. To prevent the stolen secret from being handed to AlDebaran Kingdom, you have sneaked into the party where the transaction happens.
There are N attendees... | instruction | 0 | 8,192 | 11 | 16,384 |
Yes | output | 1 | 8,192 | 11 | 16,385 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You are the top spy of AtCoder Kingdom. To prevent the stolen secret from being handed to AlDebaran Kingdom, you have sneaked into the party where the transaction happens.
There are N attendees... | instruction | 0 | 8,193 | 11 | 16,386 |
Yes | output | 1 | 8,193 | 11 | 16,387 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You are the top spy of AtCoder Kingdom. To prevent the stolen secret from being handed to AlDebaran Kingdom, you have sneaked into the party where the transaction happens.
There are N attendees... | instruction | 0 | 8,194 | 11 | 16,388 |
Yes | output | 1 | 8,194 | 11 | 16,389 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You are the top spy of AtCoder Kingdom. To prevent the stolen secret from being handed to AlDebaran Kingdom, you have sneaked into the party where the transaction happens.
There are N attendees... | instruction | 0 | 8,195 | 11 | 16,390 |
Yes | output | 1 | 8,195 | 11 | 16,391 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You are the top spy of AtCoder Kingdom. To prevent the stolen secret from being handed to AlDebaran Kingdom, you have sneaked into the party where the transaction happens.
There are N attendees... | instruction | 0 | 8,196 | 11 | 16,392 |
No | output | 1 | 8,196 | 11 | 16,393 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You are the top spy of AtCoder Kingdom. To prevent the stolen secret from being handed to AlDebaran Kingdom, you have sneaked into the party where the transaction happens.
There are N attendees... | instruction | 0 | 8,197 | 11 | 16,394 |
No | output | 1 | 8,197 | 11 | 16,395 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You are the top spy of AtCoder Kingdom. To prevent the stolen secret from being handed to AlDebaran Kingdom, you have sneaked into the party where the transaction happens.
There are N attendees... | instruction | 0 | 8,199 | 11 | 16,398 |
No | output | 1 | 8,199 | 11 | 16,399 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.