- 博客(79)
- 资源 (9)
- 收藏
- 关注
原创 51 nod 1046 A^B Mod C(快速幂取余)
1046 A^B Mod C基准时间限制:1 秒 空间限制:131072 KB 分值: 0 难度:基础题 收藏 关注给出3个正整数A B C,求A^B Mod C。例如,3 5 8,3^5 Mod 8 = 3。Input3个正整数A B C,中间用空格分隔。(1 Output输出计算结果
2015-08-31 10:47:31 1054
原创 SDUTOJ 3309乱七八糟的图(spfa)
乱七八糟的图Time Limit: 4000ms Memory limit: 65536K 有疑问?点这里^_^题目描述给一个连通无向图,图有n个顶点m条边,可能会有重边,无自环。然后给一个出发点st,现在这个st到其他每一个顶点都有一个最短距离。然后,让你删除一些边,剩下的边构成了一个新连通无向图,要求在新图中,出发点st到其他任何一个顶
2015-08-31 10:41:20 631
原创 51nod 1265 四点共面(判四点共面)
1265 四点共面基准时间限制:1 秒 空间限制:131072 KB 分值: 0 难度:基础题 收藏 关注给出三维空间上的四个点(点与点的位置均不相同),判断这4个点是否在同一个平面内(4点共线也算共面)。如果共面,输出"Yes",否则输出"No"。Input第1行:一个数T,表示输入的测试数量(1 <= T
2015-08-31 08:38:57 1047 2
原创 51nod 1264 线段相交(判线段相交 包括端点和部分重合)
1264 线段相交基准时间限制:1 秒 空间限制:131072 KB 分值: 0 难度:基础题 收藏 关注给出平面上两条线段的两个端点,判断这两条线段是否相交(有一个公共点或有部分重合认为相交)。 如果相交,输出"Yes",否则输出"No"。Input第1行:一个数T,表示输入的测试数量(1 <= T <= 1
2015-08-30 20:10:37 1478
原创 HDU 5423 Rikka with Tree(水题)
Rikka with TreeTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 292 Accepted Submission(s): 149Problem DescriptionAs we know,
2015-08-30 15:12:18 599
原创 SDUTOJ 3307 (01背包求第K大)
aTime Limit: 1000MS Memory limit: 65536K题目描述有一个奇怪的超市,超市中有m种商品,每个商品都有一个都价格pi,超市的特殊在于:如果顾客买第i件商品,就会赠送ci个欢乐豆,一种商品对一个顾客只会赠送一次。现在有两个好朋友来超市买东西,他们都带了n元钱,如果最终两个人得到的欢乐豆不一样,他们的欢乐豆的和的最大值是多少
2015-08-30 14:31:20 495
原创 51nod 1393 0和1相等串(鸽巢原理)
1393 0和1相等串基准时间限制:1 秒 空间限制:131072 KB 分值: 20 难度:3级算法题 收藏 关注给定一个0-1串,请找到一个尽可能长的子串,其中包含的0与1的个数相等。Input一个字符串,只包含01,长度不超过1000000。Output一行一个整数,最长的0与1的个数相等的子串的
2015-08-30 14:22:12 1093
原创 51nod 1136 欧拉函数
1136 欧拉函数基准时间限制:1 秒 空间限制:131072 KB 分值: 0 难度:基础题 收藏 关注对正整数n,欧拉函数是少于或等于n的数中与n互质的数的数目。此函数以其首名研究者欧拉命名,它又称为Euler's totient function、φ函数、欧拉商数等。例如:φ(8) = 4(Phi(8) = 4),因为1,3,5,7
2015-08-27 21:28:51 982
原创 51nod 1137 矩阵乘法(矩阵快速乘法)
1137 矩阵乘法基准时间限制:1 秒 空间限制:131072 KB 分值: 0 难度:基础题 收藏 关注给出2个N * N的矩阵M1和M2,输出2个矩阵相乘后的结果。Input第1行:1个数N,表示矩阵的大小(2 <= N <= 100)第2 - N + 1行,每行N个数,对应M1的1行(0 <= M1
2015-08-27 19:33:42 1055
原创 51nod 1212 无向图最小生成树(最小生成树)
1212 无向图最小生成树基准时间限制:1 秒 空间限制:131072 KB 分值: 0 难度:基础题 收藏 关注N个点M条边的无向连通图,每条边有一个权值,求该图的最小生成树。Input第1行:2个数N,M中间用空格分隔,N为点的数量,M为边的数量。(2 <= N <= 1000, 1 <= M <= 5
2015-08-27 19:19:47 3753 1
原创 51nod 1242 斐波那契数列的第N项(矩阵快速幂)
1242 斐波那契数列的第N项基准时间限制:1 秒 空间限制:131072 KB 分值: 0 难度:基础题 收藏 关注斐波那契数列的定义如下:F(0) = 0F(1) = 1F(n) = F(n - 1) + F(n - 2) (n >= 2)(1, 1, 2, 3, 5, 8, 13, 21, 34, 5
2015-08-27 16:43:04 1256
原创 POJ 2342 Anniversary party(树形DP入门)
Anniversary partyTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 5343 Accepted: 3054DescriptionThere is going to be a party to celebrate the 80-th Anniv
2015-08-26 15:45:58 455
原创 HDU 4277 USACO ORZ(DFS爆搜 + set判重复)
USACO ORZTime Limit: 5000/1500 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3948 Accepted Submission(s): 1319Problem DescriptionLike everyone, c
2015-08-26 11:05:00 851
原创 HDU 4273 Rescue(三维凸包 + 重心)
RescueTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 398 Accepted Submission(s): 296Problem DescriptionI work at NASA outer
2015-08-26 10:58:15 921
原创 HDU 4272 LianLianKan(模拟)
LianLianKanTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3292 Accepted Submission(s): 996Problem DescriptionI like playing
2015-08-26 10:54:13 962
原创 HDU 4268 Alice and Bob(贪心)
Alice and BobTime Limit: 10000/5000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3700 Accepted Submission(s): 1174Problem DescriptionAlice and B
2015-08-26 10:50:15 751
原创 HDU 4267 A Simple Problem with Integers(树状数组)
A Simple Problem with IntegersTime Limit: 5000/1500 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 4475 Accepted Submission(s): 1378Problem Descriptio
2015-08-26 10:46:04 920
原创 C. Lengthening Sticks(Codeforces Round #317 容斥定理)
C. Lengthening Stickstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given three sticks with positi
2015-08-24 20:41:24 1045
原创 HDU 1695 GCD(容斥定理)
GCDTime Limit: 6000/3000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 7529 Accepted Submission(s): 2773Problem DescriptionGiven 5 integers: a, b
2015-08-24 20:30:06 722
原创 HDU 2841 Visible Trees(容斥定理)
Visible TreesTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1951 Accepted Submission(s): 792Problem DescriptionThere are man
2015-08-24 20:22:09 567
原创 HDU 4135 Co-prime(容斥定理)
Co-primeTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2445 Accepted Submission(s): 918Problem DescriptionGiven a number N,
2015-08-24 20:03:38 523
原创 B. Order Book(Codeforces Round #317 )
B. Order Booktime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputIn this task you need to process a set of sto
2015-08-23 02:58:45 1192
原创 A. Arrays(Codeforces Round #317 水题)
A. Arraystime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given two arrays A and B consisting of
2015-08-23 02:52:47 961
原创 POJ 3368 Frequent values(RMQ)
Frequent valuesTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 15134 Accepted: 5519DescriptionYou are given a sequence of n integers a1 , a2 , ... , an
2015-08-21 15:55:37 564
原创 POJ 3264 Balanced Lineup(RMQ/线段树)
Balanced LineupTime Limit: 5000MS Memory Limit: 65536KTotal Submissions: 40312 Accepted: 18936Case Time Limit: 2000MSDescriptionFor the daily milking, Farme
2015-08-21 15:25:59 586
原创 POJ 2492 A Bug's Life(并查集拓展)
A Bug's LifeTime Limit: 10000MS Memory Limit: 65536KTotal Submissions: 31306 Accepted: 10268DescriptionBackground Professor Hopper is researching the sexual beh
2015-08-20 20:35:17 732
原创 POJ 1703 Find them, Catch them(并查集拓展)
Find them, Catch themTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 36534 Accepted: 11209DescriptionThe police office in Tadu City decides to say ends
2015-08-20 20:32:11 493
原创 HDU 5410 CRB and His Birthday(DP)
CRB and His BirthdayTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 83 Accepted Submission(s): 45Problem DescriptionToday is
2015-08-20 19:36:18 1217 2
原创 HDU 4046 Panda(树状数组)
PandaTime Limit: 10000/4000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2838 Accepted Submission(s): 945Problem DescriptionWhen I wrote down th
2015-08-19 16:32:07 662
原创 HDU 2689 Sort it(树状数组求逆序数)
Sort itTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3418 Accepted Submission(s): 2478Problem DescriptionYou want to proces
2015-08-19 16:27:30 1121
原创 HDU 1541 Stars(树状数组)
StarsTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 6479 Accepted Submission(s): 2570Problem DescriptionAstronomers often ex
2015-08-18 09:57:13 658
原创 B. Vanya and Books( Codeforces Round #308 (Div. 2) 简单题)
B. Vanya and Bookstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputVanya got an important task — he should e
2015-08-18 09:16:14 847
原创 POJ 3321 Apple Tree(树状数组)
Apple TreeTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 21635 Accepted: 6573DescriptionThere is an apple tree outside of kaka's house. Every autumn, a
2015-08-17 21:34:25 621
原创 C. Arthur and Table(Codeforces Round #311 (Div. 2) 贪心)
C. Arthur and Tabletime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputArthur has bought a beautiful big table
2015-08-17 18:10:59 814
原创 B. Pasha and Tea( Codeforces Round #311 (Div. 2) )
B. Pasha and Teatime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputPasha decided to invite his friends to a te
2015-08-17 18:00:38 504
原创 A. Ilya and Diplomas( Codeforces Round #311 (Div. 2) )
A. Ilya and Diplomastime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputSoon a school Olympiad in Informatics w
2015-08-17 17:27:05 918
原创 C. Case of Matryoshkas( Codeforces Round #310 (Div. 2) 模拟)
C. Case of Matryoshkastime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputAndrewid the Android is a galaxy-fam
2015-08-17 17:23:37 819
原创 B. Case of Fake Numbers( Codeforces Round #310 (Div. 2) 简单题)
B. Case of Fake Numberstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputAndrewid the Android is a galaxy-fa
2015-08-17 17:20:10 904
原创 A. Case of the Zeros and Ones(Codeforces Round #310 (Div. 2) 栈)
A. Case of the Zeros and Onestime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputAndrewid the Android is a gala
2015-08-17 17:08:12 676
原创 HDU 5391 Zball in Tina Town(判素数)
Zball in Tina Town Accepts: 397 Submissions: 2463 Time Limit: 3000/1500 MS (Java/Others) Memory Limit: 262144/262144 K (Java/Others)Problem DescriptionTina Town is a
2015-08-15 21:27:23 687
java8中文版API
2018-03-23
idea使用教程2017
2017-09-22
23种设计模式代码实现
2017-09-07
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人