#1243. [Seerc2007]Showstopper

内存限制:162 MiB 时间限制:1 Sec


我们可以用三个正整数x y z来描述一个等差数列:x,x+z,x+2z,…,x+kz(x+kz≤y,x+(k+1)z>y)。 给定n个这种形式的等差数列,并且告诉你,在所有的正整数中,最多只有一个数字出现在奇数个等差数列中。你需要算出这个数字是多少,或者不存在,如果存在请输出这个数字是多少及它出现的次数


Input file consists from multiple data sets separated by one or more empty lines. Each data set represents a sequence of 32-bit (positive) integers (references) which are stored in compressed way. Each line of input set consists from three single space separated 32-bit (positive) integers X Y Z and they represent following sequence of references: X, X+Z, X+2*Z, X+3*Z, …, X+K*Z, …(while (X+K*Z)<=Y). Your task is to data-mine input data and for each set determine weather data were corrupted, which reference is occurring odd number of times, and count that reference.


For each input data set you should print to standard output new line of text with either “no corruption” (low case) or two integers separated by single space (first one is reference that occurs odd number of times and second one is count of that reference).



1 10 1
2 10 1

1 10 1
1 10 1

1 10 1
4 4 1
1 5 1
6 10 1


1 1
no corruption
4 3