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. This is the easy version of this problem. The only difference is the constraint on k — the number of gifts in the offer. In this version: k=2. Vasya came to the store to buy goods for his frien...
instruction
0
93,642
10
187,284
No
output
1
93,642
10
187,285
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. This is the easy version of this problem. The only difference is the constraint on k — the number of gifts in the offer. In this version: k=2. Vasya came to the store to buy goods for his frien...
instruction
0
93,643
10
187,286
No
output
1
93,643
10
187,287
Provide a correct Python 3 solution for this coding contest problem. Aizu is famous for its buckwheat. There are many people who make buckwheat noodles by themselves. One day, you went shopping to buy buckwheat flour. You can visit three shops, A, B and C. The amount in a bag and its unit price for each shop is deter...
instruction
0
94,304
10
188,608
"Correct Solution: ``` a=[1e4]*51 for i,j in[(2,380),(3,550),(5,850),(10,1520),(12,1870),(15,2244)]: a[i]=j for k in range(51-i): if a[k+i]>a[k]+j:a[k+i]=a[k]+j for n in iter(input,'0'):print(a[int(n)//100]) ```
output
1
94,304
10
188,609
Provide a correct Python 3 solution for this coding contest problem. Aizu is famous for its buckwheat. There are many people who make buckwheat noodles by themselves. One day, you went shopping to buy buckwheat flour. You can visit three shops, A, B and C. The amount in a bag and its unit price for each shop is deter...
instruction
0
94,305
10
188,610
"Correct Solution: ``` # AOJ 0106 Discounts of Buckwheat # Python3 2018.6.18 bal4u a = [ 2, 3, 5 ] s = [ 380, 550, 850 ] c = [ 10, 12, 15 ] f = [ 1520, 1870, 2244 ] tbl = [0]*60 def rec(i, v, cost): if i == 3: if (v <= 50 and tbl[v] == 0) or tbl[v] > cost: tbl[v] = cost return for j in range(0, 51-v, a[i]): ...
output
1
94,305
10
188,611
Provide a correct Python 3 solution for this coding contest problem. Aizu is famous for its buckwheat. There are many people who make buckwheat noodles by themselves. One day, you went shopping to buy buckwheat flour. You can visit three shops, A, B and C. The amount in a bag and its unit price for each shop is deter...
instruction
0
94,306
10
188,612
"Correct Solution: ``` while True: N = int(input()) if N==0: break ans = float('inf') for c200 in range(N//200+1): for c300 in range(N//300+1): for c500 in range(N//500+1): if 200 * c200 + c300 * 300 + c500 * 500 == N: ans = min(ans, 1520*(c200//5)+380*(c200%5)+1870*(c300//4)+550*(c300%4)+2244*(c500//...
output
1
94,306
10
188,613
Provide a correct Python 3 solution for this coding contest problem. Aizu is famous for its buckwheat. There are many people who make buckwheat noodles by themselves. One day, you went shopping to buy buckwheat flour. You can visit three shops, A, B and C. The amount in a bag and its unit price for each shop is deter...
instruction
0
94,307
10
188,614
"Correct Solution: ``` a=[1e4]*51 for i,j in[(2,380),(3,550),(5,850),(10,1520),(12,1870),(15,2244)]: a[i]=j for k in range(51-i):a[k+i]=min(a[k+i],a[k]+j) for n in iter(input,'0'):print(a[int(n)//100]) ```
output
1
94,307
10
188,615
Provide a correct Python 3 solution for this coding contest problem. Aizu is famous for its buckwheat. There are many people who make buckwheat noodles by themselves. One day, you went shopping to buy buckwheat flour. You can visit three shops, A, B and C. The amount in a bag and its unit price for each shop is deter...
instruction
0
94,308
10
188,616
"Correct Solution: ``` P = [2, 10, 3, 12, 5, 15] Q = [380, 1520, 550, 1870, 850, 2244] L = 50 R = [0] + [1e9]*L for p, q in zip(P, Q): for i in range(L-p+1): R[i+p] = min(R[i+p], R[i] + q) while 1: v = int(input()) if v == 0: break print(R[v//100]) ```
output
1
94,308
10
188,617
Provide a correct Python 3 solution for this coding contest problem. Aizu is famous for its buckwheat. There are many people who make buckwheat noodles by themselves. One day, you went shopping to buy buckwheat flour. You can visit three shops, A, B and C. The amount in a bag and its unit price for each shop is deter...
instruction
0
94,309
10
188,618
"Correct Solution: ``` while True: n = int(input()) if n == 0: break c = 10000 for i in range(n//500+1): n1 = n - 500*i c1 = (850*3*0.88)*(i//3)+850*(i%3) for j in range(n1//300+1): n2 = n1 - 300*j if n2 % 200 == 0: k = n2 // 200 c2 = c1 + (550*4*0.85)*(j//4)+550*(j%...
output
1
94,309
10
188,619
Provide a correct Python 3 solution for this coding contest problem. Aizu is famous for its buckwheat. There are many people who make buckwheat noodles by themselves. One day, you went shopping to buy buckwheat flour. You can visit three shops, A, B and C. The amount in a bag and its unit price for each shop is deter...
instruction
0
94,310
10
188,620
"Correct Solution: ``` P = [2, 10, 3, 12, 5, 15] Q = [380, 1520, 550, 1870, 850, 2244] MAX = 50 Range = [0] + [1000000] * MAX for p, q in zip(P, Q): for i in range(MAX - p + 1): Range[i + p] = min(Range[i + p],Range[i] + q) while 1: v = int(input()) if v == 0: break print(Range[v // 100...
output
1
94,310
10
188,621
Provide a correct Python 3 solution for this coding contest problem. Aizu is famous for its buckwheat. There are many people who make buckwheat noodles by themselves. One day, you went shopping to buy buckwheat flour. You can visit three shops, A, B and C. The amount in a bag and its unit price for each shop is deter...
instruction
0
94,311
10
188,622
"Correct Solution: ``` def calc(A, B, C): da = A // 5 na = A % 5 db = B // 4 nb = B % 4 dc = C // 3 nc = C % 3 return da*1520 + na*380 + db*1870 + nb*550 + dc*2244 + nc*850 def f(a, b, c, g): if g == 0: return calc(a, b, c) if g < 0: return 10000000 return min(f...
output
1
94,311
10
188,623
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Aizu is famous for its buckwheat. There are many people who make buckwheat noodles by themselves. One day, you went shopping to buy buckwheat flour. You can visit three shops, A, B and C. The a...
instruction
0
94,312
10
188,624
Yes
output
1
94,312
10
188,625
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Aizu is famous for its buckwheat. There are many people who make buckwheat noodles by themselves. One day, you went shopping to buy buckwheat flour. You can visit three shops, A, B and C. The a...
instruction
0
94,313
10
188,626
Yes
output
1
94,313
10
188,627
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Aizu is famous for its buckwheat. There are many people who make buckwheat noodles by themselves. One day, you went shopping to buy buckwheat flour. You can visit three shops, A, B and C. The a...
instruction
0
94,314
10
188,628
Yes
output
1
94,314
10
188,629
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Aizu is famous for its buckwheat. There are many people who make buckwheat noodles by themselves. One day, you went shopping to buy buckwheat flour. You can visit three shops, A, B and C. The a...
instruction
0
94,315
10
188,630
Yes
output
1
94,315
10
188,631
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Aizu is famous for its buckwheat. There are many people who make buckwheat noodles by themselves. One day, you went shopping to buy buckwheat flour. You can visit three shops, A, B and C. The a...
instruction
0
94,316
10
188,632
No
output
1
94,316
10
188,633
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Aizu is famous for its buckwheat. There are many people who make buckwheat noodles by themselves. One day, you went shopping to buy buckwheat flour. You can visit three shops, A, B and C. The a...
instruction
0
94,317
10
188,634
No
output
1
94,317
10
188,635
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Aizu is famous for its buckwheat. There are many people who make buckwheat noodles by themselves. One day, you went shopping to buy buckwheat flour. You can visit three shops, A, B and C. The a...
instruction
0
94,318
10
188,636
No
output
1
94,318
10
188,637
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Aizu is famous for its buckwheat. There are many people who make buckwheat noodles by themselves. One day, you went shopping to buy buckwheat flour. You can visit three shops, A, B and C. The a...
instruction
0
94,319
10
188,638
No
output
1
94,319
10
188,639
Provide a correct Python 3 solution for this coding contest problem. Interest rates are attached to the money deposited in banks, and the calculation method and interest rates vary from bank to bank. The combination of interest and principal is called principal and interest, but as a method of calculating principal an...
instruction
0
94,320
10
188,640
"Correct Solution: ``` while True: n = int(input()) if n == 0: break y = float(input()) id, vmax = -1, 0 for i in range(n): b, r, t = map(int, input().split()) if t == 1: m = y*(r/100)+1 else: m = (r/100+1)**y if id < 0 or m >= vmax: id, vmax = b, m print(id) `...
output
1
94,320
10
188,641
Provide a correct Python 3 solution for this coding contest problem. Interest rates are attached to the money deposited in banks, and the calculation method and interest rates vary from bank to bank. The combination of interest and principal is called principal and interest, but as a method of calculating principal an...
instruction
0
94,321
10
188,642
"Correct Solution: ``` while True: n = int(input()) if n == 0: break y = int(input()) dataset = {} for _ in range(n): b, r, t = map(int, input().split()) dataset[b] = (1 + y * (r/100)) if t == 1 else pow((1 + r / 100), y) print(sorted(dataset.items(), key=lambda x: x[1])[-1][0]) ...
output
1
94,321
10
188,643
Provide a correct Python 3 solution for this coding contest problem. Interest rates are attached to the money deposited in banks, and the calculation method and interest rates vary from bank to bank. The combination of interest and principal is called principal and interest, but as a method of calculating principal an...
instruction
0
94,322
10
188,644
"Correct Solution: ``` while True: n = int(input()) if n == 0: break y = int(input()) money = [] for _ in range(n): a,b,c = map(int,input().split()) if c == 1: money.append([1+b/100*y,a]) else: money.append([(1+b/100)**y,a]) money.sort(reve...
output
1
94,322
10
188,645
Provide a correct Python 3 solution for this coding contest problem. Interest rates are attached to the money deposited in banks, and the calculation method and interest rates vary from bank to bank. The combination of interest and principal is called principal and interest, but as a method of calculating principal an...
instruction
0
94,323
10
188,646
"Correct Solution: ``` def simple_interest(r, y): return (100 + r * y) / 100 def compound_interest(r, y): return ((100 + r) / 100) ** y import sys import operator f = sys.stdin get_ganri = {1:simple_interest,2:compound_interest} while True: n = int(f.readline()) if n == 0: break y = int(f.r...
output
1
94,323
10
188,647
Provide a correct Python 3 solution for this coding contest problem. Interest rates are attached to the money deposited in banks, and the calculation method and interest rates vary from bank to bank. The combination of interest and principal is called principal and interest, but as a method of calculating principal an...
instruction
0
94,324
10
188,648
"Correct Solution: ``` while 1: n=int(input()) if n==0:break y=int(input()) bank_list=[] max_m=0 num_keep=0 mo=0 for i in range(n): bank_list.append(list(map(int,input().split()))) for i in bank_list: if i[2]==1: mo=1+y*i[1]/100 if i[2]==2: ...
output
1
94,324
10
188,649
Provide a correct Python 3 solution for this coding contest problem. Interest rates are attached to the money deposited in banks, and the calculation method and interest rates vary from bank to bank. The combination of interest and principal is called principal and interest, but as a method of calculating principal an...
instruction
0
94,325
10
188,650
"Correct Solution: ``` # coding: utf-8 # Your code here! while True: n = int(input()) if n == 0: break y = int(input()) b = -1 maxMoney = -1 ans = -1 for l in range(n): b,r,t = [float(i) for i in input().split()] money = -1 if t == 1: money = 1.0 ...
output
1
94,325
10
188,651
Provide a correct Python 3 solution for this coding contest problem. Interest rates are attached to the money deposited in banks, and the calculation method and interest rates vary from bank to bank. The combination of interest and principal is called principal and interest, but as a method of calculating principal an...
instruction
0
94,326
10
188,652
"Correct Solution: ``` while 1: n = int(input()) if n == 0:break y = int(input()) b = [tuple(map(int, input().split())) for _ in range(n)] p = [((1 + b[i][1] / 100 * y) if b[i][2] == 1 else ((1 + b[i][1] / 100) ** y)) for i in range(n)] print(b[p.index(max(p))][0]) ```
output
1
94,326
10
188,653
Provide a correct Python 3 solution for this coding contest problem. Interest rates are attached to the money deposited in banks, and the calculation method and interest rates vary from bank to bank. The combination of interest and principal is called principal and interest, but as a method of calculating principal an...
instruction
0
94,327
10
188,654
"Correct Solution: ``` while True: num = int(input()) if num == 0: break y = int(input()) rmax = 0 bmax = None for _ in range(num): b, r, t = [int(x) for x in input().split()] if t == 1: val = 1 + r*y/100 else: val = (1 + r/100)**y ...
output
1
94,327
10
188,655
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Interest rates are attached to the money deposited in banks, and the calculation method and interest rates vary from bank to bank. The combination of interest and principal is called principal a...
instruction
0
94,328
10
188,656
Yes
output
1
94,328
10
188,657
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Interest rates are attached to the money deposited in banks, and the calculation method and interest rates vary from bank to bank. The combination of interest and principal is called principal a...
instruction
0
94,329
10
188,658
Yes
output
1
94,329
10
188,659
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Interest rates are attached to the money deposited in banks, and the calculation method and interest rates vary from bank to bank. The combination of interest and principal is called principal a...
instruction
0
94,330
10
188,660
Yes
output
1
94,330
10
188,661
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Interest rates are attached to the money deposited in banks, and the calculation method and interest rates vary from bank to bank. The combination of interest and principal is called principal a...
instruction
0
94,331
10
188,662
Yes
output
1
94,331
10
188,663
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Interest rates are attached to the money deposited in banks, and the calculation method and interest rates vary from bank to bank. The combination of interest and principal is called principal a...
instruction
0
94,332
10
188,664
No
output
1
94,332
10
188,665
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Interest rates are attached to the money deposited in banks, and the calculation method and interest rates vary from bank to bank. The combination of interest and principal is called principal a...
instruction
0
94,333
10
188,666
No
output
1
94,333
10
188,667
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Interest rates are attached to the money deposited in banks, and the calculation method and interest rates vary from bank to bank. The combination of interest and principal is called principal a...
instruction
0
94,334
10
188,668
No
output
1
94,334
10
188,669
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Interest rates are attached to the money deposited in banks, and the calculation method and interest rates vary from bank to bank. The combination of interest and principal is called principal a...
instruction
0
94,335
10
188,670
No
output
1
94,335
10
188,671
Provide a correct Python 3 solution for this coding contest problem. Alice and Brown are brothers in a family and each receives pocket money in celebration of the coming year. They are very close and share the total amount of the money fifty-fifty. The pocket money each receives is a multiple of 1,000 yen. Write a pr...
instruction
0
95,203
10
190,406
"Correct Solution: ``` a,b=map(int,input().split()) n=(a+b)//2 #//と/の違い print(n) ```
output
1
95,203
10
190,407
Provide a correct Python 3 solution for this coding contest problem. Alice and Brown are brothers in a family and each receives pocket money in celebration of the coming year. They are very close and share the total amount of the money fifty-fifty. The pocket money each receives is a multiple of 1,000 yen. Write a pr...
instruction
0
95,204
10
190,408
"Correct Solution: ``` a,b=map(int,input().split()) s=int((a+b)/2) print(s) ```
output
1
95,204
10
190,409
Provide a correct Python 3 solution for this coding contest problem. Alice and Brown are brothers in a family and each receives pocket money in celebration of the coming year. They are very close and share the total amount of the money fifty-fifty. The pocket money each receives is a multiple of 1,000 yen. Write a pr...
instruction
0
95,205
10
190,410
"Correct Solution: ``` a,b=(int(x) for x in input().split()) print((a+b)//2) ```
output
1
95,205
10
190,411
Provide a correct Python 3 solution for this coding contest problem. Alice and Brown are brothers in a family and each receives pocket money in celebration of the coming year. They are very close and share the total amount of the money fifty-fifty. The pocket money each receives is a multiple of 1,000 yen. Write a pr...
instruction
0
95,206
10
190,412
"Correct Solution: ``` a , b , = map(int , input() . split()) c = (a + b) / 2 print(int(c)) ```
output
1
95,206
10
190,413
Provide a correct Python 3 solution for this coding contest problem. Alice and Brown are brothers in a family and each receives pocket money in celebration of the coming year. They are very close and share the total amount of the money fifty-fifty. The pocket money each receives is a multiple of 1,000 yen. Write a pr...
instruction
0
95,207
10
190,414
"Correct Solution: ``` # coding=utf-8 a, b = map(int, input().split()) print((a+b)//2) ```
output
1
95,207
10
190,415
Provide a correct Python 3 solution for this coding contest problem. Alice and Brown are brothers in a family and each receives pocket money in celebration of the coming year. They are very close and share the total amount of the money fifty-fifty. The pocket money each receives is a multiple of 1,000 yen. Write a pr...
instruction
0
95,208
10
190,416
"Correct Solution: ``` # coding: utf-8 # Your code here! a,b=map(int,input().split()) print(int((a+b)/2)) ```
output
1
95,208
10
190,417
Provide a correct Python 3 solution for this coding contest problem. Alice and Brown are brothers in a family and each receives pocket money in celebration of the coming year. They are very close and share the total amount of the money fifty-fifty. The pocket money each receives is a multiple of 1,000 yen. Write a pr...
instruction
0
95,209
10
190,418
"Correct Solution: ``` a,b=map(int,input().split()) print(round((a+b)/2)) ```
output
1
95,209
10
190,419
Provide a correct Python 3 solution for this coding contest problem. Alice and Brown are brothers in a family and each receives pocket money in celebration of the coming year. They are very close and share the total amount of the money fifty-fifty. The pocket money each receives is a multiple of 1,000 yen. Write a pr...
instruction
0
95,210
10
190,420
"Correct Solution: ``` a, b = [int(x) for x in input().split()] print((a+b)//2) ```
output
1
95,210
10
190,421
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Alice and Brown are brothers in a family and each receives pocket money in celebration of the coming year. They are very close and share the total amount of the money fifty-fifty. The pocket mon...
instruction
0
95,211
10
190,422
Yes
output
1
95,211
10
190,423
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Alice and Brown are brothers in a family and each receives pocket money in celebration of the coming year. They are very close and share the total amount of the money fifty-fifty. The pocket mon...
instruction
0
95,212
10
190,424
Yes
output
1
95,212
10
190,425
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Alice and Brown are brothers in a family and each receives pocket money in celebration of the coming year. They are very close and share the total amount of the money fifty-fifty. The pocket mon...
instruction
0
95,213
10
190,426
Yes
output
1
95,213
10
190,427
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Alice and Brown are brothers in a family and each receives pocket money in celebration of the coming year. They are very close and share the total amount of the money fifty-fifty. The pocket mon...
instruction
0
95,214
10
190,428
Yes
output
1
95,214
10
190,429
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Alice and Brown are brothers in a family and each receives pocket money in celebration of the coming year. They are very close and share the total amount of the money fifty-fifty. The pocket mon...
instruction
0
95,215
10
190,430
No
output
1
95,215
10
190,431
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Alice and Brown are brothers in a family and each receives pocket money in celebration of the coming year. They are very close and share the total amount of the money fifty-fifty. The pocket mon...
instruction
0
95,216
10
190,432
No
output
1
95,216
10
190,433
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Alice and Brown are brothers in a family and each receives pocket money in celebration of the coming year. They are very close and share the total amount of the money fifty-fifty. The pocket mon...
instruction
0
95,217
10
190,434
No
output
1
95,217
10
190,435
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Alice and Brown are brothers in a family and each receives pocket money in celebration of the coming year. They are very close and share the total amount of the money fifty-fifty. The pocket mon...
instruction
0
95,218
10
190,436
No
output
1
95,218
10
190,437