
acm—模拟题
iwillsucceed555
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
bnu4017
<br />#include<stdio.h><br />char a[33];<br />int main(){<br /> while(scanf("%s",a)!=EOF){<br /> // printf("%s",a);<br /> // char *px=a;<br /> // while(*px!='/0'){printf("%c",*px);px++;}<br /> char *p,*p0,*p1;<br /> int sum=0,y,x;<br /> p1=p0=p=a;<br />原创 2010-08-10 18:35:00 · 350 阅读 · 0 评论 -
SRM507div2
被神马for循环害惨了了,for(int i=0;i #include#include#include#include#includeusing namespace std;const int MAXNUM=55; struct color { string co;原创 2011-06-03 20:32:00 · 545 阅读 · 0 评论 -
TLU3753
<br />没啥好说的水题,但不知道为什么int可以long long型却PE?????<br /> <br />#include<iostream><br />#include<stdio.h><br />#include<cmath><br />using namespace std;<br />int N,M;<br />char name[10005][35];<br />int binary[35][10];<br />double bar[10];<br />char p[35];<br />i原创 2010-10-31 21:21:00 · 422 阅读 · 0 评论 -
zoj(Strange Calendar III)
<br />日历结算只能找规律,不能模拟(超时)!!!<br /> <br />#include<stdio.h><br />#include<math.h><br />#include<string.h><br />double firstday,firstmonth,firstyear;<br />double lastday,lastmonth,lastyear;<br />double sumdays;<br />double oneyear[15];<br />void init()<br />{原创 2010-09-06 21:42:00 · 389 阅读 · 0 评论 -
zoj(Conference Call)
连接3点的最短路!!!#include#include#include#define INF 100000000using namespace std;int n,m,I;int mat[505][505];int v[505];int dx[505],dy[505],dz[505];int t[10005];void dijkstral(int u, int *d){memset(v, 0, sizeof(v));for(int i = 1; i for(int i = 1; i int x, g = I原创 2010-09-06 21:39:00 · 415 阅读 · 0 评论 -
zoj3383
<br />一道做到我流泪又流汗的题!!!题目什么也不说就让你看sample,真实。。。。特别是w和h的交换,哎,无语。。。。<br />#include<iostream><br />#include<string><br />using namespace std;<br />char ss[200];<br />string a[305][305];<br />int b[305][305];<br />int main(){<br /> // freopen("in.txt","r",s原创 2010-08-25 22:28:00 · 383 阅读 · 0 评论 -
uva3901
求最长重复子串!!!一开始完全不敢做!!!太暴力了,但数据水,大模拟过了!!!原创 2010-08-14 22:37:00 · 408 阅读 · 0 评论 -
uva3900
<br />#include<iostream><br />#include<stdio.h><br />#include<string.h><br />using namespace std;<br />int main(){<br /> int T;<br /> scanf("%d",&T);<br /> char s[82];<br /> while(T--){<br /> scanf("%s",s);<br /> int n=strlen(s);<原创 2010-08-15 08:53:00 · 335 阅读 · 0 评论 -
joj2660
求在一定范围类波动的最长字段!!!原创 2010-08-10 19:26:00 · 387 阅读 · 0 评论 -
joj1995
求和最大子段!!!原创 2010-08-10 19:24:00 · 400 阅读 · 0 评论 -
joj2537
<br />#include<stdio.h><br />#include<math.h><br />int d[10001];<br />int main(){<br /> int k=0,n;<br /> for(int c=1;c<=10000;c++){<br /> int a=1;int cc=c*(c-1);<br /> while(cc>=a*a*2){//此题表面上看是乎要三重循环,但实际由于n变大时结果与n较小时有关所以可用数组<br /> //储成;故可变为两重循环!!!即n=3时原创 2010-08-10 18:36:00 · 384 阅读 · 0 评论 -
joj1751
#include#includeusing namespace std;int main(){ string dd; int c,le,num; while(cin>>c){ cin>>le>>num>>dd; int init=0,ratio=0;int i=0; int j=0;int k=0;int min=0; int x=dd.find_first_of('C',init); int y=dd.find_first_of('G',init); if(x>y) min=y; els原创 2010-08-09 23:27:00 · 335 阅读 · 0 评论 -
SRM508div2
这几天终于把topcoder摸熟了。。。。。。。。。。编码速度和反应速度还是太慢,不然的话,这样水题应该在最多30分钟A掉的。。。。。。。。。读代码能力太菜,别人的很多可以chan 的代码,多没读懂。。。。。。。。。#include#include#includeusing namespace std; int p[402][402]={0};原创 2011-06-04 21:05:00 · 463 阅读 · 0 评论