题目连接 :http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=5348牡丹江网络赛的题,比赛的时候想到做法的,但是一直没调出来,赛后也调了些时间,最近代码能力堪忧啊~有好多做法, 我的做法是二分下界low,即判断在low到n-1之间...
分类:
其他好文 时间:
2014-09-07 21:07:25
阅读次数:
270
See LCS again时间限制:1000 ms | 内存限制:65535 KB难度:3描述There are A, B two sequences, the number of elements in the sequence is n、m;Each element in the seque.....
分类:
其他好文 时间:
2014-09-07 21:01:55
阅读次数:
286
题目链接:点击打开链接
题意:
给定一个数n
找一个最大的数u使得u
枚举前面有多少位是一样的。然后分类讨论。啪啦啪啦
#include
#include
#include
#include
#include
using namespace std;
typedef long long ll;
const int N = 22;
int pie[N], piesize;
ll ...
分类:
其他好文 时间:
2014-09-07 19:52:35
阅读次数:
252
一开始觉得是数位DP,后来想不出来。 但是感觉爆搜+剪枝可以过,于是就过了。。#include #include #include using namespace std;typedef long long LL;const int maxn = 50;int lim[maxn], len;LL n...
分类:
其他好文 时间:
2014-09-07 18:32:55
阅读次数:
177
def funcname(param1,param2,...): statements在函数中没有与全局变量同名的变量时,我们可以直接读取全局变量的值(不提倡这么做,容易混淆)要想在函数内对全局变量进行重新赋值,就得在函数内使用global语句e.g.number = 23def assignnu....
分类:
编程语言 时间:
2014-09-07 12:19:05
阅读次数:
229
Given an array S of n integers, find three integers in S such that the sum is closest to a given number, target. Return the sum of the three integers....
分类:
其他好文 时间:
2014-09-07 12:17:05
阅读次数:
160
if#!/usr/bin/pythonnumber=23guess=int(input('Enter an interger:')) #input返回的结果是string类型,需要用int()转化为int类型if guess == number: print('You guessed in.'...
分类:
编程语言 时间:
2014-09-07 11:01:14
阅读次数:
248
Distinct Subsequences
Given a string S and a string T, count the number of distinct subsequences of T in S.
A subsequence of a string is a new string which is formed from the original string b...
分类:
其他好文 时间:
2014-09-06 22:37:44
阅读次数:
208
Description
Problem H: Queuing at the doctors
Due to the increasing number of weird viruses spreading around, all the members of the International Confederation of Revolver Enthusiasts (ICORE) ar...
分类:
其他好文 时间:
2014-09-06 21:21:44
阅读次数:
369
Given two wordsword1andword2, find the minimum number of steps required to convertword1toword2. (each operation is counted as 1 step.)You have the fol...
分类:
其他好文 时间:
2014-09-06 21:18:33
阅读次数:
263