码迷,mamicode.com
首页 >  
搜索关键字:uva    ( 8022个结果
油田(Oil Deposits, UVa 572)
油田(Oil Deposits, UVa 572) 题意: 多组案例,每组案例输入一个m行n列的字符矩阵,统计字符‘@’组成多少个连通块。如果两个字符‘@’所在的格子相邻(横、竖或对角线),则说明它们属于同一连通块。 案例: Sample Input 1 1 3 5 @ @ @ @ @ 1 8 @@ ...
分类:其他好文   时间:2020-04-24 23:25:00    阅读次数:108
UVa 10534 Wavio Sequence
UVa 10534 Wavio Sequence 链接:https://vjudge.net/problem/UVA-10534 思路: 分别列出每个数列的最长上升子序列(LIS)和最长下降子序列(LDS) 注:LIS(i):以a[i]结尾的最长上升子序列长度 LDS:以a[i]为开头的最长下降子序 ...
分类:其他好文   时间:2020-04-19 19:46:47    阅读次数:64
Fabled Rooks UVA - 11134
1 #include<bits/stdc++.h> 2 using namespace std; 3 typedef long long ll; 4 const int maxn=5000+50; 5 int ansx[maxn]; 6 int ansy[maxn]; 7 int visx[maxn ...
分类:其他好文   时间:2020-04-18 20:12:05    阅读次数:64
Uva 679(Dropping Balls)小球下落
题目描述有一棵二叉树,最大深度为D,且所有叶子的深度都相同。所有结点从上到下从左到右编号为1,2,3,…,2D-1。在结点1处放一个小球,它会往下落。每个内结点上都有一个开关,初始全部关闭,当每次有小球落到一个开关上时,它的状态都会改变。当小球到达一个内结点时,如果该结点上的开关关闭,则往左走,否则 ...
分类:其他好文   时间:2020-04-14 00:41:06    阅读次数:63
Uva12657 (Boxes in a Line)移动盒子
UVA 12657 Boxes in a Line You have n boxes in a line on the table numbered 1 . . . n from left to right. Your task is to simulate 4kinds of commands:? ...
分类:移动开发   时间:2020-04-13 01:10:00    阅读次数:105
UVA 401 回文词
问题描述: 代码展示: 1 #include<stdio.h> 2 #include<string.h> 3 #include<ctype.h> 4 const char* rev="A 3 HIL JM O 2TUVWXY51SE Z 8 ";//注意空格数和非法镜像的个数对应 5 const c ...
分类:其他好文   时间:2020-04-11 12:49:50    阅读次数:72
POJ 1015 / UVA 323 Jury Compromise(01背包,打印路径)
"POJ1015" "UVA323" "参考文章" 题目大意:给出$n$对数,从中选出$m$对数,使各对数的差累加和最小的情况下总和最大。 设每对数的差值为$sub[i]$,和为$sum[i]$。要从中选出m个数,对于每个数来说,都有选与不选两种情况,所以能不能用背包来做呢?用背包的话还得确定容量。 ...
分类:其他好文   时间:2020-04-10 10:36:54    阅读次数:78
UVa 10635 - Prince and Princess
看题 题目 在nxn的棋盘上,王子和公主玩游戏。棋盘上的正方形编号为1、2、3 ... n * n,如下所示:Prince站在正方形1中,进行p跳跃,最后到达正方形n * n。他最多只能进入一个广场。因此,如果我们使用xp表示他输入的第p个平方,则x1,x2,... xp + 1都不同。注意,x1 ...
分类:其他好文   时间:2020-04-09 19:11:25    阅读次数:85
Uva 11300 Spreading the Wealth 中位数
UVA - 11300 Spreading the Wealth Description A Communist regime is trying to redistribute wealth in a village. They have have decided to sit everyonea ...
分类:其他好文   时间:2020-04-09 16:43:06    阅读次数:80
【线型DP】【LCIS】UVA_10635 Prince and Princess
嘤嘤嘤,我又来了,刚A完就写,这个沙雕题有丶恶心 题目: In an n×n chessboard, Prince and Princess plays a game. The squares in the chessboard are numbered 1, 2, 3, . . . , n?n, ...
分类:其他好文   时间:2020-04-09 00:58:08    阅读次数:300
8022条   上一页 1 ... 4 5 6 7 8 ... 803 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!