解决超大数相加的问题的一种思路是把整形转化成字符串,废话不多说直接上代码,已经调试通过。
#include
#include
#include
using namespace std;
string add(string str1, string str2)
{
int i;
string str;
int len_str1 = str1.length();
int len_...
分类:
其他好文 时间:
2015-03-20 00:06:39
阅读次数:
247
题意:把H和m一一配对,他们所需走的最小步数和 为多少。
做法:用bfs 先找出 任意 H 和 m 直接的最小步数。记录下来。 然后像二分图一样建图。 起点到 所有home 流量1,费用0。 home 和man 之间的费用为距离,流量1,man和终点ee之间流量1,费用0。 建图完,然后用最小费用最大流 跑一边就ok了。...
分类:
其他好文 时间:
2015-03-20 00:04:11
阅读次数:
137
“机器学习:概念到理解“系列,我本着开放与共享(open and share)的精神撰写,目的是让更多的人了解机器学习的概念,理解其原理,学会应用。现在网上各种技术类文章很多,不乏大牛的精辟见解,但也有很多滥竽充数、误导读者的。这个系列对教课书籍和网络资源进行汇总、理解与整理,力求一击中的,通俗易懂。机器学习很难,是因为她有很扎实的理论基础,复杂的公式推导;机器学习也很简单,是因为对她不甚了解的人...
分类:
其他好文 时间:
2015-03-20 00:06:07
阅读次数:
194
本文主要整理简绍来自互联网的各项异性滤波的知识。
原文链接:http://www.linuxgraphics.cn/graphics/using_anisotropic_texture_filtering_in_opengl.html
基本的纹理过滤
纹理是数据的简单矩阵排列——例如,颜色数据、亮度数据或者颜色和alpha(透明度)数据。纹理数组中的每一个独立的数值通...
分类:
其他好文 时间:
2015-03-20 00:05:46
阅读次数:
346
Problem Description
In our daily life we often use 233 to express our feelings. Actually, we may say 2333, 23333, or 233333 ... in the same meaning. And here is the question: Suppose we have a matr...
分类:
其他好文 时间:
2015-03-20 00:00:50
阅读次数:
212
Given the value of a+b and ab you will have to find the value of an+bn
Input
The input file contains several lines of inputs. Each line except the last line contains 3 non-negative integers p, q...
分类:
其他好文 时间:
2015-03-20 00:01:31
阅读次数:
450
domino对流程设计是方便的,如果制作复杂逻辑的应用就难了,但是还是可以实现的,以前的一个bom管理系统,刚开始想使用java的ssh来做,后来为了统一平台,还是使用domino来做,经过长时间的研究终于出来了,这是使用xpages来做的,当然使用domino的form来做同样没有问题的,因为数据结构一样的,思路差不多,由于使用xpags已经久了,就不再使用form的web来做了。以下是界面,分...
分类:
其他好文 时间:
2015-03-19 23:59:13
阅读次数:
569
Problem Description
In order to get rid of Conan, Kaitou KID disguises himself as a teacher in the kindergarten. He knows kids love games and works out a new game called "hand in hand".
Initiall...
分类:
其他好文 时间:
2015-03-19 23:59:41
阅读次数:
435
《数据结构编程实验》 2.4.4Calendar 个人见解,求指教...
分类:
其他好文 时间:
2015-03-20 00:01:16
阅读次数:
464
原因:在Django项目下相应的应用下面的models.py配置的model(也就是class)没有创建成相应的表。
这是怎么回事呢?
首先,将models.py里面的model创建成对应的数据库表的执行命令(DOS命令)为:manage.py syncdb。
但是我自己的电脑上执行该命令时,显示.Unknown command:syncdb.执行...
分类:
其他好文 时间:
2015-03-19 23:59:59
阅读次数:
374
【思路】:递归的使用。
【AC代码】:
#include
#include
#include
#include
#include
using namespace std;
void fj(int n)
{
if (1 == n)
{
cout << char('A'-1+n);
}
else
{
fj(n-1);
cout << char('A'-1+n);
...
分类:
其他好文 时间:
2015-03-20 00:00:17
阅读次数:
338
【思路】:先打表,后循环。
【AC代码】:
#include
#include
#include
#include
#include
using namespace std;
#define MAX 10000
int prime_list[MAX], cnt = 0;
int isPrime(int n)
{
int i = 0;
for (i = 2; i <= sqr...
分类:
其他好文 时间:
2015-03-19 23:58:45
阅读次数:
481
思路:生成全排列,用next_permutation,注意生成之前先对那个字符数组排序。
AC代码:
#include
#include
#include
#include
#include
using namespace std;
char str[20];
int main() {
int n;
cin >> n;
while(n--) {
scanf("%...
分类:
其他好文 时间:
2015-03-19 23:58:30
阅读次数:
234
目录1、登录2、数据库连接3、配置用户和权限4、配置基本信息5、录入新生儿信息6、新生儿信息导出7、系统设置
分类:
其他好文 时间:
2015-03-19 23:56:09
阅读次数:
206
1.下载R最新版和RStudio最新版2.安装R到路径C:\Program Files\R\R-3.1.33.安装RStudio到路径C:\Program Files\R\R-3.1.3\RStudio提示:请把RStudio安装到R的安装路径
分类:
其他好文 时间:
2015-03-19 23:56:48
阅读次数:
129
SVN提交时,如果没有注释,在查阅历史时,会非常不方便。因此我们需要有一个让程序员提交代码时,强制添加注释的规则。下面看看在SVN中怎么实现。1. 推荐使用VisualSVN作为服务端(免费下载地址:http://www.visualsvn.com/)。安装完毕后,打开VisualSVN Serve...
分类:
其他好文 时间:
2015-03-19 23:55:33
阅读次数:
199
Fragment,即碎片。是3.0以后推出的组件。能够让UI布局更加灵活。比如有时候,屏幕大小差别很大的设备,我们可以只用一套布局,然后控制其中一个Fragment是否显示。现在大部分UI布局都提倡Activity只控制Fragment,Fragment再来控制里面七七八八的组件。关于Fragmen...
分类:
其他好文 时间:
2015-03-19 23:56:01
阅读次数:
201