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
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
# 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
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
#1,成员内部类 public?class?TestInnerClass?{
????private?int?id;
????private?String?name;
????
????public?String?getName()?{
????????return?name;
????}
???...
分类:
编程语言 时间:
2014-07-23 18:14:36
阅读次数:
248
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
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
调试中发现同时写的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
/**
* 返回两个时间段相隔几个月
* @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
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