码迷,mamicode.com
首页 >  
搜索关键字:lightoj    ( 714个结果
Good or Bad LightOJ - 1051
A string is called bad if it has 3 vowels in a row, or 5 consonants in a row, or both. A string is called good if it is not bad. You are given a strin ...
分类:其他好文   时间:2017-09-13 00:21:48    阅读次数:191
Fast Bit Calculations LightOJ - 1032
A bit is a binary digit, taking a logical value of either 1 or 0 (also referred to as "true" or "false" respectively). And every decimal number has a ...
分类:其他好文   时间:2017-09-10 16:38:16    阅读次数:147
LightOJ - 1282 Leading and Trailing(数学题)
题目链接:点我点我 题意:给n,k,求nk的前三位和后三位。 题解:后三位直接快速幂。前三位的话,我们假设n=10a,nk=10a*k=10x+y=10x * 10y。 我们把10x当做位数(就是让他它尽可能大,比如n的k次方为12345,10x就相当于104),10y当做表示的值(12345这个数 ...
分类:其他好文   时间:2017-09-08 21:43:47    阅读次数:139
Discovering Gold LightOJ - 1030
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. Initially you are i ...
分类:其他好文   时间:2017-09-07 18:13:37    阅读次数:173
LightOJ - 1370 Bi-shoe and Phi-shoe(欧拉函数)
题目链接:http://lightoj.com/volume_showproblem.php?problem=1370 题意:在数论,对正整数n,欧拉函数是小于n的正整数中与n互的数的数目(φ(1)=1) 题解: ...
分类:其他好文   时间:2017-09-07 17:04:25    阅读次数:127
LightOJ 1364 树形DP
52张扑克牌,问拿到指定数量的4个花色的最少次数期望是多少,其中拿到joker必须马上将其视作一种花色,且要使后续期望最小。 转移很容易想到,主要是两张joker的处理,一个状态除了普通的4个方向的转移,当没拿到joker时还要增加拿到joker的期望,根据题意直接在当前状态下找最小的期望计算即可。 ...
分类:其他好文   时间:2017-09-02 11:23:39    阅读次数:144
LightOJ - 1370 Bi-shoe and Phi-shoe
题目链接:http://lightoj.com/login_main.php?url=volume_showproblem.php?problem=1370 题目大意:给N个数a[i], N <= 1e6,问使 Φ(x) >= a[i] 成立的最小x的所有x的和是多少。 解题思路:我们知道的是对于素 ...
分类:其他好文   时间:2017-08-29 22:58:23    阅读次数:272
LightOJ 1132 Summing up Powers:矩阵快速幂 + 二项式定理
题目链接:http://lightoj.com/volume_showproblem.php?problem=1132 题意: 给定n、k,求(1K + 2K + 3K + ... + NK) % 232。 题解: 设sum(i) = 1K + 2K + 3K + ... + iK 所以要从sum( ...
分类:其他好文   时间:2017-08-19 00:53:48    阅读次数:232
Light oj 1074 spfa
https://vjudge.net/problem/LightOJ-1074 首先吐槽一个单词,directional是有方向的,undirectional是无向的,这个unidirectional是tm单向的。。。。好吧我又学会一个单词。 由于有负边权,用spfa好啦,判断负环时不要遇见就ret ...
分类:其他好文   时间:2017-08-14 20:06:12    阅读次数:126
Throwing Dice LightOJ - 1064
n common cubic dice are thrown. What is the probability that the sum of all thrown dice is at least x? Input Input starts with an integer T (≤ 200), d ...
分类:Windows程序   时间:2017-08-10 20:57:36    阅读次数:261
714条   上一页 1 ... 18 19 20 21 22 ... 72 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!