Z Value
CodeChefOpen on judge ↗
Problem description. Given a Directed graph. Each edge has 2 components XValue and YValue. ZValue for a cycle is defined as (Sum of XValues of all edges in a cycle)/(Sum of YValues of all edges in a cycle) Print the Maximum Integer A such that A = ceil(ZValue) - 1 amongst all the cycles. Refer this for ceil(x). If The Graph has no Cycle Print 0. Note:- You may assume that there are no Multi
HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17
CodeSearch Tutor
Hints, not spoilers — it won’t hand over the full solution unless you insist.
Sign in to chat with the tutor and save your progress.
Sign in to start