![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
模板
相知无悔
这个作者很懒,什么都没留下…
展开
-
Good Bye 2014 B. New Year Permutation 并查集 最短路 floyed算法
B. New Year Permutationtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputUser ainta has a permutation p1, p2原创 2015-08-22 13:54:30 · 682 阅读 · 0 评论 -
Codeforces Round #287 (Div. 2) E. Breaking Good 最短路
E. Breaking Good time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output Breaking Good is a new video game which a lot of gamers want to have. The原创 2015-07-10 10:21:24 · 866 阅读 · 0 评论 -
Codeforces Round #311 (Div. 2) E. Ann and Half-Palindrome 字典树
E. Ann and Half-Palindrome time limit per test1.5 seconds memory limit per test512 megabytes inputstandard input outputstandard output Tomorrow Ann takes the hardest exam of programming where she原创 2015-07-12 00:48:21 · 1221 阅读 · 0 评论 -
Codeforces Round #316 (Div. 2) C. Replacement 找规律 或 线段树
C. Replacementtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputDaniel has a string s, consisting of lowerca原创 2015-08-14 03:05:00 · 837 阅读 · 0 评论 -
Codeforces Round #313 (Div. 2) E. Gerald and Giant Chess 定理Lucas求大组合数
E. Gerald and Giant Chesstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputGiant chess is quite common in Ge原创 2015-07-24 00:36:30 · 1959 阅读 · 0 评论 -
Codeforces Round #291 (Div. 2) D. R2D2 and Droid Army RMQ问题 ST算法
D. R2D2 and Droid Armytime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputAn army of n droids is lined up in o原创 2015-07-06 17:02:18 · 803 阅读 · 0 评论 -
Codeforces Round #291 (Div. 2) C. Watto and Mechanism hash函数
C. Watto and Mechanismtime limit per test3 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputWatto, the owner of a spare parts st原创 2015-07-06 13:14:59 · 1081 阅读 · 0 评论 -
Codeforces Round #311 (Div. 2) D. Vitaly and Cycle 图论 二分图
D. Vitaly and Cycle time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output After Vitaly was expelled from the university, he became interested in原创 2015-07-11 17:48:20 · 1253 阅读 · 0 评论 -
hdu 5419 Victor and Toys 线段树成段更新
Victor and ToysTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 262144/131072 K (Java/Others)Total Submission(s): 156 Accepted Submission(s): 54Problem DescriptionVictor has n原创 2015-08-22 21:40:23 · 1198 阅读 · 0 评论 -
个人acm模版
#pragma comment(linker, "/stack:20000000")#define _CRT_SECURE_NO_WARNINGS#include "stdio.h"#ifndef DEBUG#include <iostream>#include <cmath>#include <algorithm>#include <cstdio>#include <cstring原创 2015-08-22 22:17:40 · 740 阅读 · 0 评论 -
hdu 5418 Victor and World 状态压缩dp spfa最短路 floyed最短路
Victor and WorldTime Limit: 4000/2000 MS (Java/Others) Memory Limit: 262144/131072 K (Java/Others)Total Submission(s): 132 Accepted Submission(s): 66Problem DescriptionAfter trying h原创 2015-08-22 21:49:46 · 918 阅读 · 0 评论 -
Codeforces Round #323 (Div. 1) B. Once Again... 最长非严格递增子序列
B. Once Again… time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output You are given an array of positive integers a1, a2, …, an × T of length n ×原创 2015-10-05 18:07:05 · 1231 阅读 · 0 评论 -
Codeforces Round #304 (Div. 2) E. Soldier and Traveling 最大流 Dinic EK 算法
E. Soldier and Travelingtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputIn the country there are n cities a原创 2015-07-17 16:35:07 · 965 阅读 · 0 评论 -
计蒜之道 初赛 第一场 题解 dp 高效 网络流 最小割 最大流 ISAP 模板
搜狗输入法的分词算法搜狗输入法最近的用户输入中出现了一种新的输入模式,形如 “0k1234567”,搜狗的工程师发现这一模式后了解到,这是一种新被提出的对于十五进制数字的标记模式,其中 “0k” 是标记进制为15的前缀标记,之后的部分 “1234567” 是实际的十五进制的数字串。在发现这一标记模式后,搜狗的工程师开始尝试在已有的分词算法上进一步加入对于十五进制数字串的处理,把网页上的原创 2015-07-19 21:08:30 · 1299 阅读 · 0 评论 -
Round A APAC Test 2016 Problem C. gCampus 最短路
Problem C. gCampusThis contest is open for practice. You can try every problem as many times as you like, though we won't keep track of which problems you solve. Read the Quick-Start Guide t原创 2015-08-24 19:27:26 · 1339 阅读 · 0 评论 -
Codeforces Round #286 (Div. 2) D. Mr. Kitayuta's Technology 强连通分量 有向图求环
D. Mr. Kitayuta's Technologytime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputShuseki Kingdom is the world's原创 2015-08-21 18:08:26 · 3010 阅读 · 0 评论 -
Codeforces Round #317 [AimFund Thanks-Round] (Div. 1) C. CNF 2 无向图找环
C. CNF 2time limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard output'In Boolean logic, a formula is in conjunctive normal form (CNF) or clausal norma原创 2015-08-28 23:19:35 · 996 阅读 · 0 评论 -
Practice Round APAC test Problem A. Bad Horse 2-sat
Problem A. Bad HorseThis contest is open for practice. You can try every problem as many times as you like, though we won't keep track of which problems you solve. Read the Quick-Start Guide原创 2015-08-17 00:53:08 · 1475 阅读 · 0 评论 -
hiho一下 第六十一周 题目1 : Combination Lock 线段树 成段更新
时间限制:10000ms单点时限:1000ms内存限制:256MB描述Finally, you come to the interview room. You know that a Microsoft interviewer is in the room though the door is locked. There is a combinati原创 2015-09-04 09:47:59 · 726 阅读 · 0 评论 -
hdu 5314 Happy King 树点分冶 树状数组
Happy KingTime Limit: 10000/5000 MS (Java/Others) Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 434 Accepted Submission(s): 79Problem DescriptionThere are n citie原创 2015-07-31 22:49:32 · 1219 阅读 · 0 评论 -
Codeforces Round #288 (Div. 2) D. Tanya and Password 欧拉回路
D. Tanya and Password time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output While dad was at work, a little girl Tanya decided to play with dad’原创 2015-07-10 15:48:37 · 846 阅读 · 0 评论 -
BNU 26351 Space Elevator 数位dp
Problem ESpace ElevatorChina is building a space elevator, which will allow the launching probes and satellites to a muchlower cost, enabling not only scientific research projects but also space原创 2015-08-14 17:23:37 · 644 阅读 · 0 评论 -
Hdu 5340 Three Palindromes 最大回文串 Manacher
Three PalindromesTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 80 Accepted Submission(s): 21Problem DescriptionCan we divided a原创 2015-08-01 21:36:01 · 1557 阅读 · 0 评论 -
foj2198 Problem 2198 快来快来数一数 dp 矩阵快速幂
Problem 2198 快来快来数一数 Accept: 67 Submit: 194 Time Limit: 1000 mSec Memory Limit : 65536 KB Problem Description n个六边形排成一行,相邻两个六边形共用一条边,如下图所示:记这个图形的生成树个数为t(n)(由于每条边都是不同的,不存在同构的问题)。那么t(1)=6,t(2原创 2015-10-07 00:25:23 · 597 阅读 · 0 评论