message stringlengths 2 20.1k | message_type stringclasses 2
values | message_id int64 0 1 | conversation_id int64 1.95k 109k | cluster float64 17 17 | __index_level_0__ int64 3.91k 217k |
|---|---|---|---|---|---|
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
problem
N students from JOI High School are lined up in a row from east to west. The i-th student from the western end of the column is student i. Each student has a bib with one integer. Initi... | instruction | 0 | 48,739 | 17 | 97,478 |
No | output | 1 | 48,739 | 17 | 97,479 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
problem
N students from JOI High School are lined up in a row from east to west. The i-th student from the western end of the column is student i. Each student has a bib with one integer. Initi... | instruction | 0 | 48,740 | 17 | 97,480 |
No | output | 1 | 48,740 | 17 | 97,481 |
Provide tags and a correct Python 3 solution for this coding contest problem.
At the beginning of the school year Berland State University starts two city school programming groups, for beginners and for intermediate coders. The children were tested in order to sort them into groups. According to the results, each stu... | instruction | 0 | 49,160 | 17 | 98,320 |
Tags: brute force, greedy, implementation
Correct Solution:
```
m = int(input())
c = list(map(int, input().rstrip().split()))
x, y = map(int, input().rstrip().split())
s = sum(c)
low = 0
high = s
for i in range(m):
low += c[i]
high -= c[i]
if low >= x and high <= y and low <= y and high >= x:
print(... | output | 1 | 49,160 | 17 | 98,321 |
Provide tags and a correct Python 3 solution for this coding contest problem.
At the beginning of the school year Berland State University starts two city school programming groups, for beginners and for intermediate coders. The children were tested in order to sort them into groups. According to the results, each stu... | instruction | 0 | 49,161 | 17 | 98,322 |
Tags: brute force, greedy, implementation
Correct Solution:
```
m = int(input())
c = list(map(int, input().split()))
x, y = map(int, input().split())
s = sum(c)
x, y = max(x, s - y), min(y, s - x)
i, q = 0, 0
while i < m and q < x:
q += c[i]
i += 1
print(0 if q > y else i + 1)
``` | output | 1 | 49,161 | 17 | 98,323 |
Provide tags and a correct Python 3 solution for this coding contest problem.
At the beginning of the school year Berland State University starts two city school programming groups, for beginners and for intermediate coders. The children were tested in order to sort them into groups. According to the results, each stu... | instruction | 0 | 49,162 | 17 | 98,324 |
Tags: brute force, greedy, implementation
Correct Solution:
```
m = int(input())
c = list(map(int,input().split()))
x, y = map(int,input().split())
for i in range(m):
sb = sum(c[:-i-1])
si = sum(c[-i-1:])
if x <= sb <= y:
if x <= si <= y:
print(m-i)
break
else:
print(0)
``` | output | 1 | 49,162 | 17 | 98,325 |
Provide tags and a correct Python 3 solution for this coding contest problem.
At the beginning of the school year Berland State University starts two city school programming groups, for beginners and for intermediate coders. The children were tested in order to sort them into groups. According to the results, each stu... | instruction | 0 | 49,163 | 17 | 98,326 |
Tags: brute force, greedy, implementation
Correct Solution:
```
m = int(input())
c = [int(x) for x in input().split()]
x, y = (int(x) for x in input().split())
cur = 0
tot = sum(c)
for i, ci in enumerate(c):
cur += ci
if cur >= x and cur <= y and tot - cur >= x and tot - cur <= y:
print(i + 2)
e... | output | 1 | 49,163 | 17 | 98,327 |
Provide tags and a correct Python 3 solution for this coding contest problem.
At the beginning of the school year Berland State University starts two city school programming groups, for beginners and for intermediate coders. The children were tested in order to sort them into groups. According to the results, each stu... | instruction | 0 | 49,164 | 17 | 98,328 |
Tags: brute force, greedy, implementation
Correct Solution:
```
def readln():
return tuple(map(int, input().split()))
m, = readln()
c = readln()
x, y = readln()
for k in range(1, m):
if x <= sum(c[:k]) <= y and x <= sum(c[k:]) <= y:
print(k + 1)
break
else:
print(0)
``` | output | 1 | 49,164 | 17 | 98,329 |
Provide tags and a correct Python 3 solution for this coding contest problem.
At the beginning of the school year Berland State University starts two city school programming groups, for beginners and for intermediate coders. The children were tested in order to sort them into groups. According to the results, each stu... | instruction | 0 | 49,165 | 17 | 98,330 |
Tags: brute force, greedy, implementation
Correct Solution:
```
n=int(input())
marks=[int(i) for i in input().split()]
x,y=map(int,input().split())
sm=0
f=0
tot=sum(marks)
for i in range(n):
sm+=marks[i]
if sm>=x:
store=sm
rem=tot-sm
if rem>=x and rem<=y and sm<=y:
print(... | output | 1 | 49,165 | 17 | 98,331 |
Provide tags and a correct Python 3 solution for this coding contest problem.
At the beginning of the school year Berland State University starts two city school programming groups, for beginners and for intermediate coders. The children were tested in order to sort them into groups. According to the results, each stu... | instruction | 0 | 49,166 | 17 | 98,332 |
Tags: brute force, greedy, implementation
Correct Solution:
```
# -*- coding: utf-8 -*-
'''
======================================================================
* File Name : group.py
* Purpose :
* Creation Date : 15-10-2013
* Last Modified :
* Created By : Mario Ćesić
=======================================... | output | 1 | 49,166 | 17 | 98,333 |
Provide tags and a correct Python 3 solution for this coding contest problem.
At the beginning of the school year Berland State University starts two city school programming groups, for beginners and for intermediate coders. The children were tested in order to sort them into groups. According to the results, each stu... | instruction | 0 | 49,167 | 17 | 98,334 |
Tags: brute force, greedy, implementation
Correct Solution:
```
m = int(input())
c = list(map(int, input().split()))
x, y = map(int, input().split())
for i in range(m):
# print(sum(c[:i+1]), sum(c[i+1:]))
if x <= sum(c[:i+1]) <= y and x <= sum(c[i+1:]) <= y:
print(i+2)
exit(0)
print(0)
``` | output | 1 | 49,167 | 17 | 98,335 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
At the beginning of the school year Berland State University starts two city school programming groups, for beginners and for intermediate coders. The children were tested in order to sort them ... | instruction | 0 | 49,168 | 17 | 98,336 |
Yes | output | 1 | 49,168 | 17 | 98,337 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
At the beginning of the school year Berland State University starts two city school programming groups, for beginners and for intermediate coders. The children were tested in order to sort them ... | instruction | 0 | 49,169 | 17 | 98,338 |
Yes | output | 1 | 49,169 | 17 | 98,339 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
At the beginning of the school year Berland State University starts two city school programming groups, for beginners and for intermediate coders. The children were tested in order to sort them ... | instruction | 0 | 49,170 | 17 | 98,340 |
Yes | output | 1 | 49,170 | 17 | 98,341 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
At the beginning of the school year Berland State University starts two city school programming groups, for beginners and for intermediate coders. The children were tested in order to sort them ... | instruction | 0 | 49,171 | 17 | 98,342 |
Yes | output | 1 | 49,171 | 17 | 98,343 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
At the beginning of the school year Berland State University starts two city school programming groups, for beginners and for intermediate coders. The children were tested in order to sort them ... | instruction | 0 | 49,172 | 17 | 98,344 |
No | output | 1 | 49,172 | 17 | 98,345 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
At the beginning of the school year Berland State University starts two city school programming groups, for beginners and for intermediate coders. The children were tested in order to sort them ... | instruction | 0 | 49,173 | 17 | 98,346 |
No | output | 1 | 49,173 | 17 | 98,347 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
At the beginning of the school year Berland State University starts two city school programming groups, for beginners and for intermediate coders. The children were tested in order to sort them ... | instruction | 0 | 49,174 | 17 | 98,348 |
No | output | 1 | 49,174 | 17 | 98,349 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
At the beginning of the school year Berland State University starts two city school programming groups, for beginners and for intermediate coders. The children were tested in order to sort them ... | instruction | 0 | 49,175 | 17 | 98,350 |
No | output | 1 | 49,175 | 17 | 98,351 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Valery is a PE teacher at a school in Berland. Soon the students are going to take a test in long jumps, and Valery has lost his favorite ruler!
However, there is no reason for disappointment, as Valery has found another ruler, its length ... | instruction | 0 | 50,005 | 17 | 100,010 |
Tags: binary search, greedy, implementation
Correct Solution:
```
from collections import defaultdict
n,l,x,y = map(int,input().split())
arr = [int(x) for x in input().split()]
d = defaultdict(bool)
for i in arr:
d[i] = True
# check if already available
xs = False
ys = False
for i,v in enumerate(arr):
if(d[v+x]... | output | 1 | 50,005 | 17 | 100,011 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Valery is a PE teacher at a school in Berland. Soon the students are going to take a test in long jumps, and Valery has lost his favorite ruler!
However, there is no reason for disappointment, as Valery has found another ruler, its length ... | instruction | 0 | 50,006 | 17 | 100,012 |
Tags: binary search, greedy, implementation
Correct Solution:
```
# -*- coding: utf-8 -*-
import math
import collections
import bisect
import heapq
import time
import random
import itertools
import sys
from typing import List
"""
created by shhuan at 2020/1/13 20:48
"""
def solve(N, L, X, Y, A):
vs = set(A)
... | output | 1 | 50,006 | 17 | 100,013 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Valery is a PE teacher at a school in Berland. Soon the students are going to take a test in long jumps, and Valery has lost his favorite ruler!
However, there is no reason for disappointment, as Valery has found another ruler, its length ... | instruction | 0 | 50,007 | 17 | 100,014 |
Tags: binary search, greedy, implementation
Correct Solution:
```
n, l, x, y = map(int, input().split())
a = set(map(int, input().split()))
ok1 = ok2 = ok3 = False
for c in a:
if c + x in a:
ok1 = True
if c + y in a:
ok2 = True
if c - x > 0 and c - x + y in a:
ok3 = True
mark... | output | 1 | 50,007 | 17 | 100,015 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Valery is a PE teacher at a school in Berland. Soon the students are going to take a test in long jumps, and Valery has lost his favorite ruler!
However, there is no reason for disappointment, as Valery has found another ruler, its length ... | instruction | 0 | 50,008 | 17 | 100,016 |
Tags: binary search, greedy, implementation
Correct Solution:
```
__author__ = "zabidon"
n, l, x, y = map(int, input().split())
data = set(map(int, input().split()))
old_x = any(i + x in data for i in data)
old_y = any(i + y in data for i in data)
if old_x and old_y:
#all
print(0)
elif old_x:
#one
pr... | output | 1 | 50,008 | 17 | 100,017 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Valery is a PE teacher at a school in Berland. Soon the students are going to take a test in long jumps, and Valery has lost his favorite ruler!
However, there is no reason for disappointment, as Valery has found another ruler, its length ... | instruction | 0 | 50,009 | 17 | 100,018 |
Tags: binary search, greedy, implementation
Correct Solution:
```
from collections import defaultdict
class LongJumps():
def __init__(self, n, l, x, y, a):
self.n, self.l, self.x, self.y, self.a = n,l,x,y,a
def get_markers(self):
st = defaultdict(set)
req_pts = [self.x,self.y]
... | output | 1 | 50,009 | 17 | 100,019 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Valery is a PE teacher at a school in Berland. Soon the students are going to take a test in long jumps, and Valery has lost his favorite ruler!
However, there is no reason for disappointment, as Valery has found another ruler, its length ... | instruction | 0 | 50,010 | 17 | 100,020 |
Tags: binary search, greedy, implementation
Correct Solution:
```
if __name__ == "__main__":
n, l, x, y = list(map(int, input().split()))
v = list(map(int, input().split()))
s = set(v)
cx = 0
for i in range(n):
if v[i]+x in s:
cx = 1
break
cy = 0
for i in range(n):
if v[i]+y in s:
cy = 1
brea... | output | 1 | 50,010 | 17 | 100,021 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Valery is a PE teacher at a school in Berland. Soon the students are going to take a test in long jumps, and Valery has lost his favorite ruler!
However, there is no reason for disappointment, as Valery has found another ruler, its length ... | instruction | 0 | 50,011 | 17 | 100,022 |
Tags: binary search, greedy, implementation
Correct Solution:
```
n,l,x,y=map(int,input().split(" "))
li=list(map(int,input().split(" ",n)[:n]))
li.sort()
dic={}
a1,a2=0,0
ans=2
x1=x
y1=y
xi=-1
yi=-1
for i in li:
dic[i]=1
for i in range(n):
if li[i]-x>=0:
if li[i]-x in dic:
a1=1
... | output | 1 | 50,011 | 17 | 100,023 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Valery is a PE teacher at a school in Berland. Soon the students are going to take a test in long jumps, and Valery has lost his favorite ruler!
However, there is no reason for disappointment, as Valery has found another ruler, its length ... | instruction | 0 | 50,012 | 17 | 100,024 |
Tags: binary search, greedy, implementation
Correct Solution:
```
from collections import defaultdict as dc
def serch(a,b,x,y):
for i in range(1,n):
if (b[a[i]-x-y]):
return a[i]-y
if b[a[i]-(y-x)] and a[i]+x<=l:
return a[i]+x
... | output | 1 | 50,012 | 17 | 100,025 |
Provide tags and a correct Python 2 solution for this coding contest problem.
Valery is a PE teacher at a school in Berland. Soon the students are going to take a test in long jumps, and Valery has lost his favorite ruler!
However, there is no reason for disappointment, as Valery has found another ruler, its length ... | instruction | 0 | 50,013 | 17 | 100,026 |
Tags: binary search, greedy, implementation
Correct Solution:
```
from sys import stdin, stdout
from collections import Counter, defaultdict
from itertools import permutations, combinations
raw_input = stdin.readline
pr = stdout.write
def in_arr():
return map(int,raw_input().split())
def pr_num(n):
stdout.w... | output | 1 | 50,013 | 17 | 100,027 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Valery is a PE teacher at a school in Berland. Soon the students are going to take a test in long jumps, and Valery has lost his favorite ruler!
However, there is no reason for disappointment,... | instruction | 0 | 50,014 | 17 | 100,028 |
Yes | output | 1 | 50,014 | 17 | 100,029 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Valery is a PE teacher at a school in Berland. Soon the students are going to take a test in long jumps, and Valery has lost his favorite ruler!
However, there is no reason for disappointment,... | instruction | 0 | 50,015 | 17 | 100,030 |
Yes | output | 1 | 50,015 | 17 | 100,031 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Valery is a PE teacher at a school in Berland. Soon the students are going to take a test in long jumps, and Valery has lost his favorite ruler!
However, there is no reason for disappointment,... | instruction | 0 | 50,016 | 17 | 100,032 |
Yes | output | 1 | 50,016 | 17 | 100,033 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Valery is a PE teacher at a school in Berland. Soon the students are going to take a test in long jumps, and Valery has lost his favorite ruler!
However, there is no reason for disappointment,... | instruction | 0 | 50,017 | 17 | 100,034 |
Yes | output | 1 | 50,017 | 17 | 100,035 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Valery is a PE teacher at a school in Berland. Soon the students are going to take a test in long jumps, and Valery has lost his favorite ruler!
However, there is no reason for disappointment,... | instruction | 0 | 50,018 | 17 | 100,036 |
No | output | 1 | 50,018 | 17 | 100,037 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Valery is a PE teacher at a school in Berland. Soon the students are going to take a test in long jumps, and Valery has lost his favorite ruler!
However, there is no reason for disappointment,... | instruction | 0 | 50,019 | 17 | 100,038 |
No | output | 1 | 50,019 | 17 | 100,039 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Valery is a PE teacher at a school in Berland. Soon the students are going to take a test in long jumps, and Valery has lost his favorite ruler!
However, there is no reason for disappointment,... | instruction | 0 | 50,020 | 17 | 100,040 |
No | output | 1 | 50,020 | 17 | 100,041 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Valery is a PE teacher at a school in Berland. Soon the students are going to take a test in long jumps, and Valery has lost his favorite ruler!
However, there is no reason for disappointment,... | instruction | 0 | 50,021 | 17 | 100,042 |
No | output | 1 | 50,021 | 17 | 100,043 |
Provide a correct Python 3 solution for this coding contest problem.
N players will participate in a tennis tournament. We will call them Player 1, Player 2, \ldots, Player N.
The tournament is round-robin format, and there will be N(N-1)/2 matches in total. Is it possible to schedule these matches so that all of the... | instruction | 0 | 50,300 | 17 | 100,600 |
"Correct Solution:
```
n=int(input());l=[list(map(int,input().split()))for i in[0]*n];a=[0]*n;d=1;k=n*(n-1)
while sum(a)<k and d<9999:
L=[0]*n;y=0;d+=1
for i in range(n):
if a[i]<n-1:
x=l[i][a[i]]-1
if l[x][a[x]]-1==i and L[x]+L[i]<1:
a[i]+=1;a[x]+=1;L[i]=L[x]=y=1
d*=y;print([k//2,d-1][d<9999])
``` | output | 1 | 50,300 | 17 | 100,601 |
Provide a correct Python 3 solution for this coding contest problem.
N players will participate in a tennis tournament. We will call them Player 1, Player 2, \ldots, Player N.
The tournament is round-robin format, and there will be N(N-1)/2 matches in total. Is it possible to schedule these matches so that all of the... | instruction | 0 | 50,301 | 17 | 100,602 |
"Correct Solution:
```
import sys
sys.setrecursionlimit(10**7)
def dfs(now):
res=day[now]
if vis[now]:
if res==-1:return -1
else:return res
res=1
vis[now]=1
for to in d[now]:
r=dfs(to)
if r==-1:return -1
res=max(res,r+1)
day[now]=res
return res
n=int(input())
v=0
si=[[0]*n for _ in ran... | output | 1 | 50,301 | 17 | 100,603 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
N players will participate in a tennis tournament. We will call them Player 1, Player 2, \ldots, Player N.
The tournament is round-robin format, and there will be N(N-1)/2 matches in total. Is ... | instruction | 0 | 50,305 | 17 | 100,610 |
Yes | output | 1 | 50,305 | 17 | 100,611 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
N players will participate in a tennis tournament. We will call them Player 1, Player 2, \ldots, Player N.
The tournament is round-robin format, and there will be N(N-1)/2 matches in total. Is ... | instruction | 0 | 50,306 | 17 | 100,612 |
Yes | output | 1 | 50,306 | 17 | 100,613 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
N players will participate in a tennis tournament. We will call them Player 1, Player 2, \ldots, Player N.
The tournament is round-robin format, and there will be N(N-1)/2 matches in total. Is ... | instruction | 0 | 50,307 | 17 | 100,614 |
Yes | output | 1 | 50,307 | 17 | 100,615 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
N players will participate in a tennis tournament. We will call them Player 1, Player 2, \ldots, Player N.
The tournament is round-robin format, and there will be N(N-1)/2 matches in total. Is ... | instruction | 0 | 50,308 | 17 | 100,616 |
Yes | output | 1 | 50,308 | 17 | 100,617 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
N players will participate in a tennis tournament. We will call them Player 1, Player 2, \ldots, Player N.
The tournament is round-robin format, and there will be N(N-1)/2 matches in total. Is ... | instruction | 0 | 50,309 | 17 | 100,618 |
No | output | 1 | 50,309 | 17 | 100,619 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
N players will participate in a tennis tournament. We will call them Player 1, Player 2, \ldots, Player N.
The tournament is round-robin format, and there will be N(N-1)/2 matches in total. Is ... | instruction | 0 | 50,310 | 17 | 100,620 |
No | output | 1 | 50,310 | 17 | 100,621 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
N players will participate in a tennis tournament. We will call them Player 1, Player 2, \ldots, Player N.
The tournament is round-robin format, and there will be N(N-1)/2 matches in total. Is ... | instruction | 0 | 50,311 | 17 | 100,622 |
No | output | 1 | 50,311 | 17 | 100,623 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
N players will participate in a tennis tournament. We will call them Player 1, Player 2, \ldots, Player N.
The tournament is round-robin format, and there will be N(N-1)/2 matches in total. Is ... | instruction | 0 | 50,312 | 17 | 100,624 |
No | output | 1 | 50,312 | 17 | 100,625 |
Provide a correct Python 3 solution for this coding contest problem.
<image>
The International Clown and Pierrot Competition (ICPC), is one of the most distinguished and also the most popular events on earth in the show business.
One of the unique features of this contest is the great number of judges that sometimes... | instruction | 0 | 50,439 | 17 | 100,878 |
"Correct Solution:
```
while True:
n = int(input())
if n == 0:
break
s = [int(input()) for i in range(n)]
s.sort()
score = sum(s) - s[0] - s[-1]
print(score // (n - 2))
``` | output | 1 | 50,439 | 17 | 100,879 |
Provide a correct Python 3 solution for this coding contest problem.
<image>
The International Clown and Pierrot Competition (ICPC), is one of the most distinguished and also the most popular events on earth in the show business.
One of the unique features of this contest is the great number of judges that sometimes... | instruction | 0 | 50,440 | 17 | 100,880 |
"Correct Solution:
```
list2=[]
while True:
try:
N=int(input())
list1=[int(input()) for _ in range(N)]
list2.append(int((sum(list1)-max(list1)-min(list1))/(N-2)))
except:
break
for tmp in list2:
print(tmp)
``` | output | 1 | 50,440 | 17 | 100,881 |
Provide a correct Python 3 solution for this coding contest problem.
<image>
The International Clown and Pierrot Competition (ICPC), is one of the most distinguished and also the most popular events on earth in the show business.
One of the unique features of this contest is the great number of judges that sometimes... | instruction | 0 | 50,441 | 17 | 100,882 |
"Correct Solution:
```
while 1:
n=int(input())
if n==0:break
print((sum(sorted([int(input()) for _ in range(n)])[1:-1]))//(n-2))
``` | output | 1 | 50,441 | 17 | 100,883 |
Provide a correct Python 3 solution for this coding contest problem.
<image>
The International Clown and Pierrot Competition (ICPC), is one of the most distinguished and also the most popular events on earth in the show business.
One of the unique features of this contest is the great number of judges that sometimes... | instruction | 0 | 50,442 | 17 | 100,884 |
"Correct Solution:
```
while True:
n = int(input())
if n == 0:
break
i = [int(input()) for i in range(n)]
print((sum(i) - min(i) - max(i)) // (n - 2))
``` | output | 1 | 50,442 | 17 | 100,885 |
Provide a correct Python 3 solution for this coding contest problem.
<image>
The International Clown and Pierrot Competition (ICPC), is one of the most distinguished and also the most popular events on earth in the show business.
One of the unique features of this contest is the great number of judges that sometimes... | instruction | 0 | 50,443 | 17 | 100,886 |
"Correct Solution:
```
while True:
n = int(input())
if n < 3:
break
print(sum(sorted([int(input()) for i in range(n)])[1:-1]) // (n - 2))
``` | output | 1 | 50,443 | 17 | 100,887 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.