码迷,mamicode.com
首页 >  
搜索关键字:for while until    ( 29426个结果
hdu 1556 Color the ball
基础  树状数组 每输入一组数,就对染色次数进行修改; #include #include #include using namespace std; int s[100005],a; int low(int i) { return i&(-i); } void show(int q,int w) { while(q>0) { s[q]+=w;...
分类:其他好文   时间:2014-07-22 22:49:35    阅读次数:188
定时器0方式2 方式3
定时器0方式2 #include #define uchar unsigned char #define uint unsigned int sbit led1=P1; uint num; void main() { TMOD=0x02; TH0=6; TL0=6; EA=1; ET0=1; TR0=1; while(1) { if(num==3686) { ...
分类:其他好文   时间:2014-07-22 22:49:34    阅读次数:225
./ProjectC: error while loading shared libraries: libProjectC.so: cannot open shared object file: No such file or directory
时间: 2014-7-20 11:30地点: andon问题: 研究xu库文件的创建,编译-链接通过后,执行文件时./ProjectC ./ProjectC: error while loading shared libraries: libProjectC.so: cannot open s...
分类:其他好文   时间:2014-07-21 10:26:43    阅读次数:167
JS文件加载:比较async和DOM Script
async与script动态加载都能使文件异步加载,本文叙述它们对页面渲染和load加载的影响方面。目前我用demo.js作为执行文件操作.代码:var now = function() { return +(new Date()); }var t_s = now();while(now() - t...
分类:Web程序   时间:2014-07-21 10:02:47    阅读次数:330
UVA 10036
dp题目,dp[i][j]=1表示前i个数字形成的表达式的值除以K之后可以余j#include #include using namespace std;int dp[10001][101];int a[10001];int main(){ int m,n,k,u; while(cin>>m){ w...
分类:其他好文   时间:2014-07-21 09:39:06    阅读次数:154
杭电acm 2095 find your present (2)
#includeusing namespacestd;intmain(){ intn,x,y; while(cin>>n,n) { cin>>x; while(--n) { cin>>y; x=x^y; } cout<<x<<"\n"; } return0;}
分类:其他好文   时间:2014-07-20 21:30:54    阅读次数:230
POJ2063 Investment 【完全背包】
Investment Time Limit: 1000MS   Memory Limit: 30000K Total Submissions: 8019   Accepted: 2747 Description John never knew he had a grand-uncle, until he received the no...
分类:其他好文   时间:2014-07-20 15:38:51    阅读次数:240
【文本处理】awk、sed使用 - 二
一些例子。1、显示gopher帐号所在行至最后一行。awk‘/^gopher/{row=NR;while(getline<"passwd"){++i;FS=":";if(i>=row){print$0}}}‘passwdgetline<"filename"若读取成功,则返回非0,当读文件完后,会返回0。awk-F:‘NR==FNR{if($1~/^gopher/){row=NR};next}{if(FNR>..
分类:其他好文   时间:2014-07-20 15:31:51    阅读次数:353
do while 循环和while循环的区别
do while 循环和while循环的区别 1、do while循环是先执行循环体,然后判断循环条件,如果为真,则执行下一步循环,否则终止循环;    while循环是先判断循环条件,如果条件为真则执行循环体; 2、do while循环条件后面必须有一个分号,这个分号表明循环结束。...
分类:其他好文   时间:2014-07-20 10:32:28    阅读次数:189
Codeforces Jzzhu and Sequences(循环节)
# include int f[10]; int main() { int x,y,n,j; while(~scanf("%d%d%d",&x,&y,&n)) { f[1]=x; f[2]=y; for(j=3;j<=6;j++) { f[j]=f[j-1]-f[j-2]; } n%=6; if(n==0) n=6; if(f[...
分类:其他好文   时间:2014-07-20 10:14:09    阅读次数:137
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!