using System;using
System.Collections.Generic;using System.Linq;using System.Text;using
System.Web;using System.Collections.Specialized;namespace NewX...
分类:
Web程序 时间:
2014-05-04 19:04:08
阅读次数:
437
#include "stdafx.h"
#include
#include
#include
using namespace msclr::interop;
using namespace System;
int main(array ^args)
{
// 为了可以打印wstring到控制台
std::wcout.imbue(std::locale("chs"));
// 声明...
分类:
编程语言 时间:
2014-05-04 18:30:58
阅读次数:
418
题目的意思就是找出未能及时处理的犯罪数,#include using namespace
std;int main(){ int n; cin >> n; int a,recruit = 0, crimes = 0;; for(int i
= 0 ; i > a; ...
分类:
其他好文 时间:
2014-05-04 11:54:32
阅读次数:
274
#include using namespace std;//概率计算PIint
main(){ int inside=0; double val; int i; for ( i=0; i<100000000; i++) {
double x = (dou...
分类:
其他好文 时间:
2014-05-04 11:47:49
阅读次数:
262
最长公共子系列,简单的dp,不过注意有空格,所以,在读字符串的时候,尽量用gets读,这样基本没问题#include#include#include#includeusing
namespace std;int dp[1001][1001];int MAX(int x,int y){ if (...
分类:
其他好文 时间:
2014-05-04 11:34:41
阅读次数:
294
1、队列(建议采用带头结点的链式队列)
何时为空?答:当队列头指针等于尾指针时,队列为空。(对一般队列而言,循环队列除外) //不带头结点的链式队列 //不带头结点的链式队列#include
#include #include using namespace std; (出队操作) node1-->...
分类:
其他好文 时间:
2014-05-04 11:31:15
阅读次数:
335
为了减少代码冗余,应将公共函数写在类中,供不同ASP.NET页面调用。
1,先新建一个类,并在类中添加函数逻辑
namespace public_function_demo
{
public class MyFunction
{
public static string tbName(string tbNo)
{
...
分类:
Web程序 时间:
2014-05-04 09:34:41
阅读次数:
342
题目来源:CF 427D Match & Catch
题意:给出2个字符串 求最短的连续的公共字符串 并且该字符串在原串中只出现一次
思路:把2个字符串合并起来求height 后缀数组height的应用
#include
#include
#include
using namespace std;
const int maxn = 100010;
char s[maxn];
int s...
分类:
其他好文 时间:
2014-05-04 09:32:45
阅读次数:
315
转载请注明出处:
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
using namespace std;
#define pi acos(-1....
分类:
其他好文 时间:
2014-05-04 09:25:24
阅读次数:
303
维护两个单调队列,一个存储当前点之前的最大值。
另外一个存储当前点之前的最小值。
若最大值与最小值之间的差大于k,那么就把最大值和最小值中位置靠前的往后移。
#include
#include
#include
#include
#include
using namespace std;
//#define INF ((1<<30)-1)
#define INF 0xfffff
#defin...
分类:
其他好文 时间:
2014-05-04 09:23:04
阅读次数:
372