条件语句if(表达式){方法体}else
if(表达体)else{方法体}简写形式:if...一般形式:if...else...完整形式:if...else if...else分支语句
switch(表达式){ case 表达式1: { 方法体 break; } case ...
分类:
编程语言 时间:
2014-06-04 18:08:52
阅读次数:
353
题意:求区间内不含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
1. 做一个clear脚本,放到/bin下去 $vim /bin/clear #!/bin/bash
cmd /c cls 2. ctrl + L 3. 在cygwind中install ncurses (in Utils) and then you can
use: clear 我倾向于第三种方法...
public
interfaceWindowManagerimplementsViewManagerandroid.view.WindowManagerClass
Overview类的概览The interface that apps use to talk to the window manage...
题目描述:
求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
Use Private Members from Base Class in Derived
Class
分类:
其他好文 时间:
2014-06-02 01:41:40
阅读次数:
244
Arbitrage
Time Limit: 1000MS
Memory Limit: 65536K
Total Submissions: 14832
Accepted: 6255
Description
Arbitrage is the use of discrepancies in currency exchange rates...
分类:
其他好文 时间:
2014-06-01 17:26:29
阅读次数:
369
在前面的章节中我们讲解过如何在 Laravel框架中建立后台文件夹.
php Laravel 框架之建立后台文件夹
现在我们再添加一块内容.是关于自动加载的部分.
在我们app目录中还有个start目录.它里面这样写道:
In addition to using Composer, you may use the Laravel class loader to
load...
分类:
Web程序 时间:
2014-06-01 17:25:07
阅读次数:
322