E-COM-NET
首页
在线工具
Layui镜像站
SUI文档
联系我们
推荐频道
Java
PHP
C++
C
C#
Python
Ruby
go语言
Scala
Servlet
Vue
MySQL
NoSQL
Redis
CSS
Oracle
SQL Server
DB2
HBase
Http
HTML5
Spring
Ajax
Jquery
JavaScript
Json
XML
NodeJs
mybatis
Hibernate
算法
设计模式
shell
数据结构
大数据
JS
消息中间件
正则表达式
Tomcat
SQL
Nginx
Shiro
Maven
Linux
poj
poj
1185 炮兵阵地(详细题解)
炮兵阵地TimeLimit:2000MSMemoryLimit:65536KTotalSubmissions:32158Accepted:12430Description司令部的将军们打算在N*M的网格地图上部署他们的炮兵部队。一个N*M的地图由N行M列组成,地图的每一格可能是山地(用"H"表示),也可能是平原(用"P"表示),如下图。在每一格平原地形上最多可以布置一支炮兵部队(山地上不能够部署炮
子言慕雨
·
2020-09-14 05:45
暑假-算法
POJ
2100 Graveyard Design(尺取法)
GraveyardDesignTimeLimit:10000MSMemoryLimit:64000KTotalSubmissions:5844Accepted:1376CaseTimeLimit:2000MSDescriptionKingGeorgehasrecentlydecidedthathewouldliketohaveanewdesignfortheroyalgraveyard.Thegr
纯真zwj
·
2020-09-14 05:35
ACM常用技巧
POJ
3641:Oulipo (KMP
OulipoTimeLimit:1000MSMemoryLimit:65536KTotalSubmissions:40577Accepted:16327DescriptionTheFrenchauthorGeorgesPerec(1936–1982)oncewroteabook,Ladisparition,withouttheletter'e'.HewasamemberoftheOulipogro
zjq_01
·
2020-09-14 05:03
傻逼题
字符串
POJ
- 1456-Supermarket (并查集+贪心)两种代码实现
AsupermarkethasasetProdofproductsonsale.Itearnsaprofitpxforeachproductx∈Prodsoldbyadeadlinedxthatismeasuredasanintegralnumberoftimeunitsstartingfromthemomentthesalebegins.Eachproducttakespreciselyoneu
zitian246
·
2020-09-14 05:30
————1.1
并查集
贪心算法
poj
3321---Apple Tree
题目大意:给你一颗苹果树,树的主干设为1,每一个分支设为一个数,一直到N,代表这颗苹果树。每个分支上面只能最多有一个苹果,也就是一个枝子上面不可能有两个苹果,另外注意一点,不要把苹果树想象成二叉树,苹果树每个节点可以分出很多叉,应该是多叉树。输入是叉之间的关系,1213就是主干上面两个叉分别是2和3.下面是两种操作,Q和CCj的意思是如果j这个枝子上面有苹果就摘下来,如果没有,那么就会长出新的一个
AndyZhang
·
2020-09-14 05:20
线段树
POJ
2100_Graveyard Design_尺取法::这样写更简洁
GraveyardDesignTimeLimit:10000MSMemoryLimit:64000KTotalSubmissions:6984Accepted:1707CaseTimeLimit:2000MSDescriptionKingGeorgehasrecentlydecidedthathewouldliketohaveanewdesignfortheroyalgraveyard.Thegr
yuege38
·
2020-09-14 05:40
尺取法
poj
1002(map水题 )
给你一些字符,统一转化成电话号码,放在map输出他们个数。string时间TLEchar过了#include#include#include#include#include#include#include#include#include#include#include#include#include#include#include#include#include#definerep(i,a,n)f
So_weak_yx
·
2020-09-14 05:02
STL运用
【编程提效】MapStruct对象映射框架(Java Mapping Frameworks)
如数据库层对象
poj
o类与底层对外传输的对象xxResponse类。一般常用的方式是每个值去get/set。幸运的是,我们有很多框架可以解决这种问题。
唐木
·
2020-09-14 05:24
java工具
java
POJ
2503 Babelfish map做法
map是一个关联式容器,用来增删修改比较好用//memory:10480K//time:891MS#include#include#includeusingnamespacestd;mapt;chars[50],a[15],b[15];intmain(){while(1){gets(s);if(s[0]=='\n'||s[0]=='\0')break;sscanf(s,"%s%s",&a,&b);
我要满满的AC
·
2020-09-14 05:51
map
poj
1321 棋盘问题 dfs+回溯 类似n皇后
题目链接
poj
1321棋盘问题dfs+回溯类似n皇后代码如下#include#include#includeusingnamespacestd;intn,k;charqipan[10][10];//记录棋盘的位置
candicecyj
·
2020-09-14 05:13
BZOJ 2588: S
poj
10628. Count on a tree|主席树
用主席树维护这个点到根上的数,然后Lca上的数单独处理!!!!!!!!!#include#include#include#include#include#include#include#include#include#include#definemx1e9#definelowbit(x)(x&(-x))#defineN505usingnamespacestd;intsc(){inti=0,f=1;
ws_yzy
·
2020-09-14 05:57
主席树
S
POJ
- Palin Square【预处理+枚举】
PLSQUARE-PalinSquare#dynamic-programming#hashingKidsjustlearntaboutpalindromestringsyesterday.Today,theteachertodaywasgoingtoteachthemaboutsquareshapes.Butkidswerestillexcitedaboutpalindromestrings.Th
weixin_34205076
·
2020-09-14 05:41
poj
树的转换
2019独角兽企业重金招聘Python工程师标准>>>树的转换查看提交统计提问总时间限制:5000ms内存限制:65536kB描述我们都知道用“左儿子右兄弟”的方法可以将一棵一般的树转换为二叉树,如: 0 0 /|\ /1 2 3 ===> 1 /\
weixin_34185512
·
2020-09-14 05:09
S
POJ
刷题记录
按点赞数降序297二分#includeusingnamespacestd;#definefifirst#definesesecond#definepiacos(-1.0)#defineLLlonglong#definempmake_pair#definepbpush_back#definelsrt#definepiipair#definemem(a,b)memset(a,b,sizeof(a))#
weixin_34101784
·
2020-09-14 05:37
POJ
1321 棋盘问题(DFS板子题,简单搜索练习)
棋盘问题TimeLimit:1000MSMemoryLimit:10000KTotalSubmissions:44012Accepted:21375Description在一个给定形状的棋盘(形状可能是不规则的)上面摆放棋子,棋子没有区别。要求摆放时任意的两个棋子不能放在棋盘中的同一行或者同一列,请编程求解对于给定形状和大小的棋盘,摆放k个棋子的所有可行的摆放方案C。Input输入含有多组测试数据
weixin_34075268
·
2020-09-14 05:05
poj
2388
Who'sintheMiddleTimeLimit:1000MSMemoryLimit:65536KTotalSubmissions:18274Accepted:10380DescriptionFJissurveyinghisherdtofindthemostaveragecow.Hewantstoknowhowmuchmilkthis'median'cowgives:halfofthecowsg
weixin_34029680
·
2020-09-14 05:33
poj
1321——dfs回溯
POJ
1321DFS回溯+递归枚举棋盘问题TimeLimit:1000MSMemoryLimit:10000KTotalSubmissions:24813Accepted:12261Description
weixin_30617737
·
2020-09-14 04:10
s
poj
42
简单题水水~~/*************************************************************************>Author:xlc2845>Mail:
[email protected]
>CreatedTime:2013年10月24日星期四13时33分17秒*********************************************
weixin_30439131
·
2020-09-14 04:05
S
POJ
PHT【二分】+S
POJ
INUM【最小/大值重复】
wa了一次以后要找bug,找完要把思路理的非常清楚S
POJ
PHT【二分】#includeusingnamespacestd;intmain(){longlongn;intT,CAS=1;scanf("%
weixin_30435261
·
2020-09-14 04:04
POJ
2299 Ultra-QuickSort (归并排序)
Ultra-QuickSortTimeLimit:7000MSMemoryLimit:65536KTotalSubmissions:43446Accepted:15822DescriptionInthisproblem,youhavetoanalyzeaparticularsortingalgorithm.Thealgorithmprocessesasequenceofndistinctinteg
wdkirchhoff
·
2020-09-14 04:26
C程序练习
S
POJ
3267 DQUERY(主席树在线|树状数组离线)
题意:给定n个数,m个询问,每次回答某个区间内不相同的元素个数。思路:这道题很像之前hdu上做过的一道http://blog.csdn.net/u014664226/article/details/47307779这是用树状数组离线做的,将询问排序,从头扫一遍,将将当前元素上次的出现的位置减一,本次出现的位置加一,如果该点有询问,记录答案。今天学习了主席树,又用主席树做了一遍,思路和树状数组差
godspeedkaka
·
2020-09-14 04:16
程序设计竞赛
Rank List -
POJ
2153 map
RankListTimeLimit:10000MSMemoryLimit:65536KTotalSubmissions:9119Accepted:3018DescriptionLiMingisagoodstudent.Healwaysaskstheteacherabouthisrankinhisclassaftereveryexam,whichmakestheteacherverytired.So
提比-我有特殊的AC技巧
·
2020-09-14 04:16
POJ
S
POJ
687 REPEATS Repeats 后缀数组 + RMQ预处理
题目大意:对于给出的字符串(长度=1,所以对于repetitionnumber为1的只需要找到字典序最小的那个字母即可,那么我们只考虑repetitionnumber>=2的情况,如果每一个循环节的长度为len,那么在原字符串S中,S[i*len]与S[(i+1)*len]一定会被包含在答案的子串当中那么枚举可能的答案的循环节的长度,然后枚举可能的位置,对于每一组可能被包含的位置S[i*len],
Gatevin
·
2020-09-14 04:39
ACM_RMQ
SPOJ
2388 Who's in the Middle(简单排序)
http://
poj
.org/problem?
TTOP
·
2020-09-14 04:38
POJ训练计划
POJ
2100 - Graveyard Design(尺取法)
题目:http://
poj
.org/problem?id=2100题意:是否存在一段连续的数,平方相加等于n,求出方案数并输出方案.思路:尺取法.AC.
HonniLin
·
2020-09-14 04:06
技巧
poj
3321 树状数组
每个节点有权值为0/1,初始化为1,每次操作都使得某点权值变化,每次询问某点及其子树权值和。树的子树权值和问题可转化为线性数组问题:记st[u]为dfs第一次访问u的时间戳,en[u]为dfs回溯到u的时间戳。从而子树权值和问题转化为连续区间求和和点更新问题,可以用树状数组进行解决。变题:每个点权值初始化为任意值;点更新时可以更新为任意值,求子树权值和。思路类似,update的数值修改即可。#in
lshacm
·
2020-09-14 04:06
acm_数据结构
POJ
1321 棋盘问题(dfs回溯)
A-棋盘问题TimeLimit:1000MSMemoryLimit:10000KB64bitIOFormat:%I64d&%I64uSubmitStatusPractice
POJ
1321Description
linjiaqingggg
·
2020-09-14 04:06
数据结构/算法
POJ
1321
棋盘问题
回溯
dfs
poj
1321 棋盘问题(DFS)
大概题意就是给你一个棋盘,让你放棋子,求在棋盘n*n上的‘#’放上k个棋子的所有情况的数目。要求摆放时任意的两个棋子不能放在棋盘中的同一行或者同一列。深搜可以搜索出所有答案。直接看代码:#include#includeboolchess[9][9];boolvis_col[9];intn,k,ans;voiddfs(introw,intnum)//当前搜索到row,num为已经放下的棋子{if(n
AlmostFree
·
2020-09-14 04:06
搜索
POJ
1321 棋盘问题(DFS回溯)
POJ
1321棋盘问题(DFS回溯)http://
poj
.org/problem?
focus_best
·
2020-09-14 04:05
practice
again
图论--DFS
★★
ACM--题解汇总
【DFS】
POJ
-3009 冰壶游戏
题目链接:http://
poj
.org/problem?id=3009题目描述:DFS题,思路简单,可作DFS范版吧~就是你把一个冰壶球从起点S移动到终点G最少要多少步。
末树之墨
·
2020-09-14 04:05
poj
2299--B - Ultra-QuickSort(线段树,离散化)
Ultra-QuickSortTimeLimit:7000MSMemoryLimit:65536KTotalSubmissions:41215Accepted:14915DescriptionInthisproblem,youhavetoanalyzeaparticularsortingalgorithm.Thealgorithmprocessesasequenceofndistinctinteg
刀刀狗0102
·
2020-09-14 04:31
数据结构
计算几何
poj
3321--Apple Tree(多叉树建树状数组)
AppleTreeTimeLimit:2000MSMemoryLimit:65536KTotalSubmissions:19425Accepted:5923DescriptionThereisanappletreeoutsideofkaka'shouse.Everyautumn,alotofappleswillgrowinthetree.Kakalikesappleverymuch,sohehas
刀刀狗0102
·
2020-09-14 04:31
数据结构
S
POJ
ONP 简单中缀变后缀 (13.07.07)
Problemcode:ONPTransformthealgebraicexpressionwithbracketsintoRPNform(ReversePolishNotation).Two-argumentoperators:+,-,*,/,^(priorityfromthelowesttothehighest),brackets().Operands:onlyletters:a,b,...,
Zeny_L
·
2020-09-14 04:13
堆栈队列
poj
_2485_kruskal
题目描述:求最小生成树中的最大边权值。最近prim和dij写恶心了,这个就用kruskal做吧。思路:水题。就是kruskal选择最小生成树边,最后选中的那条边,即为最小生成树的最大权值的边。(如果用prim的话,选入点的时候记录最大边权值就行)。时间复杂度O(eloge)。代码:#include#include#defineN501typedefstruct{ints;inte;intweigh
河洛
·
2020-09-14 04:13
算法学习
POJ
-2388-Who's in the Middle
数据比较小,用快排或堆结构都行。mysol:STL堆reference:http://www.cplusplus.com/reference/algorithm/make_heap/?kw=make_heap#include#include#include#include#include#include#include#includeusingnamespacestd;boolcomp(const
slowlight93
·
2020-09-14 04:39
ACM.树
poj
1321棋盘问题——DFS
棋盘问题TimeLimit:1000MSMemoryLimit:10000KTotalSubmissions:62840Accepted:30071Description在一个给定形状的棋盘(形状可能是不规则的)上面摆放棋子,棋子没有区别。要求摆放时任意的两个棋子不能放在棋盘中的同一行或者同一列,请编程求解对于给定形状和大小的棋盘,摆放k个棋子的所有可行的摆放方案C。Input输入含有多组测试数据
silence_winds
·
2020-09-14 04:39
ACM—dfs与bfs
POJ
2100 Graveyard Design 尺取法
题意:给你一个数求一个连续序列的元素的平方之和等于这个数输出数量还有区间长度及各个元素ACcode: #include#include#include#include#includeusingnamespacestd;typedeflonglongLL;typedefpairpii;vectorv;intmain(){longlongn,k,ans=0;while(scanf("%I64d",&n
一个莫得感情的代码机器
·
2020-09-14 04:32
#
其他
poj
1848 Tree(树形DP,太难了,三种状态,四种状态转换)
1、http://
poj
.org/problem?
sdjzping
·
2020-09-14 04:58
树形DP
poj
2503 map
BabelfishTimeLimit:3000MSMemoryLimit:65536KTotalSubmissions:43115Accepted:18242DescriptionYouhavejustmovedfromWaterlootoabigcity.Thepeopleherespeakanincomprehensibledialectofaforeignlanguage.Fortunate
皮皮蟹01
·
2020-09-14 04:28
ACM
POJ
-1321棋盘问题(dfs深搜)
棋盘问题题目链接http://
poj
.org/problem?
lonely_wind_
·
2020-09-14 04:09
搜索
快速幂 + 快速幂取模
.原理2.代码【快速幂取模】代码【例题】LeetCode50.Pow(x,n)HDU6182AMathProblem(卡精度)HDU5363KeySet(二项式定理)AcWing875.快速幂(模板)
POJ
1995RaisingModuloNumbers
WA-Accepted
·
2020-09-14 04:35
数论
POJ
3169(差分约束系统+SPFA判断负环)
POJ
3169(1)题意:有n头奶牛,有ML对奶牛相互喜欢,它们之间的距离不得超过x,有MD对奶牛相互讨厌,它们之间的距离不得小于x。
WA掘机
·
2020-09-14 04:58
差分约束系统
POJ
spfa算法
【
POJ
-3259】 Wormholes(判负环,spfa算法)
题干:Whileexploringhismanyfarms,FarmerJohnhasdiscoveredanumberofamazingwormholes.Awormholeisverypeculiarbecauseitisaone-waypaththatdeliversyoutoitsdestinationatatimethatisBEFOREyouenteredthewormhole!Eac
韬光养晦_
·
2020-09-14 04:25
spfa算法
POJ
2018暑假
第三周
训练1
POJ
3321 树状数组(细节问题)
H-AppleTreeThereisanappletreeoutsideofkaka'shouse.Everyautumn,alotofappleswillgrowinthetree.Kakalikesappleverymuch,sohehasbeencarefullynurturingthebigappletree.ThetreehasNforkswhichareconnectedbybranc
Bowen_Yang
·
2020-09-14 04:52
acm
数据结构
poj
2503 map做法
YouhavejustmovedfromWaterlootoabigcity.Thepeopleherespeakanincomprehensibledialectofaforeignlanguage.Fortunately,youhaveadictionarytohelpyouunderstandthem.InputInputconsistsofupto100,000dictionaryentr
竹鼠商人
·
2020-09-14 04:21
数据结构
Controller返回ModelAndView、String
packagecom.buba.controller;importcom.buba.
poj
o.User;importcom.buba.service.UserService;importorg.springframework.stereotype.Controller
墨咖
·
2020-09-14 04:36
Java
POJ
- 2388 Who's in the Middle解题报告
题目大意:给你n(10000)个数,让你找出一个数,这个是要满足,至少有一半的数大于等于它,并且也有一半的数小于等于它。#include#include#include#defineN10500usingnamespacestd;inta[N]={0};intmain(){intn;cin>>n;for(inti=0;i
我的程序跑快快
·
2020-09-14 04:30
排序处理
poj
2983-差分约束判定存在&正环与负环-Is the Information Reliable?
https://vjudge.net/problem/
POJ
-2983给定一些坐标的位置,问你这些坐标的摆放是否合理。①Pxyc,说明x再y左边c米处。②Vxy说明x在y左边。差分约束,大佬的博客。
左佥都御史
·
2020-09-14 04:29
图论
POJ
3414 Pots 倒水问题 + 回溯
这个题目在找翻译的时候百度一下居然搜到了博客园神犇(以为非常大佬的博客大家可以去看一下博客园ID就是这个)的博客,莫名的就是一种感触,想一想恍然间已经过去三年多了,好多事情零零碎碎的又突然浮现在眼前,只能道一句“天道有轮回,世事有因果”。还记得杜老师说:“似水流年,我们站在岁月的河边看花开花落,看流水轻轻划过,河面上是落英缤纷,以及逝去的年华。”PotsTimeLimit:1000MSMemory
浮生十味·
·
2020-09-14 04:57
搜索
POJ
3126 Prime Path 质数变换
PrimePathTimeLimit:1000MSMemoryLimit:65536KTotalSubmissions:40556Accepted:21520DescriptionTheministersofthecabinetwerequiteupsetbythemessagefromtheChiefofSecuritystatingthattheywouldallhavetochangethe
浮生十味·
·
2020-09-14 04:26
搜索
上一页
83
84
85
86
87
88
89
90
下一页
按字母分类:
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Y
Z
其他