自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 Floyd-warshall 算法 //最短路

适用范围:无负权回路即可,边权可正可负,运行一次算法即可求得任意两点间最短路时间复杂度:O(n^3)最短路径:一个图里有很多边,每条边有权值,两点之间的权值最小的路径。 负权回路:一个环(某点出发走了一圈还回到原点)里的权值和为负数(环里的每个权值可正可负,但和为负)。 首先,存在负权回路的图里没有最短路,因为只要一直走这个回路就可以达到无限短。所以以下算法都是基于无负权回路的前提下。实际...

2018-04-30 16:13:04 308

原创 HDU 2544 最短路 // Floyd-warshall 算法 边权可正可负

HDU 2544 最短路 Problem Description在每年的校赛里,所有进入决赛的同学都会获得一件很漂亮的t-shirt。但是每当我们的工作人员把上百件的衣服从商店运回到赛场的时候,却是非常累的!所以现在他们想要寻找最短的从商店到赛场的路线,你可以帮助他们吗?Input输入包括多组数据。每组数据第一行是两个整数N、M(N<=100,M<=10000),N...

2018-04-30 16:10:12 383

原创 Anagram // 深度优先搜索 (代码不正确)

You are to write a program that has to generate all possible words from a given set of letters. Example: Given the word "abc", your program should - by exploring all different combination of the three...

2018-04-30 10:57:23 502

原创 大明A+B //Java中BigDecimal高精度小数 BigDecimal类stripTrailingZeros()和toPlainString()函数的表达

大明A+BTime Limit: 3000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 14556    Accepted Submission(s): 5344Problem Description 话说,经过了漫长的一个多月,小明已经成长了许多,所以他改了一个名字叫...

2018-04-29 10:37:52 1483

原创 Hat's Fibonacci //Java大数数组相加

Hat's FibonacciTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 12609    Accepted Submission(s): 4234Problem Description A Fibonacci sequence is ...

2018-04-29 10:03:52 171

原创 大菲波数 // Java大数数组相加

