摘要:
//2分 水过//判断 在 以mid 的长度 是否在 M次内 能通过; 1 #include 2 #include 3 #include 4 #include 5 using namespace std; 6 int L; 7 int N,M; 8 int len[500050]; 9 int solve(int step)10 {11 int s=0,count=0,i=0;12 while(sans)34 ans=len[i]-len[i-1];35 long l=ans,r=L,mid;36 while(l<...
阅读全文
posted @ 2013-08-21 15:52
看见的是....
阅读(177)
推荐(0)
摘要:
//strstr 水过 1 #include 2 #include 3 char str1[1000004],str2[100]; 4 char *p; 5 int main() 6 { 7 int T; 8 scanf("%d",&T); 9 while(T--)10 {11 scanf("%s%s",str1,str2);12 int len=strlen(str2),count=0;13 p=str1;14 while((p=strstr(p,str2))!=NULL)15 {...
阅读全文
posted @ 2013-08-21 14:36
看见的是....
阅读(286)
推荐(0)
摘要:
//这 题我是用树状 数组写的//表示 对于我这种 数据结构都用没 学过的菜鸟 来说还是有一定难度的//不多说直接 附代#include#include#includeusing namespace std;struct node{ int num,count;}d[20005];int c[20005],n,str[20005][2];//str存每次攻击的范围;int lowbit(int x){ return x&(-x);}void update(int i,int j){ while(i0) { sum+=c[x]; x-=lowb...
阅读全文
posted @ 2013-08-21 10:32
看见的是....
阅读(179)
推荐(0)
摘要:
//注意这题的 质量 是 可以不用的//剩下的直接 用高中物理即可#include#include#includeusing namespace std;struct node{ double x; double h;}a[1010];double min_v(double h,double v){ return sqrt(2*20.0*h+v*v);}int main(){ int T; scanf("%d",&T); int n,p,m[1010],mt; for(int k=1;kx) { ...
阅读全文
posted @ 2013-08-21 10:14
看见的是....
阅读(163)
推荐(0)