#P5482. Counting Valid Inequalities
Counting Valid Inequalities
Counting Valid Inequalities
This problem involves verifying the correctness of a claimed answer regarding a set of one-variable inequalities of the form \( ax+b>c \). Given a list of inequalities and a value \( k \), your task is to count how many of these inequalities hold true when \( x=k \), and then compare this count with a provided answer. If the counts are equal, output Correct; otherwise, output Incorrect.
inputFormat
The input consists of multiple lines:
- The first line contains an integer \( n \) representing the number of inequalities.
- The next \( n \) lines each contain three integers \( a \), \( b \), and \( c \), denoting the inequality \( ax+b>c \).
- The following line contains an integer \( k \) which is the value to substitute for \( x \).
- The last line contains an integer representing the claimed number of inequalities that hold true when \( x=k \).
outputFormat
Output a single line: print Correct if the computed count of valid inequalities matches the claimed number, or Incorrect otherwise.
sample
3
1 2 3
2 1 3
3 0 2
1
2
Incorrect