自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 在java中调用js里的方法

在java中调用js里的方法:https://blog.csdn.net/hebo5207_/article/details/87935504java里的result类型根据js里的返回值变化

2021-01-07 17:01:45 229 1

原创 weblogic相关整理

weblogic12.2.1.3.0安装:https://www.cnblogs.com/abc789/p/11928423.htmlweblogic创建新域:weblogic_12.2.1.3\wls12213\wlserver\common\bin\config.cmdweblogic删除域:https://www.cnblogs.com/hujiapeng/p/7670321.html

2020-11-24 10:52:18 206

原创 java 三种文件读写的方法

import java.io.*;import java.nio.Buffer;import java.text.SimpleDateFormat;import java.util.Date;public class Main { public static void cinTest(){ BufferedReader br = new BufferedReader( new InputStreamReader(System.in) .

2020-06-15 17:40:41 230

原创 java 当前时间和日期and计算时间间隔

import java.text.SimpleDateFormat;import java.util.Date;public class Main { public static void main(String[] args) { try{ long start = System.currentTimeMillis(); SimpleDateFormat sdf = new SimpleDateFormat("y.

2020-06-14 16:28:22 487

原创 poj1981 & ACM-ICPC 2018 沈阳赛区网络预赛 E. The cake is a lie(单位圆覆盖)

单位圆覆盖的两个模板题poj1981#include<iostream>#include<cstring>#include<cstdio>#include<cmath>#include<algorithm>using namespace std;typedef long long ll;const do...

2019-05-06 21:34:47 165

原创 hdu2899:Strange fuction(模拟退火算法)

Problem Description Now, here is a fuction:   F(x) = 6 * x^7+8*x^6+7*x^3+5*x^2-y*x (0 &lt;= x &lt;=100) Can you find the minimum value when x is between 0 and 100.   Input Th...

2018-10-31 21:28:00 293

原创 poj:2420 A Star not a Tree?(模拟退火算法)

这个题和poj2069  都是用%lf过不了  改成%f就能过DescriptionLuke wants to upgrade his home computer network from 10mbs to 100mbs. His existing network uses 10base2 (coaxial) cables that allow you to connect any num...

2018-10-31 20:28:24 289

原创 poj2069:Super Star (模拟退火算法)

这个题用 %lf 过不了的,用%f就可以过 ,不知道为啥????Super StarTime Limit: 1000MS   Memory Limit: 65536K Total Submissions: 6651   Accepted: 1633   Special Judge DescriptionDuring a voyage of t...

2018-10-31 20:25:33 377 1

原创 poj2417: bsgs算法模板

bsgs算法用来解决有关A^x ≡ B (mod C)的方程, 求x把x看成 i*m-j,上面的式子就可以变成A^(i * m - j) ≡ B (mod C)    =&gt;    A^(i * m) ≡ B * A^j (mod C)具体解释看这个:https://blog.csdn.net/clover_hxy/article/details/50683832这个博客是用map...

2018-10-29 20:23:10 356

原创 upc9520: Knight (象棋马从(0,0)到(n,m)的最小步数)

题目描述有一张无限大的棋盘,你要将马从(0,0)移到(n,m)。每一步中,如果马在(x,y),你可以将它移动到(x+1,y+2),(x+1,y−2),(x−1,y+2),(x−1,y−2),(x+2,y+1),(x+2,y−1),(x−2,y+1)或(x−2,y−1)。你需要最小化移动步数。 输入第一行一个整数t表示数据组数 (1≤t≤1000)。每组数据一行两个整数n,m ...

2018-10-28 17:13:15 2413

原创 51nod1135 原根+模板

设m是正整数,a是整数,若a模m的阶等于φ(m),则称a为模m的一个原根。a^r ≡ 1(mod m)  最小的一个r就是a模m的阶。假如m是素数a^(m-1) ≡ 1 (mod m) 当且仅当指数为m-1时成立,a就是m的原根。(a^i)%m两两不同(0 &lt;= i &lt; p, 1 &lt; a &lt; p), a就是m的原根。假如m有原根那么它一共有φ(φ(m))个原...

2018-10-27 11:36:16 347 1

原创 第一类斯特林数、第二类斯特林数、贝尔数总结+模板

第一类斯特林数 解决问题:给n个元素,求出k个环排列的方法数 Stirling[n][k]11      12      3       16      11      6       124     50      35      10     1120    274     225     85     15     1720    1764    1624    735  ...

2018-10-26 21:23:47 1248

原创 51nod: 1225 n%i 余数之和

题意是给一个n 求 n%i 的和这个n比较大 (1e12), 所以不能直接去一个个的求n%i 可以写成 n - n/i * i (这里的'/'是整除) 这样的话我们要求的结果就是   只需要求出后面的就可以,这个可以分块来求,从第i个数到第 n / (n / i) 个数的     的结果都是相同的,所以可以把具有相同值得分成一块,可以直接求出这一块的结果。 下面有java大数和c+...

2018-10-20 10:38:44 241

原创 51nod1060最复杂的数 (反素数)

题目的意思是给一个数n,让你求1-n之间因子最多的数,如果因子个数相同输出最小的。其实这个的意思就是让你求一个最大的反素数。https://blog.csdn.net/ACdreamers/article/details/25049767#反素数这里面有讲的。  #include &lt;bits/stdc++.h&gt;using namespace std;typ...

2018-10-16 16:29:36 181

原创 整数分解使乘积最大

两种情况:一种是分解为的数可以相同,另一种是分解的数全都不相同。不能分出1,能多分出3就分出3。 从2开始2、3、4、5........这样分最大,如果有余下的数,就从后往前平均分给这些数。#include&lt;bits/stdc++.h&gt;using namespace std;typedef long long ll;const int mod = 1e9+7;inli...

2018-10-15 21:40:36 2063

原创 Wannafly挑战赛26:B冥土追魂(模拟?贪心?暴力?)

题目描述有一天 Misaka 和 Kuroko 在玩一个关于冥土追魂的游戏....Misaka和Kuroko在一个 n x m 的棋盘上玩游戏,每个格子上都放着一些呱太。游戏共进行 k 回合,每一回合 Kuroko会选**有呱太**的一行 i,在这之后Misaka会选择一列 j ,并拿走格子 (i, j) 上的所有呱太,Misaka希望自己拿走的呱太尽可能多,而Kuroko不想让Misaka...

2018-10-14 10:07:54 210

原创 卢卡斯定理lucas

 Lucas定理是用来求 c(n,m) mod p,p为素数的值。C(n,m)%p = C(n/p,m/p) * C(n%p,m%p) % p;lucas可以用递归来写:C(n,m)%p = Lucas(n,m)%p = C(n%p, m%p) * lucas(n/p, m/p) % p;需要预处理阶乘,大小根据mod变化而变化。 #include&lt;bits/s...

2018-10-12 13:46:50 339

原创 法里数列

数学上,n阶的法里数列是0和1之间最简分数的数列,由小至大排列,每个分数的分母不大于n。(百科上是这么写的的)一阶:0/1    1/1二阶:0/1    1/2    1/1三阶:0/1    1/3    1/2    2/3    1/1........................................七阶:0/1    1/7    1/6...

2018-10-09 17:01:30 581

原创 poj3348:Cows(凸包面积)

DescriptionYour friend to the south is interested in building fences and turning plowshares into swords. In order to help with his overseas adventure, they are forced to save money on buying fence p...

2018-10-07 10:33:47 337

原创 hdu2202:最大三角形(凸包+旋转卡壳)

  Problem Description 老师在计算几何这门课上给Eddy布置了一道题目,题目是这样的:给定二维的平面上n个不同的点,要求在这些点里寻找三个点,使他们构成的三角形拥有的面积最大。 Eddy对这道题目百思不得其解,想不通用什么方法来解决,因此他找到了聪明的你,请你帮他解决这个题目。     Input 输入数据包含多组测试用例,...

2018-10-07 10:06:28 480

原创 poj2187:Beauty Contest(凸包+旋转卡壳)

DescriptionBessie, Farmer John's prize cow, has just won first place in a bovine beauty contest, earning the title 'Miss Cow World'. As a result, Bessie will make a tour of N (2 &lt;= N &lt;= 50,000...

2018-10-07 09:42:30 138

原创 upc3020: Keeping the Dogs Apart

Despite the unfortunate incident last summer,which resulted in ten little puppies, you have been tasked with taking care of your neighbors’ dogs again. Shadow and Lydia may be very  cute mutts, but th...

2018-10-06 21:30:48 224

原创 hdu1007:Quoit Design(求最近点对)

  Problem Description Have you ever played quoit in a playground? Quoit is a game in which flat rings are pitched at some toys, with all the toys encircled awarded. In the field of Cybergr...

2018-10-04 21:57:46 235

原创 Chip Factory(01字典树求异或最大值)

题目描述 John is a manager of a CPU chip factory, the factory produces lots of chips everyday. To manage large amounts of products, every processor has a serial number. More specifically, the factory p...

2018-10-04 21:32:26 205

原创 51nod 1264 线段相交(保存一下模板)

用到了跨立实验和快速排斥实验#include&lt;bits/stdc++.h&gt;using namespace std;typedef long long ll;const double eps = 1e-8;const int maxn = 100005;struct point{ double xx,yy; point(double x=0,double y=0):...

2018-09-29 20:31:13 132

原创 51nod:1239 欧拉函数之和

对正整数n,欧拉函数是小于或等于n的数中与n互质的数的数目。此函数以其首名研究者欧拉命名,它又称为Euler's totient function、φ函数、欧拉商数等。例如:φ(8) = 4(Phi(8) = 4),因为1,3,5,7均和8互质。S(n) = Phi(1) + Phi(2) + ...... Phi(n),给出n,求S(n),例如:n = 5,S(n) = 1 + 1 + 2 ...

2018-08-28 10:44:22 714

原创 upc5222: Sum of the Line(容斥)

Consider a triangle of integers, denoted by T. The value at (r, c) is denoted by Tr,c , where 1 ≤ r and 1 ≤ c ≤ r. If the greatest common divisor of r and c is exactly 1, Tr,c = c, or 0 otherwise.Now...

2018-08-26 10:09:24 168

原创 hdu6434:Count(欧拉函数打表)

Problem DescriptionMultiple query, for each n, you need to getn i-1∑ ∑ [gcd(i + j, i - j) = 1]i=1 j=1 InputOn the first line, there is a positive integer T, which describe the number of que...

2018-08-25 09:30:37 256

原创 51nod 1352 集合计数(扩展欧几里得)

给出N个固定集合{1,N},{2,N-1},{3,N-2},...,{N-1,2},{N,1}.求出有多少个集合满足:第一个元素是A的倍数且第二个元素是B的倍数。提示:对于第二组测试数据,集合分别是:{1,10},{2,9},{3,8},{4,7},{5,6},{6,5},{7,4},{8,3},{9,2},{10,1}.满足条件的是第2个和第8个。 Input第1行:1个整...

2018-08-15 16:17:04 164

原创 6759: 异或序列(莫队算法)

已知一个长度为n的整数数列a1,a2,…,an,给定查询参数l、r,问在al,al+1,…,ar区间内,有多少子序列满足异或和等于k。也就是说,对于所有的x,y(l≤x≤y≤r),满足ax⊕ax+1⊕⋯⊕ay=k的x,y有多少组。 输入输入第一行为3个整数n,m,k。第二行为空格分开的n个整数,即a1,a2,…,an。接下来m行,每行两个整数lj,rj,代表一次查询。 输出...

2018-08-09 09:21:07 253

原创 2018 ACM 国际大学生程序设计竞赛上海大都会赛重现赛 A-Fruit Ninja(随机数)

Fruit Ninja is a juicy action game enjoyed by millions of players around the world, with squishy,splat and satisfying fruit carnage! Become the ultimate bringer of sweet, tasty destruction with every...

2018-08-06 10:34:40 237

原创 6575: 11(组合数)

You are given an integer sequence of length n+1, a1,a2,…,an+1, which consists of the n integers 1,…,n. It is known that each of the n integers 1,…,n appears at least once in this sequence.For each in...

2018-08-06 09:34:49 273

原创 Thinking-Bear magic(多边形面积)

In order to become a magical girl, Thinking-Bear are learning magic circle.He first drew a regular polygon of N sides, and the length of each side is a. He want to get a regular polygon of N sides, ...

2018-08-06 08:39:35 177

原创 2018"百度之星"程序设计大赛 - 资格赛1002子串查询(莫队算法)

Problem Description度度熊的字符串课堂开始了!要以像度度熊一样的天才为目标,努力奋斗哦!为了检验你是否具备不听课的资质,度度熊准备了一个只包含大写英文字母的字符串 A[1,n]=a1a2⋯anA[1,n] = a_1 a_2 \cdots a_nA[1,n]=a​1​​a​2​​⋯a​n​​,接下来他会向你提出 qqq 个问题 (l,r)(l,r)(l,r),你需要回答字...

2018-08-05 10:52:56 302

原创 6617:Finite Encyclopedia of Integer Sequences

In Finite Encyclopedia of Integer Sequences (FEIS), all integer sequences of lengths between 1 and N (inclusive) consisting of integers between 1 and K (inclusive) are listed.Let the total number of ...

2018-08-04 09:25:23 197

原创 牛客网暑期ACM多校训练营(第五场)j - plan(贪心)

There are n students going to travel. And hotel has two types room:double room and triple room. The price of a double room is p2 and the price of a triple room is p3Now you need to calulate the mini...

2018-08-03 17:05:04 257

原创 牛客网暑期ACM多校训练营(第五场)A-gpa(01分数规划)

Kanade selected n courses in the university. The academic credit of the i-th course is s[i] and the score of the i-th course is c[i].At the university where she attended, the final score of her is ...

2018-08-03 09:26:51 171

原创 UPC6352: Multiplayer Moo(dfs求连通块)

The cows have come up with a creative new game, surprisingly giving it the least creative name possible: "Moo".The game of Moo is played on an N×N grid of square cells, where a cow claims a grid cell...

2018-08-02 10:26:58 194

原创 UPC6581: Fennec VS. Snuke(dfs)

Fennec and Snuke are playing a board game.On the board, there are N cells numbered 1 through N, and N−1 roads, each connecting two cells. Cell ai is adjacent to Cell bi through the i-th road. Every c...

2018-08-01 10:41:02 254

原创 UPC6569: Built?(最小生成树)

There are N towns on a plane. The i-th town is located at the coordinates (xi,yi). There may be more than one town at the same coordinates.You can build a road between two towns at coordinates (a,b) ...

2018-07-31 10:54:26 238

空空如也

空空如也

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

TA关注的人

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