【题意】:给出两个数 m n,第一个数是另外两个数a b的和,第二个数是a b的差的绝对值(absolute difference)。输出这两个数a b,大的在前。
【思路】:大的数等于 (m+n)/2,小的等于m-大的。
【注意】:impossible的判断。分两种,一种是m如果m+n为奇数,则a b不存在。
【AC代码】:
#include
#include
#include
#...
分类:
其他好文 时间:
2015-02-23 09:40:29
阅读次数:
118
要写死宽度,就好弄了position: absolute;left: 50%;width: 980px;margin-left: -490px;text-algin:center
分类:
Web程序 时间:
2015-02-23 01:25:23
阅读次数:
208
本文详细介绍了Delphi中常用的各个关键字名称及用法,供大家在编程过程中借鉴参考之用。详情如下:absolute:?12345678910//它使得你能够创建一个新变量, 并且该变量的起始地址与另一个变量相同. varStr: string[32]; StrLen: Byte absoluteSt...
需求:有时候,当页面内容较短,撑不开浏览器高度,但是又希望footer能在窗口最低端。
思路:footer的父层的最小高度是100%,footer设置成相对于父层位置绝对(absolute)置底(bottom:0),父层内要预留footer的高度。
Html代码
CSS如...
分类:
Web程序 时间:
2015-02-14 11:06:49
阅读次数:
179
如果想为元素设置层模型中的绝对定位,需要设置position:absolute(表示绝对定位),这条语句的作用将元素从文档流中拖出来,然后使用left、right、top、bottom属性相对于其最接近的一个具有定位属性的父包含块进行绝对定位。如果不存在这样的包含块,则相对于body元素,即相对于浏...
分类:
其他好文 时间:
2015-02-13 14:47:08
阅读次数:
145
Css:WinMould.css/*窗体模板*/.win-mould { position: absolute; top: 0px; left: -10000px; zoom: 1; z-index: 900000; overflow: hidden; display: none }.win-mou...
分类:
编程语言 时间:
2015-02-13 11:18:13
阅读次数:
189
js获取标签name属性this.getAttribute("name")|document.getElementById(id).getAttribute(‘name‘)CSS操作背景图片background-size:100%100%;background-size:cover;background-size:cover;background-size:auto;运行里敲:dcomcnfg,打开组件服务透明divfilter:alpha(opacity=2..
分类:
其他好文 时间:
2015-02-12 16:27:58
阅读次数:
350
有时候在写CSS的过程中,某些限制总是不起作用,这就涉及了CSS样式覆盖的问题,如下Css代码#navigator{height:100%;width:200;position:absolute;left:0;border:solid2#EEE;}.current_block{border:soli...
分类:
Web程序 时间:
2015-02-12 10:36:31
阅读次数:
381
字符编码笔记:ASCII,Unicode和UTF-8Unicode与JavaScript详解The Absolute Minimum Every Software Developer Absolutely, Positively Must Know About Unicode and Charact...
分类:
其他好文 时间:
2015-02-12 00:34:25
阅读次数:
123
absolute : to specify an absolute time for a time-range (in time-range configuration mode)no absolutebuffer-length : to specify the maximum length of ...
分类:
移动开发 时间:
2015-02-11 21:50:24
阅读次数:
247