上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 425 下一页
摘要: HDU4544 Tags:数据结构,贪心Analysis:将兔子的血量从大到小排序,将箭的杀伤力从大到小排序,对于每一个兔子血量,将比他大的杀伤力大的剑压入优先队列,优先队列自己重写,让它每次抛出的数为价钱最小。Code:#include #include #include #include using namespace std;typedef long long LL;const int maxn = 100010;struct tt { int d; int p; bool operator t.d||(d==t.d&&p, greater > q;int ma.. 阅读全文
posted @ 2013-08-08 20:30 坚固66 阅读(144) 评论(0) 推荐(0) 编辑
摘要: Problem DescriptionOverpower often go to the playground with classmates. They play and chat on the playground. One day, there are a lot of stars in the sky. Suddenly, one of Overpower’s classmates ask him: “How many acute triangles whose inner angles are less than 90 degrees (regarding stars as poin 阅读全文
posted @ 2013-08-07 19:36 坚固66 阅读(140) 评论(0) 推荐(0) 编辑
摘要: Problem D: Servicing stations A company offers personal computers for sale in N towns (3 #include #include using namespace std;int n, m;int x, y;int snum[40];int map[40][40];int f[40];int minn;bool cmp(int a, int b){ return a > b;}void dfs(int star, int num, int tnum){ if (tnum >= minn) return 阅读全文
posted @ 2013-08-07 19:34 坚固66 阅读(254) 评论(0) 推荐(0) 编辑
摘要: Problem DescriptionNow you are given one non-negative integer n in 10-base notation, it will only contain digits ('0'-'9'). You are allowed to choose 2 integers i and j, such that: i!=j, 1≤i#include int main(){ int n,i,j,len,l,MIN,flag,ss; char str[1005],min_c,t; scanf("%d" 阅读全文
posted @ 2013-08-07 19:32 坚固66 阅读(142) 评论(0) 推荐(0) 编辑
摘要: 题意:有N个数,问最多能取出多少个连续的数([-100000000, 100000000]),使得剩下的数的和模M的值等于原来N个数的和模M的值(0 >求前i项和,前i项和模M后为r,标记出r最早出现的位置L和最后出现的位置R,那么,把(L, R]这个区间删掉,就原来序列和模M没有影响。注意:-5 % 3 = ?,在这里,可以按 -5 % 3 = 1计算。特别注意:如果这N个数下标从1开始,那么0最早出现的位置不是0在序列中最早出现的位置,而是下标0这个位置(假设0第一次出现在第i位,那么把前i个数拿掉,是不是可以?)。#include #include #include using n 阅读全文
posted @ 2013-08-07 19:30 坚固66 阅读(101) 评论(0) 推荐(0) 编辑
摘要: 任务调度的crond常用命令 crond 是linux用来定期执行程序的命令。当安装完成操作系统之后,默认便会启动此任务调度命令。crond命令每分锺会定期检查是否有要执行的工作,如果有要执行的工作便会自动执行该工作有关linux crond的概念使用方法可参考一下文章:http://blog.csdn.net/tianlesoftware/article/details/5315039http://www.zeuux.com/blog/content/2914/http://www.cnblogs.com/jiafan/articles/1153066.html 在使用过程中会经常遇到一些. 阅读全文
posted @ 2013-08-07 19:28 坚固66 阅读(135) 评论(0) 推荐(0) 编辑
摘要: Addition ChainsAn addition chain fornis an integer sequencewith the following four properties:a0= 1am=na0 and are both valid solutions when you are asked for an addition chain for 5.Input SpecificationThe input file will contain one or more test cases. Each test case consists of one line containing. 阅读全文
posted @ 2013-08-07 19:26 坚固66 阅读(280) 评论(0) 推荐(0) 编辑
摘要: 异常信息:org.apache.jasper.JasperException:java.lang.ClassCastException:org.apache.catalina.util.DefaultAnnotationProcessorcannotbecasttoorg.apache.AnnotationProcessoratorg.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:522)atorg.apache.jasper.servlet.JspServletWrapper 阅读全文
posted @ 2013-08-07 19:24 坚固66 阅读(194) 评论(0) 推荐(0) 编辑
摘要: 首先:在 JDK 的 java.net 包中已经提供了访问 HTTP 协议的基本功能:HttpURLConnection。但是对于大部分应用程序来说,JDK库本身提供的功能还不够丰富和灵活。 在Android中,androidSDK中集成了Apache的HttpClient模块,用来提供高效的、最新的、功能丰富的支持 HTTP 协议工具包,并且它支持 HTTP 协议最新的版本和建议。使用HttpClient可以快速开发出功能强大的Http程序。 其次:HttpClient是个很不错的开源框架,封装了访问http的请求头,参数,内容体,响应等等, HttpURLConnection是jav... 阅读全文
posted @ 2013-08-07 19:22 坚固66 阅读(356) 评论(0) 推荐(0) 编辑
摘要: main函数 Go中有且只有一个main函数,而且main函数必须在package main当中.main函数无返回值也无参数,如果希望获取从命令行传递的参数有其他包解决这个问题. C++中main函数可以有参数也可以有返回值.而且声明的时候有返回值,在main函数体中可以不写,编译器会帮你补上. 虽然Python中有类似main的东西,在代码中我们也可以看见if __name__ == '__main__': 这样的代码,但实质上Python就不需要main函数.当一个Python文件被当作可以直接 运行的模块的时候,它的__name__属性将是一个特殊的默... 阅读全文
posted @ 2013-08-07 19:20 坚固66 阅读(357) 评论(0) 推荐(0) 编辑
上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 425 下一页