Rejudge Submissions of BENCHP

Hello @admin ,
It is kinda necessary to rejudge the submissions (during contest) for the problem BENCHP, after updating the test cases for the problem.

This comment proves that the test cases are weak. There could be many submissions like this that could have passed during the contest. Rejudging them can bring changes to the leaderboard - as a result, rating changes can also be updated. This is a serious issue one should look into.

3 Likes

After completion of contest, nothing can be done.

Only some extra TC can be added for practice section

1 Like

the code is incorrect … the testcases are fine

1 Like

But that’s not fair. There could be many such submissions during the contest. Who knows - there could be major changes in the leaderboard.

What I am trynna say is the test data doesn’t include such type of test cases. Because of which even wrong solutions also passed. So, “Test cases are not fine”.

1 Like

There have been already many discussions regarding test cases being weak. It is not correct to add test cases and re-judge submissions after the contest. Infact, it is not correct to add test cases between the contest also.
After getting AC, many people don’t bother to check/prove their logic during the contest. So adding test cases and re-judging won’t be fair.
You might like this comment.

4 Likes

Yeah, I can understand. Hope it will not repeat in future contests. :slightly_smiling_face:
The same me thinking fairly :thinking:

I am posting my solution to this problem. I don’t think in any test case my solution will fail
If in any please tell me

https://www.codechef.com/viewsolution/45601423

Lol, why is everyone so confident about their “WRONG SOLUTION”
Your code fails in the following test case

Input

1
10 25 10
4 2 3 3 4 2 5 1 6 3

Expected Output

YES

Your Output

NO

I am locking your code too.

Your code which made me laugh
#include <bits/stdc++.h>
#define ll long long int
#define messi ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);

using namespace std;

int main() {
	messi
	
	int t;
	cin>>t;

	ll n, w, w1;
	while(t--){
		cin>>n>>w>>w1;

		map<ll, ll> occ;
		int x;
		for(int i=0;i<n;i++){
			cin>>x;
			occ[x]++;
		}

		if(w<=w1){ cout<<"YES\n";}
		else{
			ll extra=0;
			for(auto i: occ){
				x=i.second;
				if(x%2==0){ extra+=(x*i.first);}
			}

			if(extra+w1>=w) cout<<"YES\n";
			else cout<<"NO\n";
		}
	}
	return 0;
}

I would also like to mention that your code failed in 1730 test cases (very small constraints) out of 10^4 test cases which I generated in my machine. These test cases are absolutely RANDOM.

1 Like

This post was flagged by the community and is temporarily hidden.

2 3 4 ||Rod Center(10) || 4 3 2
Weight = 2x(4+3+2)+10 = 28 > 25

Okay thank you Cubefreak!!

1 Like

Dude!!!
You are the dumbest. It wasn’t me who read the question wrong, it’s you. Your solution just sucks. Why would I start a thread when I can just do my work?
I was pretty much sure about it - The test cases are WEAK. I just wanted to convey the same to everyone.

And as I said, your code failed in 1730 test cases (very small constraints) out of 10^4 test cases that I generated in my machine. These test cases are absolutely RANDOM.

Kindly mind your words when you’re posting something.

1 Like

@suman_18733097 hey i would like to know how are you generating test cases cause i wanna check whether my code will give the desired output or not !

Okay Now Let your machine check this one.

https://www.codechef.com/viewsolution/45735405

Test Generator
"""
Author: Chitturi Sai Suman
Created: 2021-04-30 19:24:23
"""
from random import randint

def generate_input_as_string():
    size = 10
    n = size
    have = randint(1, 20)
    required = randint(20, 40)
    l = [randint(1, size) for i in range(n)]
    r = str(n) + " " + str(required) + " " + str(have) + "\n"
    r = r + ' '.join([str(i) for i in l])
    return r


def main():
    test = 10000
    with open("in.in","w") as file:
        file.write(str(test)+'\n')
        for t in range(test):
            string = generate_input_as_string()
            file.write(string+"\n")