大菲波数Time Limit: 1000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 22693    Accepted Submission(s): 8150Problem Description Fibonacci数列,定义如下:f(1)=f(2)=1f(n)=f(...

2018-04-29 09:44:35 695

原创 POJ 1703 Find them, Catch them // 种类并查集 自己的详细理解过程 回溯过程

Find them, Catch themDescriptionThe police office in Tadu City decides to say ends to the chaos, as launch actions to root up the TWO gangs in the city, Gang Dragon and Gang Snake. However, the police...

2018-04-27 16:52:36 402

原创 POJ 1703 ----Find them, Catch them // 种类并查集 同类型题目::POJ1182-----食物链

Find them, Catch themThe police office in Tadu City decides to say ends to the chaos, as launch actions to root up the TWO gangs in the city, Gang Dragon and Gang Snake. However, the police first need...

2018-04-25 20:57:37 217

原创 HTML(3) 企业实训

<html><head> <title></title></head><body> <form action="" method="post"> 用户名:<input type="text" id="txt&q

2018-04-25 15:32:25 183

原创 Goldbach //Java大数素数做法 素数判定Miller_Rabin

Goldbach Description:Goldbach's conjecture is one of the oldest and best-known unsolved problems in number theory and all of mathematics. It states:Every even integer greater th...

2018-04-24 20:06:28 983

原创 I Reversion Count //java大数问题

Description:There is a positive integer X, X's reversion count is Y. For example, X=123, Y=321; X=1234, Y=4321. Z=(X-Y)/9, Judge if Z is made up of only one number(0,1,2...9), like Z=11,Z=111,Z=222,do...

2018-04-23 20:59:30 222

原创 L. Nise-Anti-AK Problem //找最大元素

Description:Peppa has been learning math recently, he is trapped by a easy problem. He is given a sequence of n numbers, what he need to do is finding the number ai which have ...

2018-04-23 19:57:15 244

原创 并查集模板

#include<stdio.h> #include<stdlib.h> #include<string.h> #include<iostream> #include<algorithm> using namespace std; int c[30001]; int find(int x) { ...

2018-04-18 19:28:11 134

原创 A - The Suspects ///并查集

A - The Suspects Severe acute respiratory syndrome (SARS), an atypical pn...

2018-04-17 21:26:05 211

原创 筛选素数模板

#include<stdio.h>#include<stdlib.h>#include<string.h>#include<iostream>#include<algorithm>using namespace std;#define maxn 65000+10typedef long long ll;ll prime[m...

2018-04-17 19:42:48 128

原创 Carmichael Numbers //快速幂 筛选素数

Carmichael Numbers Time Limit: 1 Sec  Memory Limit: 64 MBSubmit: 17  Solved: 8[Submit][Status][Discuss]DescriptionCertain cryptographic algorithms make use of big prime numbers. However, checking whet...

2018-04-17 19:41:07 269

原创 快速幂模板

typedef long long ll;ll pow(ll x,ll n,ll mod){ ll res=1; while(n>0) { if(n%2==1) { res=res*x; res=res%mod; } x=x*x; x=x%mod; n>>=1; } return res...

2018-04-17 19:37:55 2651

原创 欧几里得

参考网址:::https://blog.csdn.net/LOI_DQS/article/details/49488851?locationNum=2

2018-04-16 21:52:36 385

原创 快速幂基本知识

参考博客:::https://blog.csdn.net/java_c_android/article/details/55802041挑战程序设计竞赛  122页Carmichael Numbers 时间限制: 1 Sec  内存限制: 64 MB提交: 16  解决: 7[提交][ 状态 ][ 讨论版]题目描述Certain cryptographic algorithms make use ...

2018-04-15 12:39:55 177

原创 大数题解&大数题目

http://www.cnblogs.com/yuyixingkong/p/3919899.htmlhttps://blog.csdn.net/tt2767/article/details/45420067

2018-04-15 12:39:00 396

原创 同余算法

  我的阿紫 310多页参考网址 :::https://blog.csdn.net/chocolate_22/article/details/6458029

2018-04-15 12:20:35 478

原创 POJ 2635 The Embarrassed Cryptographer //大数求余 素数打表 同余法

The Embarrassed CryptographerDescriptionThe young and very promising cryptographer Odd Even has implemented the security module of a large system with thousands of users, which is now in use in his co...

2018-04-15 12:12:09 193

原创 CF 贪心+dp(动态规划) 01背包(做与不做)

CFTime Limit: 1000 msMemory Limit: 65536 KiBProblem DescriptionLYD loves codeforces since there are many Russian contests. In an contest lasting for T minutes there are n problems, and for the ith pro...

2018-04-14 17:13:05 288

原创 company 贪心

companyTime Limit:1000 msMemory Limit:65536 KiBProblem DescriptionThere are n kinds of goods in the company, with each of them has a inventory of and direct unit benefit . Now you find due to price...

2018-04-14 15:25:55 241

原创 quadratic equation //逻辑思路 离散数学的p->q条件

quadratic equationTime Limit: 2000 msMemory Limit: 131072 KiBProblem DescriptionWith given integers a,b,c, you are asked to judge whether the following statement is true: "For any x, if a⋅+b⋅x+c=0, th...

2018-04-14 09:04:25 575

原创 Parity check 同余与模算术 /大数也可以

Parity checkTime Limit: 2000 msMemory Limit: 524288 KiBProblem DescriptionFascinated with the computer games, Gabriel even forgets to study. Now she needs to finish her homework, and there is an easy ...

2018-04-13 21:30:00 222

原创 sum of power

sum of powerTime Limit: 1000 msMemory Limit: 65536 KiBProblem DescriptionCalculate  mod (1000000000+7) for given n,m.InputInput contains two integers n,m(1≤n≤1000,0≤m≤10).OutputOutput the answer in a ...

2018-04-13 20:57:01 238

原创 C - Prime Ring Problem

C - Prime Ring Problem A 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 prim...

2018-04-12 19:56:51 292

原创 B - Red and Black // dfs 深度搜索

B - Red and Black There is a rectangular room, covered with ...

2018-04-12 19:12:28 222

原创 A - 棋盘问题

A - 棋盘问题在一个给定形状的棋盘(形状可能是不规则的)上面摆放棋子,棋子没有区别。要求摆放时任意的两个棋子不能放在棋盘中的同一行或者同一列,请编程求解对于给定形状和大小的棋盘,摆放k个棋子的所有可行的摆放方案C。Input输入含有多组测试数据。每组数据的第一行是两个正整数,n k,用一个空格隔开,表示了将在一个n*n的矩阵内描述棋盘,以及摆放棋子的数目。 n <= 8 , ...

2018-04-11 20:46:24 1786

原创 B - N!

B - N! Given an integer N(0 ≤ N ≤ 10000), your task is to calculate N! Input One N in one line, process to the end of file. Output For each N, output N! in one ...

2018-04-09 21:51:28 229

原创 E - Monkey and Banana

E - Monkey and Banana A group of researchers are designing an experimen...

2018-04-09 20:08:57 213

原创 D - Ignatius and the Princess IV

D - Ignatius and the Princess IV "OK, you are not too bad, em... But you can never pass the next test." feng5166 says. "I will tell you an odd number N, and then N integers. There will be a special ...

2018-04-08 19:54:20 241

原创 B - Sumsets 找规律 / 01背包

B - Sumsets Farmer John commanded his cows to search for dif...

2018-04-07 18:24:40 202

原创 C - Coins 多重背包

C - Coins People in Silverland use coins.They have coins of value A1,A2,A3...An Silverland dollar.One day Tony opened his money-box ...

2018-04-07 18:20:43 511

原创 A - Cow Bowling

A - Cow BowlingThe cows don't use actual bowling balls when they go bowling. They each take a number (in the range 0..99), though, and line up in a standard bowling-pin-like triangle like this: ...

2018-04-07 10:23:09 198

原创 A - A + B Problem II

A - A + B Problem II I have a very simple problem for you. Given two in...

2018-04-06 20:04:11 250

原创 A - Automatic Judge

A - Automatic Judge Welcome to HDU to take part in the second CCPC girls’...

2018-04-06 17:28:34 222

原创 E - Easy Summation

You are encountered with a traditional problem concerning the sums of powers. Given two integers n and k. Let f(i)=ik, please evaluate the sum f(1)+f(2)+...+f(n). The problem is simple as it looks, a...

2018-04-06 16:43:17 185

原创 A. 塞特斯玛斯塔

A. 塞特斯玛斯塔Time Limit: 1000msMemory Limit: 262144KB64-bit integer IO format: %lld      Java class name: MainSubmit Status PID: 53080quailty是一名狂热的ACM音游选手,沉迷各种音乐游戏,比如Lunatic Rave 2,osu!之类的。今天,quailty玩的是国内...

2018-04-06 12:11:20 333

空空如也

空空如也

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

TA关注的人

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