Appeal against wrongly pladgarised in STARTER 189 (RATED)

My username is siva2156 . I wrote and submitted the solution entirely in the CodeChef online editor, without any external IDE or tools and I also did not share my code with anyone.

The logic is directly based on the problem statement, which uses variables A, B, C, D. The approach is common, simple, and expected so it’s natural that multiple users may independently arrive at similar implementations.

Problem statement :

Create Binary String

You want to make a binary string S of length N. You will be paid according to the following rules:

  • For each occurrence of the subsequence 0 in S, you are paid A coins.
  • For each occurrence of the subsequence 1 in S, you are paid B coins.
  • For each occurrence of the subsequence 01 in S, you are paid C coins.
  • For each occurrence of the subsequence 10 in S, you are paid D coins.

Note that the occurrence does not need to be continuous, i.e. 0101 has 3 occurrences of 01 not 2. Thus, for the string 0101 you get 2⋅A+2⋅B+3⋅C+D coins.

You want to maximize the number of coins you get. Find this maximum value.

Input Format

  • The first line of input will contain a single integer T, denoting the number of test cases.
  • Each test case consists of multiple lines of input.
    • The first and only line of input contains 5 integers - N,A,B,C,D.

Output Format

For each test case, output on a new line the maximum number of coins you can get.

My approach to solve the problem statement is,

creating the scanner object to get input and the variable t stores the number of testcases and variables N,A,B,C,D stores the length of s, coins of subsequence ‘0’ in s,coins of subsequence ‘1’ in s,coins of subsequence ‘01’ in s,coins of subsequence ‘10’ in s respectively. To maximise the cost of the string we have to increase the number of occurence of ‘01’ or ‘10’ . To do this I am tracking the count of ‘0’ and ‘1’ .

let us assume that the number of ‘0’ is m then the number of ‘1’ absolutelt n-m, to track this count i have used the variables cnt0 and cnt1 respectively .

now I am calculating the coins as given in the problem statement ,

cnt0*A - total coins for occurence of 0

cnt1*B - total coins for occurence of 1

cnt0cnt1C - total coins for occurence of 01

cnt0cnt1D - total coins for occurence of 10

I will store the coins for occurence of ‘01’ in variable coins1 by adding total coins for 0 , 1, and 01(all ones followed by zeros)

then I will store the coins for occurence of ‘11’ in variable coins2 by adding total coins for 0 , 1, and 10(all zeros followed by ones )

i wil track maximum of this two in each every iteration and will print the answer.

The logic is directly based on the problem statement, which uses variables A, B, C, D. The approach is common, simple, and expected so it’s natural that multiple users may independently arrive at similar implementations.

I believe this is a false positive, and I kindly request a manual review of my submission.

Thank you.

Best regards,

siva2156