hdu 2942 Pairs
来源:互联网 发布:4g网络打不开苹果商店 编辑:程序博客网 时间:2024/05/16 13:06
//英语又没学好,题意是将n分成n/2份,判断n/2份都相等吗#include<iostream>using namespace std;int a[1002];int main(){int n, i, sum=0;while(scanf("%d", &n) != EOF && n){for( i=0; i < n; i++ )scanf("%d", a+i);int temp;if(n % 2){printf("No\n");continue;}temp = a[0] + a[n-1];for( i=1; i < n/2; i++ ){if(a[i] +a[n-i-1] != temp)break;}if(i == n/2)printf("Yes\n");elseprintf("No\n");}return 0;}
- hdu 2942 Pairs
- hdu 2942 Pairs
- HDU 5178 pairs 二分
- HDU - 5178 - pairs
- hdu 5178 pairs
- hdu 5178 pairs (二分)
- HDU 5172 pairs
- hdu 5178 pairs
- Count The Pairs HDU
- HDU 5178 pairs
- HDU 4750(Count The Pairs)
- HDU 4750 Count The Pairs
- hdu 4750 Count The Pairs
- HDU 5178 pairs 二分查找
- HDU 4750 Count The Pairs
- HDU-4750 Count The Pairs
- pairs
- pairs
- [转载]C++经典书籍汇总
- 兼容所有浏览器的跑马灯
- Inductor for DC-DC
- hdu分类
- poj 1651 DP
- hdu 2942 Pairs
- ACM训练方案-POJ题目分类
- Boost和Config++,两款不错的开源C++库
- ubuntu下安装Aptana3
- 启动错误:emulator-5554 disconnected
- 菜鸟的时间轴
- 再看Vector容器
- error C4996: 'scanf': This function or variable may be unsafe. Consider using scanf_s instead. To di
- xStream完美转换XML、JSON