message stringlengths 2 30.5k | message_type stringclasses 2
values | message_id int64 0 1 | conversation_id int64 237 109k | cluster float64 10 10 | __index_level_0__ int64 474 217k |
|---|---|---|---|---|---|
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
There are n incoming messages for Vasya. The i-th message is going to be received after ti minutes. Each message has a cost, which equals to A initially. After being received, the cost of a mess... | instruction | 0 | 74,737 | 10 | 149,474 |
No | output | 1 | 74,737 | 10 | 149,475 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You are running for a governor in a small city in Russia. You ran some polls and did some research, and for every person in the city you know whom he will vote for, and how much it will cost to ... | instruction | 0 | 75,417 | 10 | 150,834 |
No | output | 1 | 75,417 | 10 | 150,835 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You are running for a governor in a small city in Russia. You ran some polls and did some research, and for every person in the city you know whom he will vote for, and how much it will cost to ... | instruction | 0 | 75,418 | 10 | 150,836 |
No | output | 1 | 75,418 | 10 | 150,837 |
Provide a correct Python 3 solution for this coding contest problem.
Mr. Matsudaira is always careful about eco-friendliness in his life. Last month's water charge was 4280 yen, which exceeded the usual target of 4000 yen, so we have been trying to save water this month. How much have you saved on your water bill comp... | instruction | 0 | 75,798 | 10 | 151,596 |
"Correct Solution:
```
pre = 4280
v = [0,125,140,160]
while True:
w = int(input())
if w == -1:break
s= 1150
amari = w
for i in reversed(range(1,4)):
if amari > i*10:
spam = amari - i*10
s += spam * v[i]
amari = i*10
print (pre - s)
``` | output | 1 | 75,798 | 10 | 151,597 |
Provide a correct Python 3 solution for this coding contest problem.
Mr. Matsudaira is always careful about eco-friendliness in his life. Last month's water charge was 4280 yen, which exceeded the usual target of 4000 yen, so we have been trying to save water this month. How much have you saved on your water bill comp... | instruction | 0 | 75,799 | 10 | 151,598 |
"Correct Solution:
```
def water_charges(w):
progressive_rate = {
(float('inf'),30):160,
(30,20):140,
(20,10):125,
(10, 0):0}
charge = basic_charge = 1150
for (upper, lower), rate in progressive_rate.items():
usage = min(w, upper) - lower
if 0 <... | output | 1 | 75,799 | 10 | 151,599 |
Provide a correct Python 3 solution for this coding contest problem.
Mr. Matsudaira is always careful about eco-friendliness in his life. Last month's water charge was 4280 yen, which exceeded the usual target of 4000 yen, so we have been trying to save water this month. How much have you saved on your water bill comp... | instruction | 0 | 75,800 | 10 | 151,600 |
"Correct Solution:
```
def f(w):
if w <= 10:
return 4280 - 1150
elif w <= 20:
return 4280 - (1150 + f1(w - 10))
elif w <= 30:
return 4280 - (1150 + f1(10) + f2(w - 20))
else:
return 4280 - (1150 + f1(10) + f2(10) + f3(w - 30))
def f1(x):
return x * 125
def f2(x):
... | output | 1 | 75,800 | 10 | 151,601 |
Provide a correct Python 3 solution for this coding contest problem.
Mr. Matsudaira is always careful about eco-friendliness in his life. Last month's water charge was 4280 yen, which exceeded the usual target of 4000 yen, so we have been trying to save water this month. How much have you saved on your water bill comp... | instruction | 0 | 75,801 | 10 | 151,602 |
"Correct Solution:
```
while 1 :
n=int(input())
if n==-1:
break
else:
if n<=10:
w=1150
elif 10<n<=20:
w=1150+(n-10)*125
elif 20<n<=30:
w=2400+(n-20)*140
else:
w=3800+(n-30)*160
print(4280-w)
``` | output | 1 | 75,801 | 10 | 151,603 |
Provide a correct Python 3 solution for this coding contest problem.
Mr. Matsudaira is always careful about eco-friendliness in his life. Last month's water charge was 4280 yen, which exceeded the usual target of 4000 yen, so we have been trying to save water this month. How much have you saved on your water bill comp... | instruction | 0 | 75,802 | 10 | 151,604 |
"Correct Solution:
```
while True:
n=int(input())
if n==-1:
break
a=4280
b=1150
if n<=10:
print(a-b)
elif 10<n<=20:
print(a-(b+(n-10)*125))
elif 20<n<=30:
print(a-(b+1250+(n-20)*140))
else:
print(a-(b+1250+1400+(n-30)*160))
``` | output | 1 | 75,802 | 10 | 151,605 |
Provide a correct Python 3 solution for this coding contest problem.
Mr. Matsudaira is always careful about eco-friendliness in his life. Last month's water charge was 4280 yen, which exceeded the usual target of 4000 yen, so we have been trying to save water this month. How much have you saved on your water bill comp... | instruction | 0 | 75,803 | 10 | 151,606 |
"Correct Solution:
```
# -*- coding: utf-8 -*-
"""
Cutting Down Water Bills
http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0216
"""
import sys
def solve(w):
ans = 1150
if w > 10:
ans += 125 * min(10, (w-10))
if w > 20:
ans += 140 * min(10, (w-20))
if w > 30:
ans += 1... | output | 1 | 75,803 | 10 | 151,607 |
Provide a correct Python 3 solution for this coding contest problem.
Mr. Matsudaira is always careful about eco-friendliness in his life. Last month's water charge was 4280 yen, which exceeded the usual target of 4000 yen, so we have been trying to save water this month. How much have you saved on your water bill comp... | instruction | 0 | 75,804 | 10 | 151,608 |
"Correct Solution:
```
while True:
w = int(input())
if w==-1: break
if w <= 10:
mon = 1150
elif 10 < w <= 20:
mon = 1150 + (w-10)*125
elif 20 < w <= 30:
mon = 1150 + 1250 +(w-20)*140
else:
mon = 1150 + 1250 + 1400 +(w-30)*160
print(4280-mon)
``` | output | 1 | 75,804 | 10 | 151,609 |
Provide a correct Python 3 solution for this coding contest problem.
Mr. Matsudaira is always careful about eco-friendliness in his life. Last month's water charge was 4280 yen, which exceeded the usual target of 4000 yen, so we have been trying to save water this month. How much have you saved on your water bill comp... | instruction | 0 | 75,805 | 10 | 151,610 |
"Correct Solution:
```
# AOJ 0216 Cutting Down Water Bills
# Python3 2018.6.23 bal4u
while 1:
w = int(input())
if w < 0: break
s = 1150
if w > 10:
if w <= 20: s+= (w-10)*125
else: s += 1250
if w > 20:
if w <= 30: s += (w-20)*140
else: s += 1400
if w > 30: s += (w-30)*160;
print(4280-s)
``` | output | 1 | 75,805 | 10 | 151,611 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Mr. Matsudaira is always careful about eco-friendliness in his life. Last month's water charge was 4280 yen, which exceeded the usual target of 4000 yen, so we have been trying to save water thi... | instruction | 0 | 75,806 | 10 | 151,612 |
Yes | output | 1 | 75,806 | 10 | 151,613 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Mr. Matsudaira is always careful about eco-friendliness in his life. Last month's water charge was 4280 yen, which exceeded the usual target of 4000 yen, so we have been trying to save water thi... | instruction | 0 | 75,807 | 10 | 151,614 |
Yes | output | 1 | 75,807 | 10 | 151,615 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Mr. Matsudaira is always careful about eco-friendliness in his life. Last month's water charge was 4280 yen, which exceeded the usual target of 4000 yen, so we have been trying to save water thi... | instruction | 0 | 75,808 | 10 | 151,616 |
Yes | output | 1 | 75,808 | 10 | 151,617 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Mr. Matsudaira is always careful about eco-friendliness in his life. Last month's water charge was 4280 yen, which exceeded the usual target of 4000 yen, so we have been trying to save water thi... | instruction | 0 | 75,809 | 10 | 151,618 |
Yes | output | 1 | 75,809 | 10 | 151,619 |
Provide tags and a correct Python 3 solution for this coding contest problem.
You got a job as a marketer in a pet shop, and your current task is to boost sales of cat food. One of the strategies is to sell cans of food in packs with discounts.
Suppose you decided to sell packs with a cans in a pack with a discount ... | instruction | 0 | 76,072 | 10 | 152,144 |
Tags: brute force, constructive algorithms, greedy, math
Correct Solution:
```
import sys
#import math
#from queue import *
#import random
#sys.setrecursionlimit(int(1e6))
input = sys.stdin.readline
############ ---- USER DEFINED INPUT FUNCTIONS ---- ############
def inp():
return(int(input()))
def inara():
r... | output | 1 | 76,072 | 10 | 152,145 |
Provide tags and a correct Python 3 solution for this coding contest problem.
You got a job as a marketer in a pet shop, and your current task is to boost sales of cat food. One of the strategies is to sell cans of food in packs with discounts.
Suppose you decided to sell packs with a cans in a pack with a discount ... | instruction | 0 | 76,073 | 10 | 152,146 |
Tags: brute force, constructive algorithms, greedy, math
Correct Solution:
```
N=int(input())
l=[]
r=[]
ans=[]
for i in range(N):
t=list(map(int, input().split()))
if 2*t[0]>t[1]:
ans.append("YES")
else:
ans.append("NO")
for i in ans:
print (i)
``` | output | 1 | 76,073 | 10 | 152,147 |
Provide tags and a correct Python 3 solution for this coding contest problem.
You got a job as a marketer in a pet shop, and your current task is to boost sales of cat food. One of the strategies is to sell cans of food in packs with discounts.
Suppose you decided to sell packs with a cans in a pack with a discount ... | instruction | 0 | 76,074 | 10 | 152,148 |
Tags: brute force, constructive algorithms, greedy, math
Correct Solution:
```
for _ in range(int(input())):
l,r=map(int,input().split())
if(2*l>r):
print('YES')
else:
print('NO')
``` | output | 1 | 76,074 | 10 | 152,149 |
Provide tags and a correct Python 3 solution for this coding contest problem.
You got a job as a marketer in a pet shop, and your current task is to boost sales of cat food. One of the strategies is to sell cans of food in packs with discounts.
Suppose you decided to sell packs with a cans in a pack with a discount ... | instruction | 0 | 76,075 | 10 | 152,150 |
Tags: brute force, constructive algorithms, greedy, math
Correct Solution:
```
t = int(input())
for _ in range(t):
l, r = map(int, input().split())
if 2*l-r > 0:
print("YES")
else:
print("NO")
``` | output | 1 | 76,075 | 10 | 152,151 |
Provide tags and a correct Python 3 solution for this coding contest problem.
You got a job as a marketer in a pet shop, and your current task is to boost sales of cat food. One of the strategies is to sell cans of food in packs with discounts.
Suppose you decided to sell packs with a cans in a pack with a discount ... | instruction | 0 | 76,076 | 10 | 152,152 |
Tags: brute force, constructive algorithms, greedy, math
Correct Solution:
```
from math import *
sInt = lambda: int(input())
mInt = lambda: map(int, input().split())
lInt = lambda: list(map(int, input().split()))
t = sInt()
for _ in range(t):
l,r = mInt()
if l<=r//2:
print("NO")
else:
pri... | output | 1 | 76,076 | 10 | 152,153 |
Provide tags and a correct Python 3 solution for this coding contest problem.
You got a job as a marketer in a pet shop, and your current task is to boost sales of cat food. One of the strategies is to sell cans of food in packs with discounts.
Suppose you decided to sell packs with a cans in a pack with a discount ... | instruction | 0 | 76,077 | 10 | 152,154 |
Tags: brute force, constructive algorithms, greedy, math
Correct Solution:
```
n = int(input())
for i in range(n):
l, r = map(int, input().split())
if 2*l > r:
print("YES")
else:
print("NO")
``` | output | 1 | 76,077 | 10 | 152,155 |
Provide tags and a correct Python 3 solution for this coding contest problem.
You got a job as a marketer in a pet shop, and your current task is to boost sales of cat food. One of the strategies is to sell cans of food in packs with discounts.
Suppose you decided to sell packs with a cans in a pack with a discount ... | instruction | 0 | 76,078 | 10 | 152,156 |
Tags: brute force, constructive algorithms, greedy, math
Correct Solution:
```
for _ in range(int(input())):
a, b = map(int, input().split())
print("YES" if b-a < a else 'NO')
``` | output | 1 | 76,078 | 10 | 152,157 |
Provide tags and a correct Python 3 solution for this coding contest problem.
You got a job as a marketer in a pet shop, and your current task is to boost sales of cat food. One of the strategies is to sell cans of food in packs with discounts.
Suppose you decided to sell packs with a cans in a pack with a discount ... | instruction | 0 | 76,079 | 10 | 152,158 |
Tags: brute force, constructive algorithms, greedy, math
Correct Solution:
```
for t in range(int(input())):
l,r = map(int,input().split())
print('YES' if l*2>r else 'NO')
``` | output | 1 | 76,079 | 10 | 152,159 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You got a job as a marketer in a pet shop, and your current task is to boost sales of cat food. One of the strategies is to sell cans of food in packs with discounts.
Suppose you decided to se... | instruction | 0 | 76,080 | 10 | 152,160 |
Yes | output | 1 | 76,080 | 10 | 152,161 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You got a job as a marketer in a pet shop, and your current task is to boost sales of cat food. One of the strategies is to sell cans of food in packs with discounts.
Suppose you decided to se... | instruction | 0 | 76,081 | 10 | 152,162 |
Yes | output | 1 | 76,081 | 10 | 152,163 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You got a job as a marketer in a pet shop, and your current task is to boost sales of cat food. One of the strategies is to sell cans of food in packs with discounts.
Suppose you decided to se... | instruction | 0 | 76,082 | 10 | 152,164 |
Yes | output | 1 | 76,082 | 10 | 152,165 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You got a job as a marketer in a pet shop, and your current task is to boost sales of cat food. One of the strategies is to sell cans of food in packs with discounts.
Suppose you decided to se... | instruction | 0 | 76,083 | 10 | 152,166 |
Yes | output | 1 | 76,083 | 10 | 152,167 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You got a job as a marketer in a pet shop, and your current task is to boost sales of cat food. One of the strategies is to sell cans of food in packs with discounts.
Suppose you decided to se... | instruction | 0 | 76,084 | 10 | 152,168 |
No | output | 1 | 76,084 | 10 | 152,169 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You got a job as a marketer in a pet shop, and your current task is to boost sales of cat food. One of the strategies is to sell cans of food in packs with discounts.
Suppose you decided to se... | instruction | 0 | 76,085 | 10 | 152,170 |
No | output | 1 | 76,085 | 10 | 152,171 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You got a job as a marketer in a pet shop, and your current task is to boost sales of cat food. One of the strategies is to sell cans of food in packs with discounts.
Suppose you decided to se... | instruction | 0 | 76,086 | 10 | 152,172 |
No | output | 1 | 76,086 | 10 | 152,173 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You got a job as a marketer in a pet shop, and your current task is to boost sales of cat food. One of the strategies is to sell cans of food in packs with discounts.
Suppose you decided to se... | instruction | 0 | 76,087 | 10 | 152,174 |
No | output | 1 | 76,087 | 10 | 152,175 |
Provide a correct Python 3 solution for this coding contest problem.
E869120 has A 1-yen coins and infinitely many 500-yen coins.
Determine if he can pay exactly N yen using only these coins.
Constraints
* N is an integer between 1 and 10000 (inclusive).
* A is an integer between 0 and 1000 (inclusive).
Input
Inpu... | instruction | 0 | 76,543 | 10 | 153,086 |
"Correct Solution:
```
def main():
print('YNeos'[int(input()) % 500 > int(input())::2])
main()
``` | output | 1 | 76,543 | 10 | 153,087 |
Provide a correct Python 3 solution for this coding contest problem.
E869120 has A 1-yen coins and infinitely many 500-yen coins.
Determine if he can pay exactly N yen using only these coins.
Constraints
* N is an integer between 1 and 10000 (inclusive).
* A is an integer between 0 and 1000 (inclusive).
Input
Inpu... | instruction | 0 | 76,544 | 10 | 153,088 |
"Correct Solution:
```
n=int(input())
a=int(input())
print(['No','Yes'][n-(n//500)/(1/500)-a<=0])
``` | output | 1 | 76,544 | 10 | 153,089 |
Provide a correct Python 3 solution for this coding contest problem.
E869120 has A 1-yen coins and infinitely many 500-yen coins.
Determine if he can pay exactly N yen using only these coins.
Constraints
* N is an integer between 1 and 10000 (inclusive).
* A is an integer between 0 and 1000 (inclusive).
Input
Inpu... | instruction | 0 | 76,545 | 10 | 153,090 |
"Correct Solution:
```
N = int(input())
A = int(input())
print("Yes" if (A >= N % 500) else "No")
``` | output | 1 | 76,545 | 10 | 153,091 |
Provide a correct Python 3 solution for this coding contest problem.
E869120 has A 1-yen coins and infinitely many 500-yen coins.
Determine if he can pay exactly N yen using only these coins.
Constraints
* N is an integer between 1 and 10000 (inclusive).
* A is an integer between 0 and 1000 (inclusive).
Input
Inpu... | instruction | 0 | 76,546 | 10 | 153,092 |
"Correct Solution:
```
n=int(input())
a=int(input())
print(("No","Yes")[n%500<=a])
``` | output | 1 | 76,546 | 10 | 153,093 |
Provide a correct Python 3 solution for this coding contest problem.
E869120 has A 1-yen coins and infinitely many 500-yen coins.
Determine if he can pay exactly N yen using only these coins.
Constraints
* N is an integer between 1 and 10000 (inclusive).
* A is an integer between 0 and 1000 (inclusive).
Input
Inpu... | instruction | 0 | 76,547 | 10 | 153,094 |
"Correct Solution:
```
n = int(input())
a = int(input())
print("Yes" if n%500 <= a else "No")
``` | output | 1 | 76,547 | 10 | 153,095 |
Provide a correct Python 3 solution for this coding contest problem.
E869120 has A 1-yen coins and infinitely many 500-yen coins.
Determine if he can pay exactly N yen using only these coins.
Constraints
* N is an integer between 1 and 10000 (inclusive).
* A is an integer between 0 and 1000 (inclusive).
Input
Inpu... | instruction | 0 | 76,548 | 10 | 153,096 |
"Correct Solution:
```
n = int(input())
a = int(input())
print('Yes' if n %500 <= a else 'No')
``` | output | 1 | 76,548 | 10 | 153,097 |
Provide a correct Python 3 solution for this coding contest problem.
E869120 has A 1-yen coins and infinitely many 500-yen coins.
Determine if he can pay exactly N yen using only these coins.
Constraints
* N is an integer between 1 and 10000 (inclusive).
* A is an integer between 0 and 1000 (inclusive).
Input
Inpu... | instruction | 0 | 76,549 | 10 | 153,098 |
"Correct Solution:
```
n=int(input())
print("No" if n%500>int(input()) else "Yes")
``` | output | 1 | 76,549 | 10 | 153,099 |
Provide a correct Python 3 solution for this coding contest problem.
E869120 has A 1-yen coins and infinitely many 500-yen coins.
Determine if he can pay exactly N yen using only these coins.
Constraints
* N is an integer between 1 and 10000 (inclusive).
* A is an integer between 0 and 1000 (inclusive).
Input
Inpu... | instruction | 0 | 76,550 | 10 | 153,100 |
"Correct Solution:
```
N = int(input()) % 500
A = int(input())
print('Yes' if A >= N else 'No')
``` | output | 1 | 76,550 | 10 | 153,101 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
E869120 has A 1-yen coins and infinitely many 500-yen coins.
Determine if he can pay exactly N yen using only these coins.
Constraints
* N is an integer between 1 and 10000 (inclusive).
* A is... | instruction | 0 | 76,551 | 10 | 153,102 |
Yes | output | 1 | 76,551 | 10 | 153,103 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
E869120 has A 1-yen coins and infinitely many 500-yen coins.
Determine if he can pay exactly N yen using only these coins.
Constraints
* N is an integer between 1 and 10000 (inclusive).
* A is... | instruction | 0 | 76,552 | 10 | 153,104 |
Yes | output | 1 | 76,552 | 10 | 153,105 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
E869120 has A 1-yen coins and infinitely many 500-yen coins.
Determine if he can pay exactly N yen using only these coins.
Constraints
* N is an integer between 1 and 10000 (inclusive).
* A is... | instruction | 0 | 76,553 | 10 | 153,106 |
Yes | output | 1 | 76,553 | 10 | 153,107 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
E869120 has A 1-yen coins and infinitely many 500-yen coins.
Determine if he can pay exactly N yen using only these coins.
Constraints
* N is an integer between 1 and 10000 (inclusive).
* A is... | instruction | 0 | 76,554 | 10 | 153,108 |
Yes | output | 1 | 76,554 | 10 | 153,109 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
E869120 has A 1-yen coins and infinitely many 500-yen coins.
Determine if he can pay exactly N yen using only these coins.
Constraints
* N is an integer between 1 and 10000 (inclusive).
* A is... | instruction | 0 | 76,555 | 10 | 153,110 |
No | output | 1 | 76,555 | 10 | 153,111 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
E869120 has A 1-yen coins and infinitely many 500-yen coins.
Determine if he can pay exactly N yen using only these coins.
Constraints
* N is an integer between 1 and 10000 (inclusive).
* A is... | instruction | 0 | 76,556 | 10 | 153,112 |
No | output | 1 | 76,556 | 10 | 153,113 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
E869120 has A 1-yen coins and infinitely many 500-yen coins.
Determine if he can pay exactly N yen using only these coins.
Constraints
* N is an integer between 1 and 10000 (inclusive).
* A is... | instruction | 0 | 76,557 | 10 | 153,114 |
No | output | 1 | 76,557 | 10 | 153,115 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
E869120 has A 1-yen coins and infinitely many 500-yen coins.
Determine if he can pay exactly N yen using only these coins.
Constraints
* N is an integer between 1 and 10000 (inclusive).
* A is... | instruction | 0 | 76,558 | 10 | 153,116 |
No | output | 1 | 76,558 | 10 | 153,117 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Tenten runs a weapon shop for ninjas. Today she is willing to sell n shurikens which cost 1, 2, ..., n ryo (local currency). During a day, Tenten will place the shurikens onto the showcase, which is empty at the beginning of the day. Her job... | instruction | 0 | 76,904 | 10 | 153,808 |
Tags: data structures, greedy, implementation
Correct Solution:
```
import sys
readline = sys.stdin.readline
from heapq import heappop as hpp, heappush as hp
N = int(readline())
ev = [None]*(2*N)
pl = []
ans = 'YES'
for i in range(2*N):
s = readline().strip()
if s[0] == '+':
pl.append(i)
else:
... | output | 1 | 76,904 | 10 | 153,809 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Tenten runs a weapon shop for ninjas. Today she is willing to sell n shurikens which cost 1, 2, ..., n ryo (local currency). During a day, Tenten will place the shurikens onto the showcase, which is empty at the beginning of the day. Her job... | instruction | 0 | 76,905 | 10 | 153,810 |
Tags: data structures, greedy, implementation
Correct Solution:
```
import sys, io, os
BUFSIZE = 8192
class FastIO(io.IOBase):
newlines = 0
def __init__(self, file):
self._fd = file.fileno()
self.buffer = io.BytesIO()
self.writable = "x" in file.mode or "r" not in file.mode
... | output | 1 | 76,905 | 10 | 153,811 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Tenten runs a weapon shop for ninjas. Today she is willing to sell n shurikens which cost 1, 2, ..., n ryo (local currency). During a day, Tenten will place the shurikens onto the showcase, which is empty at the beginning of the day. Her job... | instruction | 0 | 76,906 | 10 | 153,812 |
Tags: data structures, greedy, implementation
Correct Solution:
```
mod = 1000000007
eps = 10**-9
def main():
import sys
from heapq import heappush, heappop
input = sys.stdin.readline
N = int(input())
ev = []
for _ in range(2*N):
line = list(input().split())
ev.append(line)
... | output | 1 | 76,906 | 10 | 153,813 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.