条件语句if(表达式){方法体}else
if(表达体)else{方法体}简写形式:if...一般形式:if...else...完整形式:if...else if...else分支语句
switch(表达式){ case 表达式1: { 方法体 break; } case ...
分类:
编程语言 时间:
2014-06-04 18:08:52
阅读次数:
353
Emag eht htiw Em PlehDescriptionThis problem is
a reverse case of the problem 2996. You are given the output of the problem H
and your task is to find...
分类:
其他好文 时间:
2014-06-03 15:33:20
阅读次数:
347
$(document).keypress(function(e) { switch(e.which)
{ case 13: if(g_flag == "login"){validateLoginForm();} else if(g_flag ==
"registe...
分类:
其他好文 时间:
2014-06-03 15:32:37
阅读次数:
310
透明色:00ff00ff //设置柱状图的颜色 ColorSet cs = new
ColorSet(); cs.Id = "colorset1";#region 设置柱状图的颜色 待开发 string strColor =
oYAXIS.Color; switch (strColor) { cas...
分类:
Web程序 时间:
2014-06-03 15:21:24
阅读次数:
337
题意:求区间内不含62和4的数的个数;
解法:数位dp。int dfs(int pos,int pre,bool limit,bool have),pos表示dp到的数位位置,pre表示前一个数位的数字,limit表示到此时数是否有下降(此位取数字是否受限制的意思),have表示之前是否有62;4的排除是靠在每次枚举下一位i时不取4即可;每个case的dp值都是一样的,所以只需要计算一遍...
分类:
其他好文 时间:
2014-06-02 18:59:28
阅读次数:
315
sudo apt-get purger ibus安装Fcitx:sudo apt-get
install im-switch fcitx #修改当前用户的默认输入法, 具体看man im-switchsudo im-switch -s fcitx
-z default#完成设置最好重启一下X,输入法...
分类:
其他好文 时间:
2014-06-02 13:41:41
阅读次数:
326
在Vmwareesx/esxi中使用虚拟Lan(Vlan)时,一般是指Vlan
Trunk的使用,使用的Vlan配置还有其它三种类型:Virtual Switch Tagging(虚拟交换机标记,缩写VST)、External
SwitchTagging(外部交换机标记,缩写EST)和Vi...
分类:
其他好文 时间:
2014-06-02 13:34:23
阅读次数:
381
题目描述:
求1+2+3+...+n,要求不能使用乘除法、for、while、if、else、switch、case等关键字及条件判断语句(A?B:C)。
输入:
输入可能包含多个测试样例。
对于每个测试案例,输入为一个整数n(1<= n<=100000)。
输出:
对应每个测试案例,
输出1+2+3+…+n的值。
样例输入:...
分类:
其他好文 时间:
2014-06-02 10:36:56
阅读次数:
204
问题描述
求 1+2+ … +n ,要求不能使用乘除法、 for 、 while 、 if 、 else
、 switch 、 case 等关键字以及条件判断语句。
实际意义不大,题目涉及的知识还是不错的!
方法1
用构造函数求解。
#include
using namespace std;
class Plus
{
public:
Plu...
分类:
其他好文 时间:
2014-06-02 10:29:11
阅读次数:
208
##回顾比赛开始网络就一直在抽风,不知道宿舍网渣还是有人攻击服务器。刷了n遍n久刷出了题目。提交A小case的时候眼睁睁看着时间过去,却提交不上,这破网。最后A题B题还是解决了,C题扫了一眼,读都没读,就奔D题去了,因为我看到了熟悉的trie这个单词,加之看到小case只有9分,判断小case应该比...
分类:
其他好文 时间:
2014-06-02 07:57:30
阅读次数:
219