码迷,mamicode.com
首页 >  
搜索关键字:return    ( 60766个结果
gcd模板
1 #include 2 using namespace std; 3 int gcd(int a,int b){ 4 if(a>b){ 5 if(a%b!=0) return gcd(b,a%b); 6 else return b; 7 } 8...
分类:其他好文   时间:2014-07-23 22:10:07    阅读次数:330
[Django](1093, "You can't specify target table。。错误
dele_id=Fee_details_invoices.objects.filter(fee_detail_id__in=fee_id_list,return_type=‘2‘).values_list(‘fee_detail_id‘,flat=True) Fee_details_invoices.objects.filter(fee_detail_id__in=dele_id).delete()报错:django.db.utils.DatabaseError:(1093,"Youcan‘tspeci..
分类:其他好文   时间:2014-07-23 21:15:16    阅读次数:253
hdu 1258 Sum It Up(dfs)
# include # include using namespace std; int flag,t,n,a[10010],cot[10010],vis[100010]; void dfs(int x,int sum,int count) { int i; if(sum>t) return ; else if(sum==t) { for(i=0;i<count;i++)...
分类:其他好文   时间:2014-07-23 21:04:53    阅读次数:211
Leetcode:Palindrome Partitioning II
Description:Given a strings, partitionssuch that every substring of the partition is a palindrome.Return the minimum cuts needed for a palindrome part...
分类:其他好文   时间:2014-07-23 20:34:35    阅读次数:235
java内部类
#1,成员内部类 public?class?TestInnerClass?{ ????private?int?id; ????private?String?name; ???? ????public?String?getName()?{ ????????return?name; ????} ???...
分类:编程语言   时间:2014-07-23 18:14:36    阅读次数:248
[Django](1093, "You can't specify target table 'fee_details_invoices' for update in FROM clause") 错误
dele_id = Fee_details_invoices.objects.filter(fee_detail_id__in=fee_id_list, return_type='2').values_list('fee_detail_id', flat=True) Fee_details_invoices.objects.filter(fee_detail_id__in=dele_id).del...
分类:其他好文   时间:2014-07-23 18:11:56    阅读次数:239
HDU 1166 敌兵布阵 //线段树单点更新
void build(int l, int r, int n) //建树 { int mid; tree[n].l = l; tree[n].r = r; if(l==r) { tree[n].sum = h[l]; return ; } mid = (l+r)>>1; build(l, mid, 2*n); build(mid+1, r, 2*n+1); tree[n].sum = tree[2*n].sum + tree[2*n+1].sum; }...
分类:其他好文   时间:2014-07-23 18:11:36    阅读次数:282
c语言太容易出笔误了,这样都行
调试中发现同时写的NB代码 test.c int add(string); int main() { char* p = "11222"; add(p); return 0; } int add(string) { return 0; } 用c编译类型都可以不写,默认类型是整型,太容易出笔误了吧...
分类:编程语言   时间:2014-07-23 18:07:46    阅读次数:262
计算两个String 类型的时间相关几个月
/** * 返回两个时间段相隔几个月 * @param date1 * @param date2 * @return * @throws ParseException * @throws ParseException */ public static long getMonth(String startDate, String endDate) throws P...
分类:其他好文   时间:2014-07-23 18:07:06    阅读次数:137
【leetcode刷题笔记】Merge Intervals
Given a collection of intervals, merge all overlapping intervals.For example,Given[1,3],[2,6],[8,10],[15,18],return[1,6],[8,10],[15,18].题解:首先对所有的区间按照s...
分类:其他好文   时间:2014-07-23 18:01:57    阅读次数:210
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!