main()
My Code
"""
Author: Chitturi Sai Suman
Created: 2021-04-30 19:24:23
"""
## 57:69:74:68:20:4C:4F:56:45
##	  _____   _    _   __    __     ____     __    _
##	 / ____| | |  | | |  \  /  |   /    \   |  \  | |
##	 | |___  | |  | | |   \/   |  /   _  \  | . \ | |
##	 \____ \ | |  | | | |\__/| | |   /_\  | | |\ \| |
##	 ____| | | \__/ | | |    | | |   __   | | | \ ` |
##	 |_____/ \______/ |_|    |_| |__|  |__| |_|  \__|
## 

from functools      import reduce
from fractions      import Fraction
import re
from statistics     import mean, median, mode
from collections    import deque, OrderedDict, defaultdict
from re             import compile, findall, escape, search, match
from sys            import stdin, stdout, stderr, setrecursionlimit
from math           import pi, sqrt, gcd, ceil, floor, log2, log10, factorial
from random         import choice, getrandbits, randint, random, randrange, shuffle
from itertools      import combinations, combinations_with_replacement, permutations
from collections    import Counter, namedtuple, ChainMap, UserDict, UserList, UserString
from math           import cos, acos, tan, atan, atan2, sin, asin, radians, degrees, hypot
from bisect         import insort, insort_left, insort_right, bisect_left, bisect_right, bisect
from heapq          import heapify, heappop, heappush, heappushpop, heapreplace, merge, nlargest, nsmallest
# from numpy import dot, trace, argmax, argmin, array, cumprod, cumsum, matmul

size = 2 * (10 ** 6 + 1)

# Scope for Global Variables
# 
# 


def preCompute():
    # Precompute some values here
    # 
    pass


def solve():
    # Solve Test Cases here
    n, required, have = io.Tuple()
    weights = io.List()
    freq = Counter(weights)
    for i in freq:
        if freq[i] % 2 == 0:
            have += i * freq[i]
        else:
            have += i * (freq[i] - 1)
    io.write("YES" if have >= required else "NO")


def main():

    testcases = 0

    # testcases += 1

    if testcases == 0:
        testcases = io.Int()

    preCompute()

    for test in range(testcases):

        # io.write("Case #%d: "%(test+1), end="")
        # Use the following lines to write any logic if needed
        # 
        # 
        solve()


class IO:
    def input(self):
        return stdin.readline().strip()
    def String(self):
        return self.input()
    def StringList(self):
        return list(map(str, self.input().split()))
    def Int(self):
        return int(self.input())
    def Float(self):
        return float(self.input())
    def List(self):
        return list(map(int, self.input().split()))
    def Tuple(self):
        return tuple(map(int, self.input().split()))
    def debug(self, *obj, sep = " ", end = "\n"):
        string = sep.join([str(item) for item in obj]) + end
        stderr.write(string)
    def write(self, *obj, sep = " ", end = '\n'):
        string = sep.join([str(item) for item in obj]) + end
        stdout.write(string)
    def put(self, val: str):
        stdout.write(val + '\n')
    def yes(self):
        self.write("yes")
    def Yes(self):
        self.write("Yes")
    def YES(self):
        self.write("YES")
    def no(self):
        self.write("no")
    def No(self):
        self.write("No")
    def NO(self):
        self.write("NO")

io = IO()
shit = 998244353
mod = 10 ** 9 + 7
hell = 10 ** 9 + 9
inf = 10 ** 18
lcm = lambda x, y: ((x * y) // gcd(x, y))
add = lambda x, y, p: (x % p + y % p) % p
sub = lambda x, y, p: ((x % p - y % p) + p) % p
mul = lambda x, y, p: ((x % p) * (y % p)) % p
inverse = lambda x, p: (pow(x, p - 2, p))
setBitCount = lambda x: bin(x).count("1")
sumOfDigits = lambda x: sum([int(i) for i in str(x)])

dc = [1, 0, 0, -1, -1, -1, 1, 1]
dr = [0, 1, -1, 0, -1, 1, -1, 1]

def abort(s):
    raise AssertionError(s)

setrecursionlimit(size)

main()
3 Likes

I can tell whether the code is correct or not, it is correct because you modified it.

1 Like

Thank You And I hope that We will again Give our opinions on another post :joy::joy:
Really Loving your Skill To Find Errors :heart::heart:
Learning from You!!

Please consider removing your template when you share code on a public forum. It can be annoying for viewers to scroll 50 lines of gibberish just to check a couple of lines of actual code.