上一页 1 ··· 64 65 66 67 68 69 70 71 72 ··· 99 下一页

2011年5月7日

stl 队列的学习

摘要: 1.头文件 #include<queue> 2.using namespace std; 是指标识符的各种可见范围。c++标准程序库中的所有标识符都被定于名为std的namespace 中。 (补充点知识:、<iostream>和<iostream.h>格式不一样 前者没有后缀,实际上,在你的编译器include文件夹里面可以看到,二者是两个文件,打开文件就会发现,里面的代码是不一样的。 后缀为.... 阅读全文

posted @ 2011-05-07 17:10 more think, more gains 阅读(370) 评论(0) 推荐(0) 编辑

2011年5月5日

Prime Ring Problem

摘要: #include<stdio.h>#include<string.h>#include<math.h>int dp[100],visit[100];int n;int prime(int x){ int i; for(i=2;i<=sqrt(x);i++) if(x%i==0) return 0; return 1;}void DFS(int x){ int i,j; if( (x==n)&&pr... 阅读全文

posted @ 2011-05-05 16:49 more think, more gains 阅读(195) 评论(0) 推荐(0) 编辑

robot motion

摘要: Robot Motion Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 1890 Accepted Submission(s): 865 Problem Description A robot has been programmed to f... 阅读全文

posted @ 2011-05-05 16:45 more think, more gains 阅读(339) 评论(0) 推荐(0) 编辑

2011年5月4日

单词数

摘要: #include<stdio.h>#include<string.h>#include<stdlib.h>char ch[110000];char sh[100000][120];int visit[10000];int main( ){ int i,j,k,t,len,flag; while(gets(ch)&&ch[0]!='#') { flag=1; len=strlen(ch); t=0,... 阅读全文

posted @ 2011-05-04 10:39 more think, more gains 阅读(153) 评论(0) 推荐(0) 编辑

不要62

摘要: 这道题数据量有点大,首先要预处理,否则会超时。 #include<stdio.h>#include<string.h>#include<stdlib.h>int A[1000010];int fun(int x){ while(x) { if(x%10==4||x%100==62) return 1; x/=10; } return 0;}int main( ){ int M,N,i,j,t=0;... 阅读全文

posted @ 2011-05-04 08:49 more think, more gains 阅读(279) 评论(0) 推荐(0) 编辑

上一页 1 ··· 64 65 66 67 68 69 70 71 72 ··· 99 下一页

导航