Hercule Poirot Problem
46F2300· international master2s256 MB⌨ stdin/stdout
Examples
Sample 1of 2
Input
2 1 21 2Dmitry 1 1 1Natalia 2 0Natalia 1 1 1Dmitry 2 0
Output
YES
Sample 2of 2
Input
4 4 31 31 22 33 4Artem 1 1 4Dmitry 1 1 2Edvard 4 2 1 3Artem 2 0Dmitry 1 0Edvard 4 4 1 2 3 4
Output
NO
58%
46F.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)
loading graph engine…