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
Machined
Getting Started 414 -
Machined
Surfaces
MachinedSurfacesAnimagingdevicefurnishesdigitalimagesoftwomachinedsurfacesthateventuallywillbeassembledincontactwitheachother.Theroughnessofthisfinalcontactistobeestimated.Adigitalimageiscomposedofthe
鸿麒
·
2020-08-23 05:52
Uva
AOAPC
I
分卷(刘汝佳)
UVa - 414 -
Machined
Surfaces(AC)
Animagingdevicefurnishesdigitalimagesoftwomachinedsurfacesthateventuallywillbeassembledincontactwitheachother.Theroughnessofthisfinalcontactistobeestimated.Adigitalimageiscomposedofthetwocharacters,"X
sophomoreCDD
·
2020-08-13 18:33
ACM
UVA - 414
Machined
Surfaces
MachinedSurfacesTimeLimit:3000MSMemoryLimit:Unknown64bitIOFormat:%lld&%lluSubmitStatusDescriptionAnimagingdevicefurnishesdigitalimagesoftwomachinedsurfacesthateventuallywillbeassembledincontactwitheac
ACM弱渣的平凡之路
·
2020-08-13 12:07
UVA - 414
Machined
Surfaces(题意不好懂)
懂了题意就是水题。给你n行数每行都有25个字符,第一个和最后一个都是‘X',中间可能包含空格,问每次与左边(或者右边)移动,直到中间没有空格为止,问此时还有多少空格。我们直接考虑移动完之后的状态,肯定是空格少的那一行最先移动完,那么只要统计出原先总的空格数减去空格最少的那一行乘×n就是目前剩下的字符了。#include#includeintmain(){intn,i,j,m,sum,maxn;ch
NowAndForever
·
2020-08-13 10:35
算法竞赛入门经典第五章
水
414 -
Machined
Surfaces
MachinedSurfacesAnimagingdevicefurnishesdigitalimagesoftwomachinedsurfacesthateventuallywillbeassembledincontactwitheachother.Theroughnessofthisfinalcontactistobeestimated.Adigitalimageiscomposedofthe
weixin_30784501
·
2020-08-10 23:12
uva414 -
Machined
Surfaces
uva414-MachinedSurfaces/*水题,值得一提的是,getline使用时注意不能让它多吃回车键,处理方法可以用getchar。*/#include#include#includeusingnamespacestd;intmain(){intn;while(cin>>n,n){getchar();//第一个回车键会被getline拿去,所以要用getchar处理这个回车定义在cst
weixin_30421525
·
2020-08-10 22:08
POJ 1493
Machined
Surfaces(我的水题之路——移动后的空格)
MachinedSurfacesTimeLimit:1000MSMemoryLimit:10000KTotalSubmissions:1712Accepted:1123DescriptionAnimagingdevicefurnishesdigitalimagesoftwomachinedsurfacesthateventuallywillbeassembledincontactwitheacho
只为你晴天
·
2020-08-10 21:33
POJ题目题解
UVA-414-
Machined
Surfaces
这道题目就是以水题,无非就是题意难以理解而已。题目的大致意思是:首先输入一个数字N,代表接下来要输入几行字符串;每行字符串的格式为:由字母X和空格(“”)组成,且两边是字符X,中间是空格。每行的开始有一个或多个X,中间有0个或多个空格,末端有一个或多个X。要求:将N行中的左边的字符X同时向右移动(或右边的字符X向左移动),直到有一行中间没有空格时停止所有行的移动,此时计算N行中总共有多少个空格。大
青竹梦
·
2020-08-10 20:34
UVA414 -
Machined
Surfaces
问题描述输入多行,每行25个字符,左右为X,中间为空格,当将左边的X平移至与右侧X相连后停止,求平移后之间存在几个空格。思路ans=总空格数-行数*每行中空格最少的数。注意数据中的B是文中的空格,需要替换。代码#include#include#includeusingnamespacestd;intmain(){intminn,n,i,j,s,space;chara[15][30];while(c
听峰问雨
·
2020-08-10 18:47
UVA
UVa 414 -
Machined
Surfaces
题目:n个由X和空格组成的串,两边有至少一个X,将n个串压缩,每次每行消除一个空格,问到不能消除时剩余的空格。分析:简单题。统计全体空格数sum_b和最少空格数min_b,则结果就是sum_b-n*min_b。注意:利用gets或者getline读入串。#include#include#include#includeusingnamespacestd;chardata[30];intmain(){
小白菜又菜
·
2020-08-10 18:35
解题报告
入门题
UVa - 414 -
Machined
Surfaces 题解
Animagingdevicefurnishesdigitalimagesoftwomachinedsurfacesthateventuallywillbeassembledincontactwitheachother.Theroughnessofthisfinalcontactistobeestimated.Adigitalimageiscomposedofthetwocharacters,"X
iteye_18800
·
2020-08-10 17:55
UVaOJ 414 -
Machined
Surfaces
#include#includeintmain(){charbuf[30];memset(buf,'\0',sizeof(buf));intn=0;while(~scanf("%d",&n)&&n){fgets(buf,sizeof(buf),stdin);intsum=0;intmin=65535;for(inti=0;i
IceHe何志远
·
2020-08-10 17:24
OJ解题
uva 414 -
Machined
Surfaces
Animagingdevicefurnishesdigitalimagesoftwomachinedsurfacesthateventuallywillbeassembledincontactwitheachother.Theroughnessofthisfinalcontactistobeestimated.Adigitalimageiscomposedofthetwocharacters,"X
滑头鬼之亨
·
2020-08-10 13:04
字符串
UVA 414(
Machined
Surfaces)字符串水题
给女朋友写题解QAQ题目链接:https://vjudge.net/problem/UVA-414题意:输入n个由X和空格组成的字符串(X在两端,空格在中间),每次可以同时删除n个字符串中间的空格,当其中一个字符串无法删除(即删到只剩下X)时停止,此时输出剩下的空格数。求出n个字符串中空格最少的字符串,当这个字符串删完全部空格之后,必将停止删除操作,此时总共删除的空格数为(总空格数-n*最少空格数
Eknight123
·
2020-08-10 13:49
ACM
UVA 414 -
Machined
Surfaces
题意:第一行输入一个n,后面输入n行字符串,每行在左右x之间都存在一些空格,每次操作都使每行空格数减1,直到其中一行没有空格为止,求剩余的总空格数解法:可简化为求总空格数LongSum和最少空格数MinLong,结果即为LongSum-n*MinLong代码如下:#includeusingnamespacestd;intmain(){intn,Long,MinLong,LongSum;charx[
liuxinyu666
·
2020-08-10 12:52
uva
UVA
UVA
414
Machined
Surfaces
巧解表达式展开问题
写出来大概是这个样子GroupA:MachineA,MachineB,MachineCGroupB:
MachineD
,MachineEGroupC:MachineA,MachineCGroupD:GroupB
战神猴哥
·
2019-11-08 01:46
mongo ObjectID 组成
‘_id’是mongodbObjectID类型的,它由12位结构组成,包括timestamp,
machined
,processid,counter等。
black_cheng
·
2018-11-19 19:14
docker-mac安装docker
brewinstalldockerbrewinstalldocker-machine二、创建docker-
machined
freshghost1234
·
2018-05-17 15:19
运维-部署-docker
UVA
Machined
Surfaces
题意:这道题我读了很久,也没有读懂最后看的解体报告才懂得题意,题目不难,但是还是错了两次,几个字符窜,左边的‘x’向右边移动当和右边的‘x’连接时候,求剩下的字符窜还有几个空格 分析:这题错的原因是当吧B换成空格后scanf没有换成gets想当然的直接提交了,可定wa #include<stdio.h> #include<string.h> const int
·
2015-11-13 15:46
mac
414 -
Machined
Surfaces
#include<stdio.h> #include<string.h> char surface[26]; int main() { int i,j,k,l,n,total,min; while(scanf("%d",&n)!=EOF&&n!=0) {
·
2015-11-11 06:43
mac
UVA 414 -
Machined
Surfaces
Machined
Surfaces An imaging device furnishes digital images of two
machined
surfaces that eventually
·
2015-11-02 14:33
mac
uva414 -
Machined
Surfaces
uva414 -
Machined
Surfaces /* 水题,值得一提的是,getline使用时注意不能让它多吃回车键,处理方法可以用getchar。
·
2015-10-31 09:04
mac
poj1493
Machined
Surfaces
Machined
Surfaces Time Limit: 1000MS Memory Limit: 10000K Total Submissions
·
2015-10-21 11:04
mac
POJ 1493
Machined
Surfaces(水~)
Description每张照片由n行串组成,每行串长度为25,都由X开头,空格中间(也可没有),X结尾。所有串的左边X部分同时右移,直到有一个串没有空格。问这时所有串合起来总共有几个空格Input多组用例,每组用例第一行为字符串数量n,其后是n个字符串Output对于每组用例,输出最后空格数SampleInputSampleOutput400Solution水题其实本质就是统计一下每行空格数字,找
V5ZSQ
·
2015-08-25 10:00
UVA 414-
Machined
Surfaces
#include intmain() { charc; intt; while(~scanf("%d",&t)) { if(t==0) break; getchar(); inti,j; intsum=0,min1=10000,min2; for(i=0;imin2?min2:min1; } printf("%d\n",sum-min1*t); } return0; }
Griffin_0
·
2015-08-19 15:00
UVA题目分类
School Physics 10300 - Ecological Premium 458 - The Decoder 494 - Kindergarten Counting Game 414 -
Machined
·
2014-10-24 19:00
uva
UVA - 414
Machined
Surfaces
MachinedSurfaces Animagingdevicefurnishesdigitalimagesoftwomachinedsurfacesthateventuallywillbeassembledincontactwitheachother.Theroughnessofthisfinalcontactistobeestimated.Adigitalimageiscomposedoft
HelloWorld10086
·
2014-07-30 15:00
uva
Surfaces
Machined
UVA 414
Machined
Surfaces
#include intmain(){ intn; while(scanf("%d",&n),n){ getchar(); intmin=100,sum=0,num=n; while(n--){ intcount=0; charstr[30]; gets(str); for(inti=0;i<25;i++) if(str[i]=='') count++; if(count
kl28978113
·
2014-07-28 19:00
2013秋13级预备队集训练习1 F -
Machined
Surfaces
MachinedSurfaces Animagingdevicefurnishesdigitalimagesoftwomachinedsurfacesthateventuallywillbeassembledincontactwitheachother.Theroughnessofthisfinalcontactistobeestimated.Adigitalimageiscomposedoft
u013015642
·
2013-12-09 08:00
Machined
Surfaces
Animagingdevicefurnishesdigitalimagesoftwomachinedsurfacesthateventuallywillbeassembledincontactwitheachother.Theroughnessofthisfinalcontactistobeestimated.Adigitalimageiscomposedofthetwocharacters, "
u013013910
·
2013-12-04 21:00
编程
C语言
poj 1493
Machined
Surfaces
这道题的难点在于读题,题读懂了,基本就是很水很水的题目。。。题意:每张照片由n行串组成,每行串长度为25,都由X开头,空格中间(也可没有),X结尾。所有串的左边X部分同时右移,直到有一个串没有空格。问这时所有串合起来总共有几个空格。 思路:求最短的空格数min,每一行的空格数减去min之和就是结果了。AC的代码:#include intblankNum[15]; charimg[30]; in
Scythe666
·
2013-11-04 09:00
UVa 414
Machined
Surfaces (water ver.)
414-MachinedSurfacesTimelimit:3.000secondshttp://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=94&page=show_problem&problem=355Animagingdevicefurnishesdigitalimagesoftwomachin
synapse7
·
2013-09-13 16:00
C++
ACM
uva
UVA414――
Machined
Surfaces
Animagingdevicefurnishesdigitalimagesoftwomachinedsurfacesthateventuallywillbeassembledincontactwitheachother.Theroughnessofthisfinalcontactistobeestimated.Adigitalimageiscomposedofthetwocharacters,"X
bingsanchun
·
2013-08-07 20:00
java
开发技术
UVA414——
Machined
Surfaces
Animagingdevicefurnishesdigitalimagesoftwomachinedsurfacesthateventuallywillbeassembledincontactwitheachother.Theroughnessofthisfinalcontactistobeestimated.Adigitalimageiscomposedofthetwocharacters,"X
bingsanchun
·
2013-08-07 20:00
java
开发技术
8.414 -
Machined
Surfaces
XXXXBBBBBBBBBBBBBBBBXXXXX16XXXBBBBBBBBBBBBBBBXXXXXXX15XXXXXBBBBBBBBBBBBBBBBXXXX16XXBBBBBBBBBBBBBBBBBXXXXXX17XXXXBXXXXX1XXXXXXXXXX2XXXXXBXXXX1XXBBXXXXXX0intmain(){ intn,len[15]; while(scanf("%d",&n)!
PandaCub
·
2013-06-16 00:00
uva
414 -
Machined
Surfaces
注:以下提到的B都是代指空格.题意:题目本身不难,但是本人英语实在太差,读了半天愣是没能理解题意,在网上看了解释后,题目就很快解出来了.把输入的N行XB组合中的连续X进行平移, 从而压缩B的存在(从左向右平移,每一行与下一行是当成连通的一行进行处理的),当其中一个连续B被压缩完毕时,问这N行XB组合中还剩下多少个B?思路:取出每行B中最小的个数,把其他行的B的个数减去这个最小的B得到的差的和即为所
sailtseng
·
2013-06-10 14:00
uva
Surfaces
414
Machined
UVA 414 -
Machined
Surfaces
Animagingdevicefurnishesdigitalimagesoftwomachinedsurfacesthateventuallywillbeassembledincontactwitheachother.Theroughnessofthisfinalcontactistobeestimated. Adigitalimageiscomposedofthetwocharacters,"
hellobin
·
2013-02-26 16:00
mac
寒假刷题之4——机械化表面?
Machined
Surfaces Animagingdevicefurnishesdigitalimagesoftwomachinedsurfacesthateventuallywillbeassembledincontactwitheachother.Theroughnessofthisfinalcontactistobeestimated.Adigitalimageiscomposedof
hcbbt
·
2013-01-30 23:00
C++
ACM
刷题
寒假刷题系列
UVaOJ 414 -
Machined
Surfaces
AOAPCI: BeginningAlgorithmContests(RujiaLiu) ::Volume0.GettingStartedDescription给你一堆长度都为25的字符串。像样例中,这堆字符串的两边都有X。将两边的X拼起来,就像牙齿咬合一样。因为两边的X数量可能不同,最后拼起来可能会有一些空隙。计算这些空隙的数量。TypeWaterAnalysis统计一共有多少空格,和每行最少有
Ra_WinDing
·
2012-09-07 22:00
uva 414
Machined
Surfaces
小结: 1 英语太烂,看不懂意思,百度的,汗 2 语法不好,不能定义如count[a],之类的,以后用const吧 3用for循环时,i #include intmain(){ inta,i,j; while(scanf("%d",&a)==1){ if(!a)break; chars[15][30]; intcount[15],sum=0; memset(count,
oceaniwater
·
2012-09-02 21:00
uva 414 -
Machined
Surfaces
Animagingdevicefurnishesdigitalimagesoftwomachinedsurfacesthateventuallywillbeassembledincontactwitheachother.Theroughnessofthisfinalcontactistobeestimated.Adigitalimageiscomposedofthetwocharacters,"X
Frankiller
·
2012-06-01 16:00
image
Integer
input
character
each
output
UVA-414-
Machined
Surfaces
这道题目就是以水题,无非就是题意难以理解而已。题目的大致意思是:首先输入一个数字N,代表接下来要输入几行字符串; 每行字符串的格式为:由字母X和空格(“”)组成,且两边是字符X,中间是空格。每行的开始有一个或多个X,中间有0个或多个空格,末端有一个或多个X。 要求:将N行中的左边的字符X同时向右移动(或右边的字符X向左移动),直到有一行中间没有空格时停止所有行的移动,此时计算N行中总共有多少个
rowanhaoa
·
2012-05-19 14:00
c
ini
414 -
Machined
Surfaces
MachinedSurfaces Animagingdevicefurnishesdigitalimagesoftwomachinedsurfacesthateventuallywillbeassembledincontactwitheachother.Theroughnessofthisfinalcontactistobeestimated.Adigitalimageiscomposedoft
zhuyi2654715
·
2012-05-14 20:00
image
Integer
input
character
each
output
Uva 414
Machined
Surfaces
#include #include intmain() { intn,i,j,min,sum; intcount[20]; while(scanf("%d",&n),n) { charch; sum=0; memset(count,0,sizeof(count)); for(i=0;i
ssun125
·
2012-03-29 15:00
POJ1493
Machined
Surfaces
题意:就是将中间的空格合并,问最后剩下几个空格。直接看范例就懂了,看题目描述还比较蛋疼。思路:其实本质就是统计一下每行空格数字,找出最小值。然后剩的值即是sum[每行空格数-最小值]。#include #include #include #include #definemax(a,b)(a>b?a:b) #defineabs(a)((a)>0?(a):-(a)) #definemin(a,b)(a
wuyanyi
·
2012-02-02 13:00
uva414
Machined
Surfaces
MachinedSurfaces Animagingdevicefurnishesdigitalimagesoftwomachinedsurfacesthateventuallywillbeassembledincontactwitheachother.Theroughnessofthisfinalcontactistobeestimated.Adigitalimageiscomposedoft
x954818696
·
2011-11-24 22:00
uva414
Machined
Surfaces
MachinedSurfaces Animagingdevicefurnishesdigitalimagesoftwomachinedsurfacesthateventuallywillbeassembledincontactwitheachother.Theroughnessofthisfinalcontactistobeestimated.Adigitalimageiscomposedoft
·
2011-11-24 22:00
mac
UVa 414 -
Machined
Surfaces
题目大意:有n行字符串,每行中间是空格,两边是字母X,把右边的整体往左边平移,直到某一行中间没有空格就计算此时整个平面里的空格数。首先想到的思路就是:利用两个数组left,right分别记录每一行左边x的终结位置和右边X的开始位置,然后利用right[i]的递减来模拟左移,最终由right[i],left[i]的差值来判断某一行是否已满,最后再把差值的和打印出来就得到结果。有个特殊情况,就是中间没
gneveek
·
2011-09-27 08:00
c
input
UVa 414
Machined
Surfaces
UVa414MachinedSurfaces题目大意:不断地消除空格,使左右两边接触,求最后剩下多少个空格。以下是我的代码:#includebool ok(long n,long a[],long b[]){ for(long i=0;i=b[i]-1) return true; return false;}int main(){ const long maxn=2
心如止水
·
2010-01-06 20:00
上一页
1
下一页
按字母分类:
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
其他