码迷,mamicode.com
首页 >  
搜索关键字:answer    ( 2371个结果
Codeforces 235B. Let's Play Osu!
235B - Let's Play Osu! Let us take a deep look in how this score is calculated. for a n long 'O' block, they contribute n2 to answer. Let us reformat this problem a bit and consider the foll...
分类:其他好文   时间:2014-09-03 21:20:27    阅读次数:369
Why does Http header contains "X-SourceFiles"?
Question:Using a FileStreamResult in ASP.NET MVC 3, I get a response header likeX-SourceFiles =?UTF-8?B?RDpcUHJvamVjdFxqYWNvYlx0ZXN0?=Answer:The heade...
分类:其他好文   时间:2014-09-03 12:58:36    阅读次数:418
求助 一个很简单的ACM题 java代码 自己电脑上测都是正确的 但提交总是wrong answer 先谢谢了
题意大致是,给出直角三角形a,b,c(c为斜边)中两个的值(都是正数),求值为-1的那个边。比如3 4 -1,就是求c的长度,输入0 0 0表结束,输出格式如下加粗部分,我自己测自己的运行结果都是正确的,不知为什么总是wa,求大神指点!Mathematics can be so easy when ...
分类:编程语言   时间:2014-09-02 17:12:54    阅读次数:259
Spoj 6779 Can you answer these queries VII 树链剖分 在树上任意路径的最大子段和 区间修改点权
题目链接:点击打开链接 题意: rt。。 在询问时,两端向上爬时记录从深度浅的到深度深的方向上的 (也就是左最大连续子段和) 最后两个点在同一条重链上时合并。 合并时要注意有4种情况, 详见代码。 线段树部分和5相似。 #include #include #include #include using namespace std; inline void rd(int &n)...
分类:其他好文   时间:2014-09-02 14:14:54    阅读次数:235
Eclipse - Mac Os Default JRE missing
转:http://stackoverflow.com/questions/1736993/eclipse-mac-os-default-jre-missing1) Follow Joshua's answer: "Help->Install New Software... Select: Galil...
分类:系统相关   时间:2014-09-01 19:08:23    阅读次数:412
Spoj 2916 Can you answer these queries V 线段树 求任意重叠区间的最大子段和
题目链接:点击打开链接 题意: T个测试数据 n个数字 q个询问 每个询问 : [x1, y1] [x2, y2]  问: int ans = -inf; for(int i = x1; i <= y1; i++) for(int j = max(x2, i); j <= y2; j++) ans = max(ans, query(i, j)); #include #inc...
分类:其他好文   时间:2014-09-01 17:50:03    阅读次数:227
Spoj 2713 Can you answer these queries IV 水线段树
题目链接:点击打开链接 题意: 给定n长的序列 下面2个操作 0 x y 给[x,y]区间每个数都 sqrt 1 x y 问[x, y] 区间和 #include #include #include #include #include #include #include #include using namespace std; #define ll long long...
分类:其他好文   时间:2014-09-01 10:47:03    阅读次数:223
Spoj 1716 Can you answer these queries III 线段树 单点修改 区间求最大子段和
题目链接:点击打开链接 == 原来写1的时候已经把更新函数写好了。。 #include #include #include #include #include #include #include using namespace std; #define N 50050 #define Lson(x) tree[x].l #define Rson(x) tree[x].r ...
分类:其他好文   时间:2014-08-31 20:08:01    阅读次数:247
Spoj 1557 Can you answer these queries II 线段树 任意区间最大子段和 不重复数字
题目链接:点击打开链接 每个点都是最大值,把一整个序列和都压缩在一个点里。 #include #include #include #include #include using namespace std; #define N 100005 #define Lson(x) (x<<1) #define Rson(x) (x<<1|1) #define L(x) tre...
分类:其他好文   时间:2014-08-31 14:33:31    阅读次数:169
一些编码时的老错误
编译时:1.定义结构体时没加分号。2.指针取地址没加 &;Runtime Error:1.scanf 没加 &;2.前向星存无向边的时候数组开的太小;Wrong Answer:1. 1左移 30位以上 没强制转换成 long long;2. if ()里 用 &,^, | 没考虑优先级,比如 if ...
分类:其他好文   时间:2014-08-29 10:35:07    阅读次数:139
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!