题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1098
题意:
求针对输入的k,能否找到一个最小的a,使得当x取任意自然数时,f(x)=5*x^13+13*x^5+k*a*x始终能被65整除。
我的解法:
取f(1),f(2)两个特殊值得。
1. 5+13+k*a=65*T1 ->> k*a=47+65*T...
分类:
其他好文 时间:
2015-04-03 17:33:51
阅读次数:
121
思路:
走了好多弯路,最后才发现直接根据定义来就可以了,左右子树的深度不超过1且左右子树都是平衡二叉树,就是这么简洁明快。...
分类:
其他好文 时间:
2015-04-03 17:32:35
阅读次数:
128
题目:
Given a set of distinct integers, S, return all possible subsets.
Note:
Elements in a subset must be in non-descending order.
The solution set must not contain duplicate subsets.
...
分类:
其他好文 时间:
2015-04-03 17:30:47
阅读次数:
107
http://acm.nyist.net/JudgeOnline/problem.php?pid=975
这是我的源码。一直超时,一直超时。
还有itoa函数函数的使用。可以改成sprintf(str, " %d" , num);
但是杭电的ACM complier不接受itoa函数,原因是itoa是c++的扩展函数,当然不能指望任何编译器都可以编译了~~
注:
...
分类:
其他好文 时间:
2015-04-03 17:32:11
阅读次数:
308
题目:
Given a collection of integers that might contain duplicates, S, return all possible subsets.
Note:
Elements in a subset must be in non-descending order.
The solution set must not ...
分类:
其他好文 时间:
2015-04-03 17:28:54
阅读次数:
107
ZigZag Conversion
The string "PAYPALISHIRING" is written in a zigzag pattern on a given number
of rows like this: (you may want to display this pattern in a fixed font for better legibility)
...
分类:
其他好文 时间:
2015-04-03 17:31:12
阅读次数:
160
Redis是Remote Dictionary Server(Redis) 的缩写,或许光听名字你就能猜出它大概是做什么的。不错,它是一个由Salvatore Sanfilippo编写的key-value存储系统,是一个使用ANSI C语言编写、遵守BSD协议、支持网络、可基于内存亦可持久化的日志型的Key-Value数据库,并提供多种语言的API。...
分类:
其他好文 时间:
2015-04-03 17:30:39
阅读次数:
121
cocos2d-x 3.3 源码分析...
分类:
其他好文 时间:
2015-04-03 17:27:50
阅读次数:
131
我一个项目的代码上线,是先checkout出代码然后整体copy过去的,可以避免在线上直接svn拉代码时候影响服务。
其中有这么两句:find . -type d -name ".svn" | xargs rm -rf
find script/ -type f -exec dos2unix -o {} \;感觉xargs和exec很像,就学习了一下两者的使用和区别。
-exec
1.参...
分类:
其他好文 时间:
2015-04-03 17:27:10
阅读次数:
114
虚拟现实开发、虚拟现实软件开发、虚拟现实软件定制、VR软件开发、虚拟现实应用开发、oculus软件开发、oculus软件外包、oculus rift软件开发、oculus rift软件定制、oculus rift软件应用开发、oculus rift游戏开发、oculus rift游戏外包...
分类:
其他好文 时间:
2015-04-03 17:26:42
阅读次数:
200
“Google Earth与ArcGIS数据交互”系列共分为四篇,此为最后一篇。主要解决DEM的下载及用下载到的DEM进行三维建模。...
分类:
其他好文 时间:
2015-04-03 17:26:39
阅读次数:
101
标注是显示在地图上的文字信息,它是出图中不可或缺的重要元素。标注的样式丰富,并且放置位置灵活,因此带来了对标注控制的难度。例如地质图里的上下标,或是一些分式的标注,就必须使用代码编程来实现。这篇文章就主要结合几个实例来讨论一下标注的使用技巧,以及在ArcGIS软件中的实现。...
分类:
其他好文 时间:
2015-04-03 17:25:49
阅读次数:
144
as相关的问题:
this 关键字 的作用范围的一些问题?
匿名函数中,为什么不能访问全局变量?...
分类:
其他好文 时间:
2015-04-03 17:26:00
阅读次数:
76
水题,直接贴代码,注意几种控制浮点输出的方法:e格式,以指数形式输出实数。g格式:自动选f格式或e格式中较短的一种输出,且不输出无意义的零。
代码:
//poj 3940
//sep9
#include
using namespace std;
const int maxL=64;
int cnt[maxL+10];
double color[maxL];
double area[maxL]...
分类:
其他好文 时间:
2015-04-03 17:27:07
阅读次数:
109
说到png图片压缩,可能很多人知道TinyPNG这个网站。但PS插件要钱(虽然有破解的),Developer API要连到他服务器去,不提网络传输速度,Key也是有每月限制的。
但是貌似tinyPNG是使用了来自于 pngquant 的技术,至少在 http://pngquant.org/ 中是如此声称的:TinyPNG and Kraken.io — on-line in...
分类:
其他好文 时间:
2015-04-03 17:24:41
阅读次数:
218
回文数猜想
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 4940 Accepted Submission(s): 2958
Problem Description
一个正整数,如果从左向右读(称之为正序数)和从右...
分类:
其他好文 时间:
2015-04-03 17:24:52
阅读次数:
135
Problem Description
As we all know the Train Problem I, the boss of the Ignatius Train Station want to know if all the trains come in strict-increasing order, how many orders that all the trains can get out of the railway.
Input
The input contains sever...
分类:
其他好文 时间:
2015-04-03 17:22:48
阅读次数:
145