Doubles
http://poj.org/problem?id=1552
#include<stdio.h>
const int N=;
int main()
{
int n,f[N],g[N];
int cnt;
while()
{
cnt = ;
scanf("%d",&n);
if (n==-)
break;
f[] = n;
g[] = *n;
int i ;
for ( i = ;; i ++)
{
scanf("%d",&f[i]);
if (f[i]==)
break;
g[i] = *f[i];
}
for (int j = ; j < i; j ++)
{
for (int k = ; k < i; k ++)
{
if (f[j]==g[k])
cnt++;
}
}
printf("%d\n",cnt);
}
return ;
}
Doubles的更多相关文章
- Doubles 分类: POJ 2015-06-12 18:24 11人阅读 评论(0) 收藏
Doubles Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 19954 Accepted: 11536 Descrip ...
- hdu 1303 Doubles
题目连接 http://acm.hdu.edu.cn/showproblem.php?pid=1303 Doubles Description As part of an arithmetic com ...
- 算法练习之:Doubles
Doubles Time Limit: 1000MS Memory Limit: 65536KB Problem Description As part of an arithmetic compet ...
- HDOJ 1303 Doubles(简单题)
Problem Description As part of an arithmetic competency program, your students will be given randoml ...
- Doubles water!!!!!!只会水题怎么破
Doubles Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Sub ...
- zoj 1760 Doubles(set集合容器的应用)
题目链接: http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=1760 题目描述: As part of an arithmet ...
- POJ.1552 Doubles(水)
POJ.1552 Doubles(水) 题意分析 暴力 代码总览 #include <cstdio> #include <stdio.h> #define nmax 100 u ...
- Poj 1552 Doubles(水题)
一.Description As part of an arithmetic competency program, your students will be given randomly gene ...
- zoj 1760 Doubles
Doubles Time Limit: 2 Seconds Memory Limit: 65536 KB As part of an arithmetic competency progra ...
- Test Doubles - Fakes, Mocks and Stubs.
https://dev.to/milipski/test-doubles---fakes-mocks-and-stubs This text was originally posted at Prag ...
随机推荐
- MyBatis入门2_增删改查+数据库字段和实体字段不一致情况
本文为博主辛苦总结,希望自己以后返回来看的时候理解更深刻,也希望可以起到帮助初学者的作用. 转载请注明 出自 : luogg的博客园 谢谢配合! 当数据库字段和实体bean中属性不一致时 之前数据库P ...
- ASLR(Address space layout randomization)地址空间布局随机化
/********************************************************************* * Author : Samson * Date ...
- centOS7卸载google-chrome
参考: https://www.jianshu.com/p/39d0b8f578d9
- JTable设置表格背景颜色——隔行不同
package view; import java.awt.Color; import java.awt.Component; import javax.swing.JLabel; import ja ...
- 2018年为什么要学习Python?Python还有前景吗?
近年来,Python一直是当仁不让的开发入行首选,无论是职位数量.就业广度还是使用排行都远超其他语言,而且Python语言接近自然语言,学习起来非常的轻松简便,因此也越来越受到人们的欢迎.进入到201 ...
- JavaScript day4(条件语句和条件运算符)
1. 布尔值 布尔值要么是 true 要么是 false .它非常像电路开关, true 是“开”,false 是“关”.这两种状态是互斥的. 2. if 语句 if 语句用于在代码中做条件判断.关键 ...
- Capture the Flag ZOJ - 3879(模拟题)
In computer security, Capture the Flag (CTF) is a computer security competition. CTF contests are us ...
- [备忘]git常用命令
网站有点儿久没有维护(因为去做其他事情了呗),现在空下来,回来改了网站的一些东西,却忘记了git的一些常用的命令,于是便写下这篇文,方便查阅,免得每次都去看手册(毕竟我懒啊!!) 检查当前文件状态:g ...
- python编程——断言
基本语法 assert_stmt ::= "assert" expression ["," expression] assert 5 > 3 # 肯定是对 ...
- JavaSE 学习笔记之异 常(十)
异 常: 异常:就是不正常.程序在运行时出现的不正常情况.其实就是程序中出现的问题.这个问题按照面向对象思想进行描述,并封装成了对象.因为问题的产生有产生的原因.有问题的名称.有问题的描述等多个属性信 ...