[Community Puzzle] Video Assistant Referee

Coding Games and Programming Challenges to Code Better

Send your feedback or ask for help here!

Created by @_yel_p,validated by @Timinator,@Aldoggen and @Lanfeust.
If you have any issues, feel free to ping them.

Hi,
I have a trouble with this puzzle :(, even if I unjoyed to find my solution.
My program is able to pass all the test cases but is failing for 4 validators (3, 5, 7 and 10). I’m abit surprised by this difference.
would you see any specificity for these compared to test cases / other validators?
Thank you by advance

I was found mistake like below

onside or offside , but not both solution at the same time

The puzzle statement makes a distinction between being in an offside position (first line of output) and having an actual offside offence (second line). There is no contradiction, just re-read the statement carefully. Maybe the chosen wording in the output is not the best.

What language are you using?

Hi Timinator,
I’m using Python3

I found a way to validate validators 5 and 10 in game player were not check to be in there side for official validation. So this case is not covered by initial tests. Now I’m chasing my other miss…

I’ll send you a PM.

Hi, I’ve got 93 % score in this puzzle, in my case #12: Socios is wrong solution. Could You share more data link with this example becouse I dont know what is problem . My local test case result was 100%.
I meant could You share for case#12 socios input and output data ?

I will send you a PM.

Thank You so much, I’ve fix my solution and I’ve 100% score.

1 Like

for scenario 2(#2 cafu,the right back) there is not an active player in the offside position however the expected result is a player in the offside position
Do we consider that player a (non-active) is in the offside position?

Yes, the player is in an offside position. However, because the player is not active, the VAR ruling is ONSIDE.

Enjoyable puzzle… There were two important details that I thought were unclear in the problem statement; I think it would be a good idea to be more explicit about them:

  • When you say “nearer to the opponent’s goal line”, you mean “nearer to the goal line that is being defended by the opponent.” A reasonable person might expect a team’s goal to be defined as the goal they are pushing the ball towards. Similarly, a team’s “half of the pitch” is defined as the half they are defending, which is less than clear.

  • A player can only be offiside if they are a member of the team defined as “attacking” based on the ball being “o” or “O”, even if they are on the opponent’s half of the pitch. You hint at that but not in a very clear way when you say: “The offside rule applies only to players in the opponent’s half of the pitch. This makes sense since you can’t be offside if you are positioned in your own camp. Only players who “transgress” the middle line and “attack” the other camp might fall in an offside trap”

I thought that ‘o’, meaning released by team a, would imply only active A players (no B), and ‘O’ vice versa (in other words: ‘o’ available implies no ‘B’ available, ‘O’ available implies no ‘A’ available). This assumption is not proven wrong in any of the test cases (I pass 100% on all test cases). However, in validator 2, there is an ‘O’ and an ‘A’ in the input.

Also, I assumed that not any ‘A’ or ‘B’ means no active players means no offside. None of the test cases prove this assumption wrong, but in validator 7, there is the case of offside players (apparently) without any active players.

  • Why is that possible (can someone explain to me where I make a mistake in rule interpretation, regarding my assumptions)?
  • It seems to be an imbalance between tests and validators. If those two edges are important, they should be covered in the test cases as well. Two distinct mistakes that can only be debugged by checking the validators in the contribution might be a problem for players that cannot check the contribution page.