自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(136)
  • 资源 (17)
  • 收藏
  • 关注

原创 B - Machine Schedule(二分图匹配——匈牙利算法)

DescriptionAs we all know, machine scheduling is a very classical problem in computer science and has been studied for a very long history. Scheduling problems differ widely in the nature of the c

2014-08-20 21:06:43 324

原创 K - A/B(逆元)(拓展欧几里德)

Description要求(A/B)%9973,但由于A很大,我们只给出n(n=A%9973)(我们给定的A必能被B整除,且gcd(B,9973) = 1)。 Input数据的第一行是一个T,表示有T组数据。每组数据有两个数n(0  Output对应每组数据输出(A/B)%9973。 Sample

2014-08-13 16:38:50 833 1

原创 Strange Way to Express Integers(高精度---同余方程)(扩展欧几里德)

DescriptionElina is reading a book written by Rujia Liu, which introduces a strange way to express non-negative integers. The way is described as following:Choose k different positive

2014-08-12 14:50:36 461

原创 Heavy Cargo(弗洛伊德——最小生成树)

DescriptionBig Johnsson Trucks Inc. is a company specialized in manufacturing big trucks. Their latest model, the Godzilla V12, is so big that the amount of cargo you can transport with it is ne

2014-08-12 14:34:34 667

原创 Goldbach's Conjecture(数论--素数判断)

DescriptionIn 1742, Christian Goldbach, a German amateur mathematician, sent a letter to Leonhard Euler in which he made the following conjecture: Every even number greater than 4 can be wri

2014-08-12 14:29:55 386

原创 Prime Distance(筛选法求素数 )

DescriptionThe branch of mathematics called number theory is about properties of numbers. One of the areas that has captured the interest of number theoreticians for thousands of years is the qu

2014-08-12 14:06:08 500

原创 The Balance(扩展欧几里得算法)

扩展欧几里得

2014-08-12 13:54:55 516

原创 中国剩余定理

中国剩余定理介绍 在《孙子算经》中有这样一个问题:“今有物不知其数,三三数之剩二(除以3余2),五五数之剩三(除以5余3),七七数之剩二(除以7余2),问物几何?”这个问题称为“孙子问题”,该问题的一般解法国际上称为“中国剩余定理”。具体解法分三步: 1. 找出三个数:从3和5的公倍数中找出被7除余1的最小数15,从3和7的公倍数中找出被5除余1 的最小数21,最后从5和7的公倍数

2014-08-08 22:38:15 6997

原创 扩展欧几里得算法------扩展欧几里德算法

扩展欧几里得算法及其应用一、扩展欧几里得算法扩展欧几里得算法:对于不完全为 0 的非负整数 a,b,若gcd(a,b)表示 a,b 的最大公约数,必然存在整数对x,y ,使得 ax+by = gcd(a,b)。算法过程:设 a>b,当 b=0时,gcd(a,b)=a。此时满足ax+by = gcd(a,b)的一组整数解为x=1,y=0;当a*b!=0 时,设 a*x1+b*

2014-08-08 17:07:16 2233

原创 欧几里得算法-----欧几里德算法

欧几里得算法欧几里得算法又称辗转相除法,主要用于计算两个整数a,b的最大公约数。原理:gcd(a,b)=gcd(b,a mod b)(这里a>=b)         (gcd(a,b)=gcd(b,a)=gcd(-a,b)=gcd(|a|,|b|)证明gcd(a,b)=gcd(b,a mod b):a可以表示成a = kb + r,则r= a mod b   假设d是a,b

2014-08-08 16:05:51 835

原创 筛选法求素数

筛选法求素数:筛选素数的方法不是直接判断一个数是不是素数,而是将不是素数的数全部去除,剩余的就是素数了。1.如果区间包含1,首先将1标记为非素数。2.从下一个最小的素数a开始,将该素数的倍数(2a,3a,……,ka)全部标记为非素数。3.从a的后面找下一个最小的素数,重复2操作。4.重复2,3操作,直到所有元素都筛选完为止。例如:筛选1到25之间的素数①按部就班地按上面

2014-08-08 15:46:22 1523

原创 POJ 2503 Babelfish(二分查找)

DescriptionYou have just moved from Waterloo to a big city. The people here speak an incomprehensible dialect of a foreign language. Fortunately, you have a dictionary to help you understand

2014-08-08 10:47:23 907

原创 Phone List(前缀判断--二分查找)

DescriptionGiven a list of phone numbers, determine if it is consistent in the sense that no number is the prefix of another. Let’s say the phone catalogue listed these numbers:1. Emergency 911

2014-08-08 10:33:50 1241

原创 HDU 1251 统计难题(字典树)

DescriptionIgnatius最近遇到一个难题,老师交给他很多单词(只有小写字母组成,不会有重复的单词出现),现在老师要他统计出以某个字符串为前缀的单词数量(单词本身也是自己的前缀).  Input输入数据的第一部分是一张单词表,每行一个单词,单词的长度不超过10,它们代表的是老师交给Ignatius统计的单词,一个空行代表单词表的结束.第二部分

2014-08-08 10:30:06 542

原创 IMMEDIATE DECODABILITY(前缀)

DescriptionAn encoding of a set of symbols is said to be immediately decodable if no code for one symbol is the prefix of a code for another symbol. We will assume for this problem that all

2014-08-08 10:19:13 515

原创 POJ 1006 Biorhythms(中国剩余定理)

中国剩余定理 欧几里得 扩展欧几里得 数论 poj106DescriptionSome people believe that there are three cycles in a person's life that start the day he or she is born. These three cycles are the physical, emotional, and intellectual cycles, a

2014-08-06 21:17:07 648

原创 可怜的蒟蒻(找规律+欧几里得)

蒟蒻(拼音jǔ ruò,学名:Amorphophalms Konjac),日本又称菎蒻,天南星科魔芋属,多年生宿根性块茎草本植物。原产印度、锡兰、马来半岛,中国西南地区栽种已有多年历史,自古便是中国古书中的药草之一。分布于越南、喜马拉雅山地至泰国以及中国大陆的甘肃、宁夏至江南各省、陕西等地,生长于海拔310米至2,200米的地区,多生长于林缘、疏林下以及溪谷两旁湿润地。蒟蒻常被制作成为果冻类的

2014-08-05 11:54:05 819

原创 POJ 1061 青蛙的约会(扩展欧几里得)

Description两只青蛙在网上相识了,它们聊得很开心,于是觉得很有必要见一面。它们很高兴地发现它们住在同一条纬度线上,于是它们约定各自朝西跳,直到碰面为止。可是它们出发之前忘记了一件很重要的事情,既没有问清楚对方的特征,也没有约定见面的具体位置。不过青蛙们都是很乐观的,它们觉得只要一直朝着某个方向跳下去,总能碰到对方的。但是除非这两只青蛙在同一时间跳到同一点上,不然是永远都不可能

2014-08-05 11:14:00 459

原创 POJ 1220 NUMBER BASE CONVERSION(高精度--进制转换)

DescriptionWrite a program to convert numbers in one base to numbers in a second base. There are 62 different digits: { 0-9,A-Z,a-z } HINT: If you make a sequence of base conversions usi

2014-08-04 22:34:25 669

原创 高精度进制转换

高精度进制转换:

2014-08-04 17:18:40 2310 2

原创 圆圈圈(几何数学)

有两个圆圈圈,如图所示,要把它们放在矩形里,必须让两个圈圈的底部和矩形的底部相切,求矩形的最短宽度DInput 输入文件有多行,每行两个整数,格式如下R1   R2      R1,R2是两个圈圈的半径,0      R1=0,R2=0时输入结束Output 对应于输入的每一组数据,用单独的一行输出D的最小值,

2014-08-04 07:51:11 1058

原创 小辉辉130

智商(IQ)是智力商数的简称,指的是一种表示人的智力高低的数量指标。智商是智力年龄被生理年龄相除而得出的商数。智商表示人的聪明程度,智商越高,表示越聪明。智商在140以上的人通常被成为天才或近于天才,120-140为智力优异,110-120的人智力较高,90-110为普通智力,80-90 迟钝偶为低能,而70-80 介乎迟钝与低能之间(也可归入低能),70以下便确定为低能。以下是一张全球各地区

2014-08-04 07:43:58 596

原创 心情实验

单调

2014-08-03 23:54:42 451

原创 公交换号

本市8字头公交车路号本月将完成更换,所有8字头线路路号全部空出,为下一步规范9字头公交线路路号做出准备。 以下为公交车换号对应关系:801  601802  99808  608810  609814  614823  623826  626836  617846  619849  620852  621

2014-08-03 23:50:35 628

原创 POJ 1405 Heritage(高精度)

DescriptionYour rich uncle died recently, and the heritage needs to be divided among your relatives and the church (your uncle insisted in his will that the church must get something). There

2014-08-03 10:42:24 750

原创 POJ 1704 Georgia and Bob(尼姆博弈)

DescriptionGeorgia and Bob decide to play a self-invented game. They draw a row of grids on paper, number the grids from left to right by 1, 2, 3, ..., and place N chessmen on different grid

2014-08-02 10:46:01 638

原创 Matches Game(尼姆博弈)

尼姆博弈 随机博弈 奇异局势

2014-08-01 16:54:56 925

原创 UFOs

DescriptionVasya is a ufologist and his duties include observing Unidentified Flying Objects (UFOs) in the part of space bounded by a cube N × N ×N. The cube is divided into cubic sectors 1

2014-08-01 16:08:44 615

原创 POJ 1195Mobile phones

Suppose that the fourth generation mobile phone base stations in the Tampere area operate as follows.

2014-08-01 11:10:24 760

原创 POJ 1003 Hangover

DescriptionHow far can you make a stack of cards overhang a table? If you have one card, you can create a maximum overhang of half a card length. (We're assuming that the cards must be perpendicul

2014-08-01 07:59:15 380

原创 POJ 1004 Financial Management

Description Larry graduated this year and finally has ajob. He's making a lot of money, but somehow never seems to have enough. Larryhas decided that he needs to grab hold of his financial portfol

2014-08-01 07:32:10 377

原创 威佐夫博奕

威佐夫博奕

2014-07-31 21:19:01 814

原创 HDU2113 Secret Number(输出格式)

Description有一天, KIKI 收到一张奇怪的信, 信上要KIKI 计算出给定数各个位上数字为偶数的和. eg. 5548 结果为12 , 等于 4 + 8 KIKI 很苦恼. 想请你帮忙解决这个问题.  Input输入数据有多组,每组占一行,只有一个数字,保证数字在INT范围内. Output

2014-07-31 16:34:25 664

原创 HDU 2578 Dating with girls(1)

DescriptionEveryone in the HDU knows that the number of boys is larger than the number of girls. But now, every boy wants to date with pretty girls. The girls like to date with the boys with highe

2014-07-31 16:12:17 366

原创 HDU 2199 Can you solve this equation?(二分)

DescriptionNow,given the equation 8*x^4 + 7*x^3 + 2*x^2 + 3*x + 6 == Y,can you find its solution between 0 and 100;Now please try your lucky. InputThe first line of the input con

2014-07-31 15:57:57 287

原创 HDU 1969 Pie(二分查找)

二分法 hud1969 DescriptionMy birthday is coming up and traditionally I'm serving pie. Not just one pie, no, I have a number N of them, of various tastes and of various sizes. F of my friends are coming to my par

2014-07-31 15:25:54 487

原创 POJ 2965 The Pilots Brothers' refrigerator(暴力搜索)

DescriptionThe game “The Pilots Brothers: following the stripy elephant” has a quest where a player needs to open a refrigerator.There are 16 handles on the refrigerator door. Every handle c

2014-07-31 15:18:38 377

原创 HDU 1016 Prime Ring Problem(DFS)

DescriptionA ring is compose of n circles as shown in diagram. Put natural number 1, 2, ..., n into each circle separately, and the sum of numbers in two adjacent circles should be a prime.

2014-07-31 15:00:33 327

原创 POJ 1979 Red and Black(DFS)

DescriptionThere is a rectangular room, covered with square tiles. Each tile is colored either red or black. A man is standing on a black tile. From a tile, he can move to one of four adja

2014-07-31 14:40:18 419

原创 HDU 1518 Square(DFS)

DescriptionGiven a set of sticks of various lengths, is it possible to join them end-to-end to form a square?  InputThe first line of input contains N, the number of test cas

2014-07-31 14:38:48 376

Big C++ 源代码

Big C++ 是一本详细介绍C++的书,有英文版和中文版,该资源是原书附带的源代码,可以帮助读者学习原书的内容。

2018-07-31

罗塞塔石碑安卓版

罗塞塔石碑是一种最好的方式来教育自己另一种语言因为我们的语言学习软件解锁所有自然语言能力在几乎每个人。罗塞塔石碑语言学习选项仅用于学校、机构和无数个人拥有超过150世界各地的区域。罗塞塔石碑是世界排名第一的语言学习软件程序。 本资源是破解版的安卓版APP,软件安装后,可以自行下载课程,在线或者离线学习。 本人郑重声明,该资源仅限于分享学习,不得用于任何商业目的。一切后果与本人无关。

2018-06-09

高斯消去法求解线性方程组C/C++程序(输入输出支持分数和浮点数)

高斯消去法是求解线性方程组的一种实用方法,绝大多数以matlab程序居多,虽然有部分C/C++程序,但是他们都有一些不足之处。本程序采用C/C++语言,实现高斯消去法,输入输出结果均可以分数和浮点数的形式展现,满足更多人的需求。

2018-06-09

遗传算法与最小二乘法拟合函数比较的C/C++代码实现

对于任何函数,都可以运用泰勒公式展开为一元n次多项式,运用遗传算法拟合该曲线,求解系数,从而达到拟合曲线的目的,同时与最小二乘法相比较。

2018-06-09

STM8S芯片封装(32脚)

STM8系列的芯片封装,适用于Altium Designer软件,芯片32管脚

2017-03-03

单片机串口通信(与LabView)

简单实现单片机与LabView的通信,上下位机的程序

2016-08-02

C++大数模板

大数的加减乘除,C++,C语言

2016-07-15

USB转串口驱动(串口芯片的型号PL2303)(支持win8/8.1系统)

USB转串口驱动(串口芯片的型号PL2303)支持win2000,win7和XP系统,同时也支持win8/8.1系统

2016-07-12

USB转串口驱动(串口芯片的型号PL2303)

win2000,win7,XP系统下的USB转串口驱动(串口芯片的型号PL2303) 注意:不支持串口芯片的型号是PL-2303H、PL-2303HX(Rev A)、PL-2303HXA、PL-2303X、PL-2303XA。

2016-07-12

USB转串口驱动(串口芯片的型号CH340)

win7,XP系统下的USB转串口驱动,其中串口芯片的型号是CH340

2016-07-12

51单片机C语言60个复杂程序

24c02存储相关的程序(5个);DS1302 时钟相关的程序(6个);PCF8591相关程序(5个);串口通信相关程序(3个);红外接收相关程序(6个);18b20温度传感器相关程序(5个);双色点阵相关程序(5个)等等

2016-07-04

51单片机50个相对复杂一些的程序

51单片机50个相对复杂一些的程序 数码管的各种显示方式 矩阵按键的各种扫描方式 各种喇叭的声音(警车、救护车、消防车等) 步进机、直流电机、继电器 液晶显示器

2016-07-04

51单片机50个实用基本的程序

50个51单片机的基本程序,有对应的电路图,接口连接方式等 解压密码:20160808

2016-07-04

中国象棋的LABVIEW编程

中国象棋两人对弈的游戏方式,该游戏以LABVIEW为平台,实现了该游戏的功能,很好的给对LABVIEW感兴趣的学者以帮助,欢迎各位使用学习,批判指正。

2016-07-04

RMQ求区间最值(最大最小)

RMQ(Range Minimum/Maximum Query),即区间最大/小值查询,查询的时间复杂度为O(1)

2015-08-28

直角坐标系几何变换算法

二维图形几何变换算法(用VC++实现) 基本变换(平移、缩放、旋转) 复合变换(多次平移、缩放、旋转)

2015-08-28

空空如也

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

TA关注的人

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