UVa 10963 - The Swallowing Ground
来源:互联网 发布:苏州火易网络招聘 编辑:程序博客网 时间:2024/06/05 02:37
题目:给你两个轮廓,判断两个是否能完美的拼接,图形有小方块组成,轮廓用相邻列的方块高度表示。
分析:简单题。直接判断是不是所有对应位置的方块高度差相同即可。
说明:又是很久没刷题了,(⊙v⊙)。
#include <algorithm>#include <iostream>#include <cstdlib>#include <cstring>#include <cstdio>#include <cmath>using namespace std;int main(){int t,n,flag,a,b,s;while (~scanf("%d",&t)) while (t --) {scanf("%d",&n);flag = 1;if (n) {scanf("%d%d",&a,&b);s = a-b;for (int i = 1 ; i < n ; ++ i) {scanf("%d%d",&a,&b);if (a-b != s) flag = 0;}}if (flag) printf("yes\n");else printf("no\n");if (t) printf("\n");} return 0;}
0 0
- UVa 10963 - The Swallowing Ground
- Tht Man on the Ground
- Book - Programming from the Ground Up
- ZOJ 2479 Cover the Rectangular Ground
- Programming from the ground up(0)
- 总结《Ray Tracing from the Ground Up》
- OpenGL ES From the Ground Up, Part 1: Basic Concepts
- 深入REDIS,读REDIS-FROM-THE-GROUND-UP有感
- Creating a Game Concept: The First Step in Getting Your Game off the Ground
- Zhao Jinglei: ReadSense Ltd Pay more attention to the commercialization of the ground, research AI c
- Zhao Jinglei: ReadSense Ltd Pay more attention to the commercialization of the ground, research AI c
- Zhao Jinglei: ReadSense Ltd Pay more attention to the commercialization of the ground, research AI c
- Zhao Jinglei: ReadSense Ltd Pay more attention to the commercialization of the ground, research AI c
- ground zero
- Ground Knowledge
- Ground Truth
- Ground truth
- ground truth
- 【ACM菜逼解题报告】Subsequence
- 异常
- .Net开源之corefx、coreclr初探(一)
- 概览《管理经济学》
- ubuntu14中的eclipse C开发的include问题
- UVa 10963 - The Swallowing Ground
- hdu 5000 dp+推导结论
- 64位Ubuntu14.04系统无法解压bin文件的解决方法
- An application for Apple Watch to control your Tesla Car
- springmvc 统一处理异常机制
- java中把一个字符串中大写字母转换为小写,小写字母转换为大写
- 第三方下拉刷新快速集成
- poj 2054 Color a Tree 据说是贪心
- USACO6.4.3 Wisconsin Squares(wissqu)