519A A and B and Chess /*********************************************** * Author: fisty * Created Time: 2015/2/28 21:12:09 * File Name : A.cpp *********************************************** */#include iostream#include cstring#include dequ
/***********************************************
* Author: fisty
* Created Time: 2015/2/28 21:12:09
* File Name : A.cpp
*********************************************** */
#include
#include
#include
#include
#include
#include
#include
#include
519B
|
A and B and Compilation Errors
|
A和B 比较,B和C比较。全部排序,遇到第一个不同数字输出并跳出比较
/***********************************************
* Author: fisty
* Created Time: 2015/2/28 21:43:51
* File Name : 294B.cpp
*********************************************** */
#include
#include
#include
#include
#include
#include
#include
#include
519C
|
A and B and Team Training
|
如果n > m 那么采取 n 取两个m 取一个的方案,
/***********************************************
* Author: fisty
* Created Time: 2015/2/28 21:54:12
* File Name : 294C.cpp
*********************************************** */
#include
#include
#include
#include
#include
#include
#include
#include
519D
|
A and B and Interesting Substrings
|
首先维护前缀和,mp[i][v]表示以字符i结束的前缀和为V出现了几次
根据题目要求,如果字符u 和 v 中间值为零 那么两者的前缀和相等.
/***********************************************
* Author: fisty
* Created Time: 2015/2/28 22:46:13
* File Name : 294D.cpp
*********************************************** */
#include
#include
#include
#include
#include
#include
#include
#include