有网友问及“asp.net怎么判断一个手机号字符串中包含3个连续的字符或3个相同的字符?”:Insus.NET做了一下练习,并把方法分享,希望网友们能从中获取一些启示。面向对象嘛,先写一个Number类,用来处理号码之用,很是一个很简单的类,一目了然。#38至#41的方法,IsUpNumber()判...
分类:
其他好文 时间:
2014-08-06 17:39:51
阅读次数:
218
关于sql去重,我简单谈一下自己的简介,如果各位有建议或有不明白的欢迎多多指出。推荐网址:www.4-yecao.com 关于sql去重最常见的有两种方式:DISTINCT和ROW_NUMBER(),当然了ROW_NUMBER()除了去重还有很多其他比较重要的功能,一会我给大家简单说说我自己在...
分类:
数据库 时间:
2014-08-06 17:30:01
阅读次数:
232
题目:
The string "PAYPALISHIRING" is written in a zigzag pattern on a given
number of rows like this: (you may want to display this pattern in a fixed font for better legibility)
P A H N
A...
分类:
其他好文 时间:
2014-08-06 14:59:41
阅读次数:
307
/*
题目大意:求1 - n范围内含有"49"的数的个数。
思路:记忆化搜索
*/
#include
#include
#include
#include
#include
#include
using namespace std;
const int NUMBER_LEN = 19;
const int INDEX_LEN = 10;
int cases, tot; //测...
分类:
其他好文 时间:
2014-08-06 14:58:01
阅读次数:
156
对于n个数,可以做k次移动,每次移动可以互换相邻位置的两个数,问最少 number of pair (i,j) where 1≤ii>aj.
如果不移动的话,ans=’n个数的逆序对数‘,移动k次会减少k个
归并排序求逆序对数:
#include "stdio.h"
#include "string.h"
#include "math.h"
int b[100010],a[1...
分类:
其他好文 时间:
2014-08-06 14:53:51
阅读次数:
211
Problem Description
bobo has a sequence a1,a2,…,an. He is allowed to swap two adjacent numbers for no more than k times.
Find the minimum number of inversions after his swaps.
Note: The numbe...
分类:
其他好文 时间:
2014-08-06 14:51:38
阅读次数:
177
关于SQL的partition by 字段的一些用法心得先看例子:if object_id('TESTDB') is not null drop table TESTDBcreate table TESTDB(A varchar(8), B varchar(8))insert into TESTDB...
分类:
数据库 时间:
2014-08-06 14:33:11
阅读次数:
346
Given a digit string, return all possible letter combinations that the number could represent.A mapping of digit to letters (just like on the telephon...
分类:
其他好文 时间:
2014-08-06 14:30:21
阅读次数:
213
Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64uSubmit Status Practice HDU 1058Description A number whose only prime factors are ....
分类:
其他好文 时间:
2014-08-06 14:11:31
阅读次数:
276
/*
中文题意:给你一个奇数n(odd number),让你求出这n个数的中位数
题目大意:如上
关键点:求出中位数的位置,sort排序
解题人:lingnichong
解题时间:2014/08/06 11:10
解题感受:求中位数的位置,水题一道
*/
Who's in the Middle
Time Limit: 1000MS
...
分类:
其他好文 时间:
2014-08-06 11:56:11
阅读次数:
153