码迷,mamicode.com
首页 >  
搜索关键字:for while until    ( 29426个结果
c++的字符串流
整型数据#include #include #include using namespace std;int main( ){ string s; int x; int sum; while (getline(cin, s)) { stringstream...
分类:编程语言   时间:2014-08-01 04:35:51    阅读次数:377
UVa10115_Automatic Editing csdn(小白书字符串专题)
解题报告 题意: 替换字符串,一个单词可重复替换 思路: 这种题都很恶心。 #include #include #include #include using namespace std; char str[1000][1000],ch[1000][1000],sh[1000],str1[1000]; int main() { int n,i,j; while(~...
分类:其他好文   时间:2014-08-01 00:05:00    阅读次数:351
sgu 495 Kids and Prizes
计算出每个人得到礼物的概率,然后加起来即可 1 #include 2 #include 3 #include 4 #include 5 using namespace std; 6 double dp[101010]; 7 int main(){ 8 int n,m; 9 while...
分类:其他好文   时间:2014-07-31 23:37:20    阅读次数:298
偶数求和
Problem Description有一个长度为n(nint main(){ int m,n,i; while(scanf("%d%d",&n,&m)!=EOF) { int sum=0,k=0,j=0; for(i=1;i<=n;i++)//不能是for(i=...
分类:其他好文   时间:2014-07-31 23:31:00    阅读次数:163
Failed while installingDynamic Web Module 3.0
eclipse 中,tomcat 6.0 不支持 web module 3.0 Tomcat version 6.0 only supports J2EE 1.2, 1.3, 1.4, and Java EE 5 Web modules ?在 eclipse 中,使用 Tomcat 6.0 的时候,不支持?Dynamic Web Module?3.0...
分类:Web程序   时间:2014-07-31 21:25:27    阅读次数:626
javascript 正则匹配 提取全部 preg_match_all matchAll方法
javascript 提取所有的的方法,javascript中没有matchAll这个方法。 用while来实现类似 PHP 中的preg_match_all() :(by default7#zbphp.com) var html = document.getElementById('AgentIdP').getAttribute('onchange'); var exp ...
分类:编程语言   时间:2014-07-31 20:58:27    阅读次数:189
编程之美 2.1 求二进制数中1的个数
假设有数n 以前用除二取余法 复杂度logn 不多说 有一个logv的方法 v为1的个数 复杂度比logn小   int Count(int x) { int ans = 0; while(x) { x &= (x-1); ans++; } return ans; } 这里用到了位运算  x&(x-1)每次去掉一个1 举个例子  100010001000&(10...
分类:其他好文   时间:2014-07-31 20:55:27    阅读次数:225
hdu 1052 田忌赛马
贪心,排序从大到小。。 先比大的,跑不过就拿最小的来送死。。, 如果是平局就比后面的。。。 若后面也是平局就拿去跟前面的去跑。。。 #include #include #include #include using namespace std; int s[1005],w[1005]; int main() {     int n,i;     while(scanf("...
分类:其他好文   时间:2014-07-31 20:50:47    阅读次数:153
循环语句
PL/SQL有四种类型的循环:简单循环、WHILE循环、FOR循环以及游标FOR循环。在这里我们主要讨论前三种,除此之外,还将讨论Oracle 11g中新引入的CONTINUE语句。
分类:其他好文   时间:2014-07-31 20:25:17    阅读次数:279
Oracle Multitenant Environment (三) Plan for a cdb
Below tables contains contant you need to consider while planning for a CDB.ActionConsiderations for a CDBAdditional InformationPlan the tables and in...
分类:数据库   时间:2014-07-31 20:06:07    阅读次数:401
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!