usingSystem;usingSystem.Collections.Generic;usingSystem.Linq;usingSystem.Web;usingSystem.Data;usingSystem.Web.SessionState;namespacefriends{//////Hand...
分类:
其他好文 时间:
2014-05-16 03:53:53
阅读次数:
381
一.简介ALinq Dynamic 为ALinq以及Linq to SQL提供了一个Entiy
SQL的查询接口,使得它们能够应用Entity SQL 进行数据的查询。它的原理是将Entiy SQL解释为Linq表达式,再执行生成的Linq表达式。1.关于
Entity SQLEntity SQL是...
分类:
其他好文 时间:
2014-05-16 01:09:50
阅读次数:
253
这篇文章决定对最近一个单机版Web程序用到的东西总结一下。一、反射Linq之OrderBy
动态Linq结合反射对某字段排序:namespace 动态Linq{ class Program { static void Main(string[]
args) ...
分类:
其他好文 时间:
2014-05-16 00:40:13
阅读次数:
414
线段树维护的是区间有多少个空位置,每次查询第X个空位置在哪,sum[rt]>=X就向左区间找,sum[rt]
#include
#include
#include
using namespace std;
#define lson l , m , rt << 1
#define rson m + 1 , r , rt << 1 | 1
const int maxn = 55555;
int...
分类:
其他好文 时间:
2014-05-15 20:19:48
阅读次数:
256
和上一题一样,寻找第K个位置,只不过需要处理一下下一个位置在哪,画图看看就知道了。
#include
#include
#include
using namespace std;
#define lson l , m , rt << 1
#define rson m + 1 , r , rt << 1 | 1
const int maxn = 30000+5;
int sum[maxn<<...
分类:
其他好文 时间:
2014-05-15 20:07:28
阅读次数:
262
Given two binary strings, return their sum
(also a binary string).For example, a = "11" b = "1" Return "100".string
的操作,短string补位。两个“0”会输出一个“00”,要特殊处理...
分类:
其他好文 时间:
2014-05-15 17:47:57
阅读次数:
283
1 using System; 2 using System.Collections.Generic;
3 using System.Linq; 4 using System.Text; 5 using System.Threading.Tasks; 6
using System.Security....
分类:
其他好文 时间:
2014-05-15 17:20:45
阅读次数:
329
using System;using
System.Collections.Generic;using System.Linq;using System.Text;using
System.Data;using System.Reflection;namespace TestConsole{ ...
分类:
其他好文 时间:
2014-05-15 17:07:04
阅读次数:
187
为了照到点Point(x0,y0),圆心可以在一个范围内移动,我们设该范围为(x,y)(Vec[i].x,Vec[i].y)表示第如果圆心在这个范围内,则第i个点就一定能照到,sum表示为了能照到前i个点,最靠近右边的圆的边界坐标。#define
LOCAL#include#include#incl...
分类:
其他好文 时间:
2014-05-15 14:31:11
阅读次数:
237
简单点说其实Segment Tree就是二分法的灵活运用。
需要的基础知识:
1 二分法
2 二叉树
3 最好熟悉堆排序
操作就是二分法和堆排序巧妙地合并起来。
有了这些基础知识Segment Tree就没有任何难度了。
参考原文:
http://www.geeksforgeeks.org/segment-tree-set-1-sum-of-given-range/
...
分类:
其他好文 时间:
2014-05-15 13:33:33
阅读次数:
250