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 ...
随机推荐
- Android本地消息推送
项目介绍:cocos2dx跨平台游戏 项目需求:实现本地消息推送,需求①:定点推送:需求②:根据游戏内逻辑实现推送(比如玩家体力满时,需要计算后到点推送):需求③:清理后台程序或重启后依然能够实现本地 ...
- Logstash_Apache日志采集
[root@Cagios logstash-]# cat /usr/local/logstash-/logstash_agent.conf input { file { type => &quo ...
- nagios插件nagiosql安装配置
nagios插件nagiosql安装配置 # Nagiosql install [root@Cagios ~]# yum install -y libssh2 libssh-devel [root@C ...
- TP调用JS
echo "<script>alert('删除成功');window.location.href='?c=Banner&a=index' </script>& ...
- 3.Linux的远程管理及网络下载
3.1 Linux的远程管理 3.1.1 远程管理概述 什么是远程管理: 1.为什么需要远程管理: 服务器通常是Linux系统,而服务器不可能一直在身边,所以就需要远程来操作服务器 企业中通常需要集群 ...
- vue跨域问题解决(生产环境)
vue跨域问题解决(使用webpack打包的) 配置代理:(config下index.js文件) module.exports = { dev: { env: require('./dev.env') ...
- 通过javascript在iframe中加载html
在spring mvc中,虽然有时候,在控制器中设置返回值是json对象,但在拦截器出现错误的时候,仍然可能返回html(根据设置的不同),如果要展示这些html,最好把他们放入iframe中,以防这 ...
- STL源码分析之迭代器
前言 迭代器是将算法和容器两个独立的泛型进行调和的一个接口. 使我们不需要关系中间的转化是怎么样的就都能直接使用迭代器进行数据访问. 而迭代器最重要的就是对operator *和operator-&g ...
- elasticsearch学习(1)简单查询与聚合
elastic 被用作全文搜索.结构化搜索.分析以及这三个功能的组合 一个ElasticSearch集群可以包含多个索引, 每个索引包含多个类型 一个类型存储着多个文档 每个文档又有多个属性 索引(名 ...
- Entertainment Box Gym100781E(数据结构+贪心)
Entertainment Box 题意: 有n个节目,每个节目给出开始时间(st)和结束时间(en): 有k个内存条这k个内存条可以同时存储节目.如果节目j的开始时间stj 大于等于节目i的结束时 ...