Currency Exchange
Time Limit: 1000MS
Memory Limit: 30000K
Total Submissions: 22980
Accepted: 8294
Description
Several currency exchange points are working in our city. ...
分类:
其他好文 时间:
2015-08-19 16:47:47
阅读次数:
110
小P的故事——神奇的换零钱
Time Limit: 1000ms Memory limit: 65536K 有疑问?点这里^_^
题目描述
已知A国经济很落后,他们只有1、2、3元三种面值的硬币,有一天小P要去A国旅行,想换一些零钱,小P很想知道将钱N兑换成硬币有很多种兑法,但是可惜的是他的数学竟然是体育老师教的,所以他不会啊、、、他只好求助于你,你可以帮他解决吗?
提示:输入数据大于32000组。
输入
每行只有一个正整数N,N小于32768。
输出
对应每个输入,输出兑换方法数。...
分类:
其他好文 时间:
2015-08-19 16:47:34
阅读次数:
105
题目链接:https://leetcode.com/problems/ugly-number-ii/
题目:
Write a program to find the n-th
ugly number.
Ugly numbers are positive numbers whose prime factors only include 2,
3, 5. For example, 1,
...
分类:
其他好文 时间:
2015-08-19 16:46:37
阅读次数:
603
题目链接:
poj2942
题意:
有n个人,可以开多场圆桌会议
这n个人中,有m对人有仇视的关系,相互仇视的两人坐在相邻的位置
且每场圆桌会议的人数只能为奇书
问有多少人不能参加
解题思路:
首先构图,将所有的仇视关系视为一条边,最后再取已经得到的图的逆图,
这样图上连接的边就代表可以相邻而坐的关系
然后就是找奇圈了,首先就是要...
分类:
其他好文 时间:
2015-08-19 16:49:04
阅读次数:
109
Time Limit:1000MS Memory
Limit:32768KB 64bit IO Format:%I64d
& %I64u
Submit Status
Description
A certain prison contains a long hall of n cells, each right next to each other....
分类:
其他好文 时间:
2015-08-19 16:47:58
阅读次数:
92
同样是驾驭语言,写文章和写程序有何异同?...
分类:
其他好文 时间:
2015-08-19 16:46:29
阅读次数:
142
六、机器学习
1. 概述
机器学习就是计算机自动获取知识。
首先谈了什么是机器学习。机器学习的研究目标有三个:
1)人类学习过程的认知模型。
2)通用学习算法。
3)构造面向任务的专用学习系统(工程目标)。
然后谈了研究机器学习的意义。机器学习速度快、便于知识积累、学习结果易于传播。
...
分类:
其他好文 时间:
2015-08-19 16:48:00
阅读次数:
295
Description
Once upon a time, there was a traveler.
He plans to travel using stagecoaches (horse wagons). His starting point and destination are fixed, but he cannot determine his route. Your...
分类:
其他好文 时间:
2015-08-19 16:46:40
阅读次数:
175
实例:
NBA运动员翻译
UML类图:
实例实现代码:
//篮球运动员
abstract class Player
{
protected string name;
public Player(string name)
{
this.name = na...
分类:
其他好文 时间:
2015-08-19 16:45:06
阅读次数:
143
the best way to restore is to replace all the question marks by latin letters in such a way that the total sum of occurrences of all the strings from her dictionary in it is maximal....
分类:
其他好文 时间:
2015-08-19 16:44:56
阅读次数:
212
/*
思路:1.先选三个点
2.去掉同行情况
3.去掉同列情况
4.枚举矩形大小去掉重复情况
*/
#pragma comment(linker, "/STACK:1024000000,1024000000")
#include
#include
#include
#include
#include
#include
#include
#include
#in...
分类:
其他好文 时间:
2015-08-19 16:44:58
阅读次数:
136
Let's go home
Time Limit: 10000/1000 MS (Java/Others) Memory
Limit: 32768/32768 K (Java/Others)
Total Submission(s): 1616 Accepted Submission(s): 661
Problem Description
小时候,乡愁是一枚小...
分类:
其他好文 时间:
2015-08-19 16:45:55
阅读次数:
108
原题:main()
{
int a[5]={1,2,3,4,5};
int *ptr=(int *)(&a+1);
printf("%d,%d",*(a+1),*(ptr-1));
}程序输出是什么。
解答:
程序输出: 2,5
分析:
这里主要是考查关于指针加减操作的理解。
对指针进行加1操作,得到的是下一个元素的地址,而不是原有地址值直接加1...
分类:
其他好文 时间:
2015-08-19 16:43:57
阅读次数:
123
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5399
题意:给你m个映射,每个自变量x,对应一个f(x),这m个映射中有某一些已知的,给出你从1到n对应的映射值,剩下的一些不知道映射关系的,给你-1,要求找出符合条件的映射组合有多少组,其中要求是:对于i从1到n都满足f1(f2(……fm(i)))=i
思路:开个脑洞发现:如果-1的个数不止一个...
分类:
其他好文 时间:
2015-08-19 16:43:49
阅读次数:
137
#include
using namespace std;
class Complex
{
public:
// 带缺省值的构造函数
Complex(double real = 0, double image = 0)
{
cout << "带缺省值的构造函数" << endl;
_real = real;...
分类:
其他好文 时间:
2015-08-19 16:43:42
阅读次数:
97
上两篇文章主要讲述了view的measure过程,主要分析了xml文件中控件的height和width设置成不同值的时候,经过测量之后,如何计算出控件的真实高度。所以也就验证了我们经常所说的measure过程就是把match_parent等值转化成在具体设备上的具体的值。
本文主要分析一下layout的过程,同样我们以LinearLayout的layout过程为例。
在ViewR...
分类:
其他好文 时间:
2015-08-19 16:44:06
阅读次数:
121
Balanced NumberTime Limit: 10000/5000 MS (Java/Others)Memory Limit: 65535/65535 K (Java/Others)Total Submission(s): 2945Accepted Submission(s): 1348Pr...
分类:
其他好文 时间:
2015-08-19 16:41:14
阅读次数:
104