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 ...
随机推荐
- JS监听事件错误:Uncaught TypeError: xx(函数名)is not a function at HTMLInputElement.onclick
事件监听一直出错,提示已定义的函数名不是一个函数,折腾了好久才想到,原来是函数名和JS内部关键字重名造成的. 以前也遇到过这种情况,但因为发生的概率比较小,就没太在意,但是这次感觉这方面确实需要注意, ...
- vue刷新本页面
顶层app.vue页面 <template> <div id="app"> <router-view v-if="isRouterAlive ...
- Oracle 【基 本 操 作】
1.日期时间 select SYSDATE from DUAl; select TO_CHAR(SYSDATE, 'YYYY-MM-DD') from DUAL; select TO_CHAR(SYS ...
- 【转载】xShell5 利用 sftp 在本地和服务器之间传输文件
sftp是Secure File TransferProtocol的缩写,安全文件传送协议.可以为传输文件提供一种安全的加密方法.sftp与 ftp有着几乎一样的语法和功能.SFTP为 SSH的一部分 ...
- discourse论坛迁移
在源设备的操作备份数据文件tar -czvf discoursefile716.tar.gz /var/discourse然后把此discoursefile716.tar.gz文件传到需要迁移的设备上 ...
- python--(十五步代码学会进程)
python--(十五步代码学会进程) 一.进程的创建 import time import os #os.getpid() 获取自己进程的id号 #os.getppid() 获取自己进程的父进程id ...
- hdu2010 水仙花数【C++】
水仙花数 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submis ...
- python编码小记
Python编码小记 标签(空格分隔): 编程 python 1.list类型remove()操作 列表对象执行remove()函数后,会自动退出循环,所以如果想利用一个单独的for循环删除列表中多个 ...
- spring入门笔记
这是我自己学习韩顺平老师spring视频的笔记,个人认为初学spring的韩顺平老师的讲的很好,比较通俗易懂,资源地址我已经给了,可以自己配合视频看.主要介绍了ioc和aop,这也是spring框架最 ...
- MySQL的各种网络IO超时的用法和实现
2016-04-06 赵伟 数据库开发者 客户端C API 在C API中调用mysql_options()来设置mysql_init() 所创建的连接对象的属性,使用这三个选项可以设置连接超时和读写 ...