码迷,mamicode.com
首页 >  
搜索关键字:usaco 题解    ( 32152个结果
BZOJ 3211 花神游历各国 (树状数组+并查集)
题解:首先,单点修改求区间和可以用树状数组实现,因为开平方很耗时间,所以在这个方面可以优化,我们知道,开平方开几次之后数字就会等于1 ,所以,用数组记录下一个应该开的数,每次直接跳到下一个不是1的数字进行开平方,至于这个数组,可以用并查集维护。#include #include #include u...
分类:其他好文   时间:2014-07-21 09:10:28    阅读次数:224
noip2001提高组题解
今天继续感动滚粗。第一次提交170分,不能多说。第一题:一元三次方程明明是寒假讲分治的时候做过的题居然还是WA而且只拿了60分,说明知识掌握实在不够牢固。寒假做的是保留4位小数,原题只保留2位,又因为答案在[-100,100],所以直接枚举-10000到10000即可。然后鉴于寒假的时候写的二分,我...
分类:其他好文   时间:2014-07-21 00:38:29    阅读次数:319
[LeetCode 题解]:Candy
There areNchildren standing in a line. Each child is assigned a rating value.You are giving candies to these children subjected to the following requi...
分类:其他好文   时间:2014-07-20 23:13:23    阅读次数:329
孟道骥《代数学基础》2.1"分式域"习题解答
1.试问一个域$\mathbb F$的分式域是什么?解答 由于$\mathbb F$的分式域是包含他的最小的域,而$\mathbb F$本身已是域,所以说$\mathbb F$的分式域就是自己.2.证明Gsuss整数环$\mathbb Z[\sqrt{-1}]$是交换整环,并求其分式域?证明 由.....
分类:其他好文   时间:2014-07-20 23:09:13    阅读次数:1661
hnu7/20比赛 BUG 题解
http://acm.hnu.cn/online/?action=problem&type=show&id=12833&courseid=268hnu 7/20 简单的题 小BUG y==2 时 n==x 时 不用再单独讨论 因为第一组数据可以看出 是我太傻逼 唉#include#include.....
分类:其他好文   时间:2014-07-20 23:02:10    阅读次数:310
亲和串
hdu2203:http://acm.hdu.edu.cn/showproblem.php?pid=2203题意:给定两个字符串s1和s2,如果能通过s1循环移位,使s2包含在s1中,那么我们就说s2 是s1的亲和串。题解:把s1拼接两遍,然后直接用KMP搞定。例如 s1=abcd,s2==bcda...
分类:其他好文   时间:2014-07-20 22:26:00    阅读次数:290
Ubuntu 14.04系统下,休眠之后无法启动的问题解决
引言: 在升级Ubuntu系统到14.04之后,在系统进入休眠之后,就无法重新启动了,直接死机了,哪里出错了呢?...
分类:其他好文   时间:2014-07-20 22:23:13    阅读次数:407
【LeetCode】【Python题解】Reverse Integer
Reverse digits of an integer. Example1: x = 123, return 321 Example2: x = -123, return -321 click to show spoilers. Have you thought about this? Here are some good questions to ask before c...
分类:编程语言   时间:2014-07-20 22:12:03    阅读次数:251
【LeetCode】【Python题解】Same Tree
Given two binary trees, write a function to check if they are equal or not. Two binary trees are considered equal if they are structurally identical and the nodes have the same value. 比较两个...
分类:编程语言   时间:2014-07-20 22:12:03    阅读次数:273
BZOJ 3038 上帝造题的七分钟2 (并查集+树状数组)
题解:同BZOJ 3211 花神游历各国,需要注意的是需要开long long,还有左右节点需要注意一下。#include #include #include #include using namespace std;typedef long long LL;LL a[100005],c[10000...
分类:其他好文   时间:2014-07-20 21:37:34    阅读次数:199
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!