var str = '123456789';function division(str){ var arr = str.split(''), len = arr.length, i = 3; while(i < len){ arr.splice(len-i,0,','); i+=3...
分类:
编程语言 时间:
2014-08-05 13:35:19
阅读次数:
232
#include #include double MAX(double a,double b){ return a>b?a:b;}int main(){ double f[10000],w[1010];int i,j,m,n,c[1010]; while (scanf("%d%d",&n,&m)!=...
分类:
其他好文 时间:
2014-08-05 13:34:49
阅读次数:
216
关键字:break case catch continue default delete do else finallyfor function if in instan...
分类:
编程语言 时间:
2014-08-05 13:32:39
阅读次数:
262
#include #includeusing namespace std;int a[10];int main(int argc, char *argv[]){ int i;int N;while(cin>>N)for(i=0;i<N;i++) a[i]=i+1;do{for(i=0;i<N;i++...
分类:
其他好文 时间:
2014-08-05 13:27:39
阅读次数:
258
map解法
#include
using namespace std;
mapp;
int main()
{
string a,b;
while(cin>>a)
{
if(getchar()=='\n')
break;
cin>>b;
p[b]=a;
}
if(p[a]=="")...
分类:
其他好文 时间:
2014-08-05 11:19:49
阅读次数:
169
#include#includevoid main(){ int max(int x,int y);int n,a[1000],m,i,maxi,k,dp,j,int dp[1000];while(scanf("%d",&n)!=EOF){for(i=0;ia[0]){maxi=a[i];k=i;}...
分类:
其他好文 时间:
2014-08-05 10:58:29
阅读次数:
247
Common WordsLet's continue examining words. You are given two string with words separated by commas. Try to find what is common between these strings....
分类:
其他好文 时间:
2014-08-05 10:54:19
阅读次数:
190
Hard Codehttp://acm.hdu.edu.cn/showproblem.php?pid=4813 1 #include 2 char op[1024]; 3 int main(){ 4 int t,n,m; 5 while(~scanf("%d",&t)){ 6 ...
分类:
其他好文 时间:
2014-08-05 10:41:02
阅读次数:
212
#include int main(){ int T,a[100]; scanf("%d",&T); while(T--) { int n,i,j,sum,t; scanf("%d",&n); for(i=0;ia[i+1]) {t=a[i];a[i]=a[i+1];a[i+1]=t;} } } s...
分类:
其他好文 时间:
2014-08-05 09:30:18
阅读次数:
229
Python提供了for循环和while循环(在Python中没有do..while循环):循环类型描述while循环在给定的判断条件为true时执行循环体,否则退出循环体。for循环重复执行语句嵌套循环你可以在while循环体中嵌套for循环循环控制语句循环控制语句可以更改语句执行的顺序。Python支持以下..
分类:
编程语言 时间:
2014-08-05 03:12:19
阅读次数:
740