POJ.1552 Doubles(水)
来源:互联网 发布:c语言99个例题 编辑:程序博客网 时间:2024/06/05 18:51
POJ.1552 Doubles(水)
题意分析
暴力
代码总览
#include <cstdio>#include <stdio.h>#define nmax 100using namespace std;int a[nmax];int n;int main(){ //freopen("in.txt","r",stdin); while(true){ int t; scanf("%d",&t); if(t == -1) break; if(t == 0){ printf("0\n"); continue; }else{ int cnt = 0; a[cnt++] =t; while(scanf("%d",&t) && t!= 0){ a[cnt++] = t; } int ans = 0; for(int i = 0; i<cnt;++i){ for(int j = 0; j<cnt;++j){ if(i == j) continue; else{ if(a[j] == 2* a[i]) ans++; } } } printf("%d\n",ans); } } return 0;}
阅读全文
0 0
- poj 1552 Doubles 水
- POJ 1552 Doubles 水
- POJ.1552 Doubles(水)
- POJ 1552 && HDU 1303 Doubles(水~)
- POJ 1552 Doubles
- poj 1552 Doubles
- 【POJ-1552】Doubles
- Poj 1552 Doubles(水题)
- POJ 1552 Doubles
- poj 1552 Doubles
- POJ 1552 - Doubles
- Doubles - POJ 1552 水题
- POJ 1552 Doubles
- POJ 1552-Doubles
- POJ 1552 Doubles
- POJ 1552 Doubles
- POJ 1552 Doubles
- POJ 1552 Doubles
- 【漏洞公告】CVE-2017-8464 :Microsoft Windows LNK 远程代码执行漏洞
- jQuery EasyUI详解-EasyUI环境配置
- android app版本升级(DownloadManager、适配6.0、7.0)
- Git 常用命令速查表(图文+表格)
- pat 精度问题
- POJ.1552 Doubles(水)
- android监听事件的三种实现方式
- SpringCloud Eureka实战
- PHP删除数组中指定下标的元素
- 欢迎使用CSDN-markdown编辑器
- 【重要安全预警】Hadoop未授权访问可导致数据泄露
- MAC 命令行启动MySql
- ViewPager系列之仿魅族应用的广告BannerView
- 进程-execve