[Community Puzzle] Logically reasonable inequalities


Send your feedback or ask for help here!

Created by @dhaunac,validated by @Randrian,@Djoums and @GenesisQ.
If you have any issues, feel free to ping them.

1 Like

need to ask because I passed all testcases and most validators but validators 3. can someone please show some hints about validators 3? I think I must lose some points which I never mention about.

1 Like

I’ve written you a private message.

1 Like

Same issue for me as Doniface. I can pass test 3 but not validator 3 (I am assuming they are related like usual); any hint would be much appreciated.

Validator 3 actually has more inequalities to deal with than test 3. I’ve sent you a pm.


Thanks. That explains a lot. It’s probably why I can pass the tests but not Validator 3 – it’s nearly twice as long as the longest test. So you can get through the tests with little optimization but that’d be impossible on the validator. My suggestion would be to add a test equally long.

Cannot pass validator 3 either, have no clue what the problem is, please explain that specific test case. Thanks.

I think there is no need to apply graphs and then e.g. BFS or DFS on them, because it’s enough to use a single array.


Je ne comprend pas pourquoi le test 3 est KO alors que le test 4 est OK.
Les résultats sont différents alors que les entrées sont similaires.
Quelque chose m’échappe et je ne trouve pas ce que c’est…

La sortie de mon test 3 :
l1 : L > Z consistent
l2 : Z > F contradiction
Res : contradiction
Test → KO

La sortie de mon test 4 :
l1 : L > Z consistent
l2 : Z > F contradiction
Res : contradiction
Test → OK

Quelqu’un aurait une idée ?


Tout dépend de ton algorithme.
Attention, on ne regarde pas l’ordre alphabétique.


[No full code please]

Hey, came here because I think that the tests are incomplete.
I think that you should add a system of inequalities in which we encounter 4 different variables in the first two inequalities :
Example :
A > B
C > D
E > D
B > C
So the users will really have to use a graph approach.
Thanks :smiley: !

1 Like

En fait j’avais une condition qui arrêtait mon algo à la seconde ligne, d’où les debugs similaires sur les 2 premières lignes avec des résultats attendus différents…

J’ai vu le pb en commentant mon algo et en laissant le debug.


If the output must be in contradiction then it is not enough.
I’ve pass your test with a simple algorithm (list + condition), so I dont think it is enough to force the use of graph.

1 Like

The expected output was consistent. Try with that :
A > B
C > D
D > F
E > F
B > E
F > A
(Expected output: contradiction)
Btw could you send me your algorithm please ?

All test cases pass and 4/5 validators too, but fail on Validator 3! Can anyone explain my why???

The first few messages in this discussion mentions that Validator 3 is a much longer version of Test 3. More details for your reference:

  • first 9 inequalities in Validator 3 is linear, just like the first 4 in Test 3.
  • the remaining 9 inequalities in Validator 3 involves previously seen variable names and nothing new, just like the last inequality in Test 3.

I think this lacks longer testcases, e.g., A > B > C > D > E > F > G > H > J > A which is a contradiction, some solutions fail this due to 8 letters being greater than J. unless a proper algorithm is used, length will matter.

nice puzzle, thanks!

can i get clue for third validator ? i got best optimization as i know, even in wording, i think i included all context in my algorythm… does’nt work.