码迷,mamicode.com
首页 > Windows程序 > 详细

uva 10963 - The Swallowing Ground

时间:2016-01-03 00:40:12      阅读:178      评论:0      收藏:0      [点我收藏+]

标签:

 

 1 #include <iostream>
 2 #include <cstdio>
 3 #include <cstdlib>
 4 #include <set>
 5 using namespace std;
 6 
 7 int main()
 8 {
 9     int cases, cols, northRow, southRow;
10     cin >> cases;
11     while(cases--)
12     {
13         cin >> cols;
14         set<int> mySet;
15         for(int i=0; i<cols; i++)
16         {
17             cin >> northRow >> southRow;
18             mySet.insert(abs(northRow - southRow));
19         }
20 
21         if(mySet.size() == 1)
22             cout << "yes" << endl;
23         else cout << "no" << endl;
24        
25         if(cases)
26             cout << endl;
27     }
28 }

拉扣

 

uva 10963 - The Swallowing Ground

标签:

原文地址:http://www.cnblogs.com/aze-003/p/5095540.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!