//求字符串s中最大回文的长度,要求字符串s不包含字符‘#’ int manacher(const string &s) { if (s.size() <= 1) r…
// // main.cpp // EightQueens // // Created by liujan on 10/24/14. // Copyright (c) 2014 l…
// Problem#: 1153 // Submission#: 3079805 // The source code is licensed under Creative Co…
#include "iostream" #include "cmath" using namespace std; //一个数和0的最大公约…
// // main.cpp // 动态规划走楼梯 // // Created by liujan on 11/18/14. // Copyright (c) 2014 liuja…
核心就是用两个子数组记录分割后的两个数组中的变量, 然后依次比较大小即可。 这里有个细节需要注意一下, arr_temp1[mid + 1 – low] = INT_M…
用递归实现 n 个元素的全排列。 当时老师给出的解答是 假定第i个元素 ri 放在首位,于是 f(r1,r2,…,rn) = f(ri U {r1, r2,….,rn}) = U …
//utils.h #ifndef _UTILS_H #define _UTILS_H #include <opencv2/opencv.hpp> #include &…
//freak.cpp #include "stdafx.h" #include <cv.hpp> #include <highgui.h&g…
/* * this file is the implementation of hanoi game * file name: hanoi.c * author: John Woo…
#include<iostream> #include<cstdlib> #include<cstring> #include<ioman…
#include <iostream> #include <algorithm> #include <cmath> using namespac…