Can anyone explain the error in this submission?

Revision en7, by skate1512, 2020-08-16 14:35:05

The problem
I tried writing a generator script but that didn't help.
Submission Link.

Code explanation: In the problem, we are given an array/list and we have to check if we can form 1 square and 1 rectangle with those elements(planks). Only possible values are 8, 6 6, 6 2, 4 4, 4 2 2. I tried to count the numbers of 2s, 4s, 6s and 8s. And with every query, their value is incremented or decremented. In the end, I check if the values form any of the possible values and print Yes or No according to it. If anything is greater than 8 then I count it as 8.

Edit: I was missing 6 4 in my possible values. Accepted Solution.

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en7 English skate1512 2020-08-16 14:35:05 140 Tiny change: 'd Solution](https://' -> 'd Solution.](https://'
en6 English skate1512 2020-08-16 14:21:46 473 Added explanations to the post.
en5 English skate1512 2020-08-16 13:46:46 3 Tiny change: 'problem/B)\nI tried ' -> 'problem/B) \nI tried '
en4 English skate1512 2020-08-16 13:46:26 62
en3 English skate1512 2020-08-16 13:45:10 5 Tiny change: '074415).\n[cut]' -> '074415).\n'
en2 English skate1512 2020-08-16 13:39:44 14 Tiny change: 'egdb.com/Sk7LqYLGv) but that' -> 'egdb.com/SJI1pYIfP) but that'
en1 English skate1512 2020-08-16 13:32:43 226 Initial revision (published)