码迷,mamicode.com
首页 >  
搜索关键字:while loop    ( 31405个结果
POJ 1163 The Triangle (简单线性dp)
OJ题目 : click here~~ 题目分析:给一个数字三角形,从最上面一个数字开始,方向只能往左下或者右下,一直到最后一行,求经过的所有数字和的最大值。 搞清楚在输入的数据中,route的方向就行。 AC_CODE int num[102][102]; int main(){ int n , i , j , k ; while(cin >> n){ ...
分类:其他好文   时间:2014-07-22 23:05:55    阅读次数:372
[bx]和loop指令
1.[bx]的含义 [bx]表示一个内存单元,它的偏移地址在bx中,比如:mov ax,[bx]会将一个内存单元的内容送入ax,这个内存单元的长度是2个字节,存放一个字,偏移地址存放在bx中,段地址在ds中。mov al,[bx]则是移动半个字。 2.loop指令 loop 标号 CPU执行loop指令的时候分两步: 1.(cx)=(cx)-1 2.判定cx中的值,不为零则转至...
分类:其他好文   时间:2014-07-22 23:01:15    阅读次数:263
整数加减法练习
程序自动产生随机数(srand 设置种子为系统时间,以保证每次运行程序产生的随机数有差别 ),然后用户输入结果,程序判断用户输入是否正确减法运算时要保证随机产生的a要大于b(用while循环判断,当然前提条件是用户选择的为减法运算,这里只保证式子产生的结果为非负整数)。#include #inclu...
分类:其他好文   时间:2014-05-01 23:59:45    阅读次数:499
Linux shell脚本中shift的用法说明
Linux shell脚本中shift的用法说明 shift命令用于对参数的移动(左移)。 示例1:依次读取输入的参数并打印参数个数: run.sh: #!/bin/bash while [ $# != 0 ];do echo "第一个参数为:$1,参数个数为:$#" shift done 输入如下命令运行:run.sh a b c d e...
分类:系统相关   时间:2014-05-01 22:06:54    阅读次数:475
【HDOJ】2149 Public Sale
看Discuss说是博弈论,没学到这个分类。不过仔细想了想,发现。如果m 2 3 int main() { 4 int m, n; 5 int i; 6 7 while (scanf("%d %d", &m, &n) != EOF) { 8 if (m <...
分类:其他好文   时间:2014-05-01 19:38:17    阅读次数:368
Eclipse中使用Ant打Android包报错解决方案 – Perhaps JAVA_HOME does not point to the JDK
问题描述: 在Eclipse中运行ant批量打包工具出错,日志信息如下: D:\Android\android-sdk-windows\tools\ant\build.xml:601: The following error occurred while executing this line: D:\Android\android-sdk-windows\tools\ant\bui...
分类:移动开发   时间:2014-04-30 22:48:39    阅读次数:359
libpcre.so.1 cannot be found
./nginx: error while loading shared libraries: libpcre.so.1: cannot open shared object file: No such file or directory...
分类:其他好文   时间:2014-04-30 22:43:38    阅读次数:346
Perl生成excel文件
#生成excel #ljl use Spreadsheet::WriteExcel; my %us; while(($key, $value) = each %us){ print "$key|$value\n"; } # 创建一个新的EXCEL文件 my $workbook = Spreadsheet::WriteExcel->new('poi_count_top15....
分类:其他好文   时间:2014-04-29 13:33:21    阅读次数:327
[TroubleShooting]Neither the partner nor the witness server instance for database is availble
Problem: You are trying to setup a mirroring on a Database called xxxDB(SQL server 2012). You are getting this error while trying to setup mirroring. “Neither the partner nor the witness server ins...
分类:数据库   时间:2014-04-29 13:33:20    阅读次数:444
创建Hive/hbase相关联的表异常
FAILED: Error in metadata: java.lang.RuntimeException: MetaException(message:org.apache.hadoop.hive.serde2.SerDeException org.apache.hadoop.hive.hbase.HBaseSerDe: columns has 3 elements while hbase.columns.mapping has 4 elements (counting the key if implic...
分类:其他好文   时间:2014-04-29 13:17:21    阅读次数:387
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!