首页 > Windows开发 > 详细

uva 10963 - The Swallowing Ground

时间:2016-01-03 00:38:08      阅读:168      评论: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
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!