在表单action值里指定所调用的action中的哪个方法而不是借助配置文件action节点的method属性
1 UserAction类
package org.action;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpSe...
分类:
其他 时间:
2015-02-02 14:12:01
收藏:
0 评论:
0 赞:
0 阅读:
314
问题: (用C++实现) **研究对全排列着色的性质.
首先需要生成n的全排列
然后对n的全排列进行着色, 使得相邻的两个数只需用最少颜色就可以把相邻的两个数用那区分开. (这里相邻包含两层含义:同时在自然顺序和在当前排列的顺序中)
最后, 对着色的结果进行统计
结果需要
给定n,找出所有需要2种颜色的排列.
需要3种颜色的排列
需要4种颜色的排列
(已经证明...
分类:
其他 时间:
2015-02-02 14:11:01
收藏:
0 评论:
0 赞:
0 阅读:
339
题目大意:给定n,求[1,n)内所有满足x^2≡1(mod n)的x
x^2=kn+1
x^2-1=kn
(x+1)(x-1)=kn
令x+1=k1n1,x-1=k2n2,其中k1k2=k,n1n2=n
因此我们可以枚举n的约数中所有大于等于√n的,分别作为n1和n2代入验证
最后排序去重输出即可(我偷懒用了map
#include
#include
#include
#inc...
分类:
其他 时间:
2015-02-02 14:10:58
收藏:
0 评论:
0 赞:
0 阅读:
310
/*
裸lcs(最大公共子序列)
*/
# include
# include
# include
# include
using namespace std;
int c[1010][1010];
int main()
{
int i,j,lena,lenb;
char a[1010],b[1010];
while(~scanf("%s%s",a,b))
...
分类:
其他 时间:
2015-02-02 14:10:55
收藏:
0 评论:
0 赞:
0 阅读:
270
Leap Frog
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768
K (Java/Others)
...
分类:
其他 时间:
2015-02-02 14:10:37
收藏:
0 评论:
0 赞:
0 阅读:
271
题意:给定n表示有n个格子,下面每个格子为O的概率是多少。对于一段连续 x 个O的价值就是 x^2 ;求获得的价值的期望是多少。
思路:n^2=n×(n-1)+n,设ai为第i段连续O的长度,∑ai^2 = ∑[ ai+ ai*(ai-1) ] = ∑ ai*(ai-1) + ∑ai = ∑ C(ai, 2)*2 + ∑ai,那么问题可以转
化为求长度大于1的连续段数*2+O的个数的总期望。 ...
分类:
其他 时间:
2015-02-02 14:10:11
收藏:
0 评论:
0 赞:
0 阅读:
369
ID Codes
Time Limit:3000MS Memory Limit:0KB 64bit IO Format:%lld
& %llu
Submit Status
Description
ID Codes
It is 2084 and the year of Big Brother has...
分类:
其他 时间:
2015-02-02 14:10:01
收藏:
0 评论:
0 赞:
0 阅读:
185
#include
#include
#include
using namespace std;
const int maxn = 10010;
struct edge
{
int v, next;
}e[maxn*2];
int first[maxn], cnt;
int top[maxn], dep[maxn], sz[maxn], f[maxn], son[maxn], rank[m...
分类:
其他 时间:
2015-02-02 14:09:51
收藏:
0 评论:
0 赞:
0 阅读:
276
uva 532 Dungeon Master
You are trapped in a 3D dungeon and need to find the quickest way out! The dungeon is composed of unit cubes which may or may not be filled with rock. It takes one mi...
分类:
其他 时间:
2015-02-02 14:09:41
收藏:
0 评论:
0 赞:
0 阅读:
314
Theme Section
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 1411 Accepted Submission(s): 712
Problem Description
It's time for mus...
分类:
其他 时间:
2015-02-02 14:09:31
收藏:
0 评论:
0 赞:
0 阅读:
375
Given a linked list, reverse the nodes of a linked list k at a time and return its modified list.
If the number of nodes is not a multiple of k then left-out nodes in the end should remain as it is...
分类:
其他 时间:
2015-02-02 14:09:21
收藏:
0 评论:
0 赞:
0 阅读:
254
在Visual C++开发过程后,也许对下面一段代码并不陌生:#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif...
分类:
其他 时间:
2015-02-02 14:09:11
收藏:
0 评论:
0 赞:
0 阅读:
297
npoi workbook 的 cellstyle 创建不能超过4000的解决方法...
分类:
其他 时间:
2015-02-02 14:09:01
收藏:
0 评论:
0 赞:
0 阅读:
893
#title : Two Sum#Given an array of integers, find two numbers such#that they add up to a specific target number.#The function two Sum should return in...
分类:
其他 时间:
2015-02-02 14:08:01
收藏:
0 评论:
0 赞:
0 阅读:
274
英文原文:60 Problem Solving Strategies 程序员的生活就是解决一个又一个问题,永无止境。这篇文章介绍了一系列解决问题的策略。 根本的指导方针 1. 首先写代码的时候最好不要有缺陷。最好的修复方法就是让 bug 胎死腹中。良好的单元测试强制数据库约束使用输入验证框架...
分类:
其他 时间:
2015-02-02 14:07:52
收藏:
0 评论:
0 赞:
0 阅读:
254
最近,因为校友网项目开始有些规模了。开始就要考虑对静态资源进行工程自动化的管理。一讲到前端的自动化工具,大家或许都会想到Grunt,Gulp,或者百度的FIS。这三个都有各自的特点,大家可以依据自己的喜好,选择工具。至于为什么选择Gulp,因为Grunt的gruntfile配置真的很头大好吗!简.....
分类:
其他 时间:
2015-02-02 14:07:21
收藏:
0 评论:
0 赞:
0 阅读:
289
; 图示二; 高地址………………………………………………………………………低地址; | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |; |765432107654321076543210765432107654321...
分类:
其他 时间:
2015-02-02 14:07:01
收藏:
0 评论:
0 赞:
0 阅读:
240
在上一篇半月总结中,介绍了tky项目的整体架构、项目的进展情况、项目的优势与开发中存在的问题等。今天来聊聊这半个月中,项目中发生的事情。在这半个月中,项目中有了较大的突破:成功通过了国家评測中心的測试。虽然过程非常艰辛,可是经过大家加班加点不懈的努力,结果还是令经理非常惬意,令大家非常惬意的。正好印...
分类:
其他 时间:
2015-02-02 14:06:41
收藏:
0 评论:
0 赞:
0 阅读:
252
英文原文:5 key differences between hiring a coder and a developer 如果一个企业老板大声嚷嚷说,“我要招个程序员”,那么十之八九指的是“码农”——一种纯粹为了钱而写代码的技术人员。这其实是一种非常狭隘和错误的做法,原因么,且听我一一道来。 .....
分类:
其他 时间:
2015-02-02 14:06:31
收藏:
0 评论:
0 赞:
0 阅读:
249
(一)买。1、5日均线上穿10日均线,且10日均线也向上,将有一段上升行情;2、10日均线上穿30日均线,且30日均线也向上,将有一段中级上升行情;3、55日均线向上必有一轮中级行情,而55日均线上穿125日均线则几乎百分之百有较大行情;4、三条短期均线刚刚向上发散呈多头排列(发散角度较为平缓),可...
分类:
其他 时间:
2015-02-02 14:05:41
收藏:
0 评论:
0 赞:
0 阅读:
299