#Lutece0150. 真实的谎言
真实的谎言
Migrated from Lutece 150 真实的谎言
All parts of this problem, including description, images, samples, data and checker, might be broken. If you find bugs in this problem, please contact the admins.
Description
个人做一个游戏,游戏中每个人说了一句话(可能是真的也可能是假的)
第个人说:“个人中有至少有个,至多有个人说的是真话!”()你能推断出最多能有多少个人说的是真话吗?
;
;
Input
第一行为一个整数,代表测试数据的组数;
每组数据以开头,接下来有行,每行两个整数,(代表第个人说的);
Output
输出占一行。如果原问题有解,输出最多能有多少个人说的是真话;否则输出-1
.
Samples
2
3
0 0
1 1
2 2
3
2 5
3 5
0 3
1
3
Resources
ygx2468