码迷,mamicode.com
首页 >  
搜索关键字:return    ( 60766个结果
[LeetCode-JAVA] Shortest Palindrome
题目:Given a string S, you are allowed to convert it to a palindrome by adding characters in front of it. Find and return the shortest palindrome you ca...
分类:编程语言   时间:2015-06-18 23:42:31    阅读次数:198
【枚举】bzoj3391 [Usaco2004 Dec]Tree Cutting网络破坏
#includeusing namespace std;#define N 10001int n;int v[N(n>>1)) return 0; for(int i=first[U];i;i=next[i]) if(v[i]!=fa[U]&&size[v[i]]>(n>>...
分类:其他好文   时间:2015-06-18 23:37:19    阅读次数:177
【树上莫队】【带修莫队】【权值分块】bzoj4129 Haruna’s Breakfast
#include#include#include#includeusing namespace std;#define N 50001int v[N=n) return; T[x]+=op; if(!T[x]) --sumv[nu2[x]]; else if(o...
分类:其他好文   时间:2015-06-18 23:33:29    阅读次数:97
九度1022 -栈 - 游船出租
这题目我想到的是栈,当然感觉也是想多了,, #include #include #include using namespace std; double round(double r) { return (r > 0.0) ? floor(r + 0.5) : ceil(r - 0.5); } stackdata[100]; int sum; int num; int pre; void...
分类:其他好文   时间:2015-06-18 22:20:47    阅读次数:113
c++字符串的包含问题
//暴力轮询法 #include using namespace std; int Grial(char *str1, char *str2) { if (str2 == NULL)return 1; char *p1 = str1; char *p2 = str2; while (*p2 != '\0') { while...
分类:编程语言   时间:2015-06-18 22:16:20    阅读次数:204
In Java, will the code in the finally block be called and run after a return statement is executed?
In Java, will the code in the finally block be called and run after a return statement is executed?
分类:编程语言   时间:2015-06-18 21:45:47    阅读次数:116
模板整理
欧拉函数模板//直接求解欧拉函数int euler(int n){ //返回euler(n) int res=n,a=n; for(int i=2;i*i1) res=res/a*(a-1); return res;}//筛选法打欧拉函数表#define Max 100000...
分类:其他好文   时间:2015-06-18 21:35:56    阅读次数:113
LeetCode —— Invert Binary Tree
struct TreeNode* invertTree(struct TreeNode* root){ if ( NULL == root ) { return NULL; } if ( NULL == root->left && NULL == root->r...
分类:其他好文   时间:2015-06-18 21:33:27    阅读次数:106
leetCode(13):Remove Duplicates from Sorted List II
Given a sorted linked list, delete all nodes that have duplicate numbers, leaving only distinct numbers from the original list. For example, Given 1->2->3->3->4->4->5, return 1->2->5. Given 1->...
分类:其他好文   时间:2015-06-18 19:58:22    阅读次数:90
js调用asp.net 后台属性值
后台代码: public string title = "js调用后台属性值"; public void getContent() { return title; }前台代码: var title = "<%=getC...
分类:Web程序   时间:2015-06-18 19:41:54    阅读次数:169
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!