码迷,mamicode.com
首页 >  
搜索关键字:lightoj    ( 714个结果
LightOJ 1012 简单bfs,水
1、LightOJ 1012 Guilty Prince 简单bfs 2、总结:水 题意:迷宫,求有多少位置可去 #include<iostream> #include<cstring> #include<cmath> #include<queue> #include<algorithm> #inc ...
分类:其他好文   时间:2016-09-04 20:42:11    阅读次数:123
LightOj1074 - Extended Traffic(SPFA最短路)
题目链接:http://lightoj.com/volume_showproblem.php?problem=1074 题意:有n个城市,每个城市有一个拥堵值a[i],m条单向路u到v,从u到v所需时间是(a[v]-a[u])^3, q个查找,查找从起点1到点u的最短时间是多少;如果不能到达或者时间 ...
分类:其他好文   时间:2016-08-31 22:12:44    阅读次数:619
LightOJ 1212 <Double Ended Queue >
Description A queue is a data structure based on the principle of 'First In First Out' (FIFO). There are two ends; one end can be used only to insert ...
分类:其他好文   时间:2016-08-30 16:00:57    阅读次数:170
LightOJ 1138 二分
1138 - Trailing Zeroes (III) PDF (English) Statistics Forum Time Limit: 2 second(s) Memory Limit: 32 MB You task is to find minimal natural number N, ...
分类:其他好文   时间:2016-08-28 11:08:40    阅读次数:150
LightOJ 1094
题意:就是求一个树的直径,也就是求任意两点的最大距离。 做法:跑两遍DFS,详见代码。 ...
分类:其他好文   时间:2016-08-24 19:01:53    阅读次数:170
(LightOJ 1149) Factors and Multiples
题目链接:http://lightoj.com/volume_showproblem.php?problem=1149 方法:二分匹配,求最大匹配数 ...
分类:其他好文   时间:2016-08-23 16:51:34    阅读次数:211
LightOJ 1030 数学期望
Time Limit:2000MS Memory Limit:32768KB 64bit IO Format:%lld & %llu Submit Status Practice LightOJ 1030 uDebug Description You are in a cave, a long ca ...
分类:其他好文   时间:2016-08-20 10:04:51    阅读次数:127
LightOJ 1341 Aladdin and the Flying Carpet 算数基本定理
题目大意:给出面积n,和最短边m,求能形成的矩形的个数(不能为正方形)。 题目思路:根据算数基本定理有: 1.每个数n都能被分解为:n=p1^a1*p2^a2*^p3^a3……pn^an(p为素数); 2.n的正因数的个数sum为:sum=(1+a1)*(1+a2)*(1+a3)……(1+an); ...
分类:其他好文   时间:2016-08-19 23:49:50    阅读次数:174
LightOJ 1370 Bi-shoe and Phi-shoe 数论
题目大意:f(x)=n 代表1-x中与x互质的数字的个数。给出n个数字a[i],要求f(x)=a[i],求x的和。 思路:每个素数x 有x-1个不大于x的互质数。则f(x)=a[i],若a[i]+1为素数则x=a[i]+1,否则a[i]++直到得到素数位置。 #include<cstdio> #in ...
分类:其他好文   时间:2016-08-19 23:47:24    阅读次数:141
LightOJ 1030 Discovering Gold(期望)
Description You are in a cave, a long cave! The cave can be represented by a 1 x N grid. Each cell of the cave can contain any amount of gold. Initial ...
分类:其他好文   时间:2016-08-19 13:04:09    阅读次数:161
714条   上一页 1 ... 32 33 34 35 36 ... 72 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!