自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(19)
  • 收藏
  • 关注

原创 HDU1018求大数N!的位数【取对数】

Problem DescriptionIn many applications very large integers numbers are required. Some of these applications are using keys for secure transmission of data, encryption, etc. In this problem you are

2017-03-31 21:23:25 619

原创 SDNU1011 盒子与球【第二类Stirling数模板】

1011.盒子与球Time Limit: 1000 MS Memory Limit: 32768 KBTotal Submission(s): 584 Accepted Submission(s): 139Description现有r个互不相同的盒子和n个互不相同的球,要将这n个球放入r个盒子中,且不允许有空盒子。则有多少种放法?

2017-03-31 20:35:51 537

原创 GUN与许可证

递归缩写 递归缩写(Recursive acronym)即递归首字缩写,是一种在全称中递归引用它自己的缩写。中文名递归缩写外文名Recursive Acronym实    质递归首字缩写内    容全称中递归引用它自己的缩写机    构麻省理工大学基本信息编辑

2017-03-29 19:54:42 1451

转载 CC、GCC以及G++

Linux 下 的 cc 和 gcc 在Linux下一会看到cc,另一会又看到gcc,感觉又点混乱的样子。它们是同一个东西么,有啥区别呢 一分为二地看: 首先,如果讨论范围在Unix和Linux之间,那么cc和gcc不是同一个东西。cc来自于Unix的c语言编译器,是 c compiler 的缩写。gcc来自Linux世界,是GNU compiler

2017-03-29 19:44:58 692

转载 Printf的用法

头文件:#include printf()函数是最常用的格式化输出函数,其原型为:    int printf( char * format, ... );printf()会根据参数 format 字符串来转换并格式化数据,然后将结果输出到标准输出设备(显示器),直到出现字符串结束('\0')为止。参数 format 字符串可包含下列三种字符类型:一般文

2017-03-24 20:44:16 830

原创 读写文件函数【模板】

#include #include #include #include #include #include #include using namespace std;//写入文件(每行不超过80个字符,-1为结束标志;再输出文件内容void WriteText(FILE *fw){ char str[81]; printf("Enter string with

2017-03-24 18:58:49 336

原创 给函数传递数组地址

#include #include #include #include #include using namespace std;void f(int b[],int n,int flag)//冒泡:flag=1从小到大;flag=0从大到小{ for(int i=0; i<n-1; i++) for(int j=i+1; j<n; j++)

2017-03-24 17:43:53 1166

转载 while函数输入

http://blog.csdn.net/xxiaobaib/article/details/509159111.知识点1:scanf函数的返回值可以简单理解为为输入变量的个数:Both scanf and wscanf return the number of fields successfully convertedand assigned; the return val

2017-03-24 17:16:59 476

转载 struct和typedef struct

http://www.cnblogs.com/qyaizs/articles/2039101.htmlstruct和typedef struct分三块来讲述:  1 首先://注意在C和C++里不同    在C中定义一个结构体类型要用typedef:    typedef struct Student    {    int a;

2017-03-23 19:22:46 178

原创 等做题

mr prpoj 2407poj 1284poj 2478poj 3090HDU  3864 中国剩余定理POJ 1006HDU 1573(一般情形HDU 1930(一般情形

2017-03-19 17:32:43 303

原创 HDU1576A/B【扩展欧几里德算法模板】

思路:设(A/B)%9973 = K, 则A/B = k + 9973x  (x未知), 因此A = kB + 9973xB,又A%9973 = n, 所以kB%9973 = n,  故kB = n + 9973y (y未知)故(k/n)B +(-y/n)*9973 = gcd(B,9973) = 1扩展欧几里得 求出k/n,  再乘以个n,记得取模,就是answer了

2017-03-19 17:08:22 275

原创 POJ2407 Relatives 【欧拉函数模板】

https://vjudge.net/problem/POJ-2407RelativesTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 14310 Accepted: 7151DescriptionGiven n, a positi

2017-03-19 15:52:44 296

原创 HDU3349lazy gege【水】

http://acm.hdu.edu.cn/showproblem.php?pid=3349Problem DescriptionGege hasn't tidied his desk for long,now his desk is full of things.This morning Gege bought a notebook,while to find

2017-03-12 19:40:57 255

原创 HDU3347Calculate the expression 【map】

http://acm.hdu.edu.cn/showproblem.php?pid=3347Problem DescriptionYou may find it’s easy to calculate the expression such as:a = 3b = 4c = 5a + b + c = ?Isn’t it? 

2017-03-12 19:36:43 233

原创 c语言中unsigned int和int的区别

void foo(void) {   unsigned int a = 6;   int b = -20;   (a+b > 6) ? puts("> 6") : puts(" }    这个问题测试你是否懂得C语言中的整数自动转换原则,我发现有些开发者懂得极少这些东西。不管如何,这无符号整型问题的答案是输出是 ">6"。原因是当表达式中存在有符号类型和无符号类型时所有

2017-03-12 19:30:09 8718

原创 HDU3343An ant's story【水】

http://acm.hdu.edu.cn/showproblem.php?pid=3343//橡皮绳拉到一定程度就拉不动了,坑.......Problem DescriptionLong long ago, there is an ant crawling on an L-meter magic rubber band with speed of v cm/s

2017-03-12 19:17:14 331

原创 HDU3346Lucky Number【水】

http://acm.hdu.edu.cn/showproblem.php?pid=3346Problem DescriptionTo Chinese people, 8 is a lucky number. Now your task is to judge if a number is lucky.We say a number is lucky i

2017-03-12 19:00:01 255

原创 HDU3348Coins贪心 【数学,贪心】

贪心算法(又称贪婪算法,greedy algorithm)是指,总是做出在当前看来是最好的选择。也就是说,不从整体最优上加以考虑,而是局部最优解。无后效性,即某个状态以前的过程不会影响以后的状态,只与当前状态有关。        http://acm.hdu.edu.cn/showproblem.php?pid=3348Problem Descrip

2017-03-12 18:41:17 401

转载 STL in ACM

STL in ACM 1 概况.......................................................... 21.1 STL是什么............................................... 21.2 为什么我们需要学习STL..................................

2017-03-03 20:29:41 1617

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除