自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(42)
  • 资源 (19)
  • 问答 (1)
  • 收藏
  • 关注

原创 hdu 1098 Ignatius's puzzle

相当于 f%65=0存在一个最小的a,对任意的x都成立。。。。若g(x)=(5*x^13+13*x^5)%65,则可知道循环周期为65  g(x)相当于 t=x%65 ,t*t%65*t%65.....*13+.....而 a*k*x循环周期也为65   因此就用两次循环去求解。。 #includeint ans[66];int pow1(int x){ int f=0,i

2013-02-22 09:58:46 520

原创 hdu 4486 pen counts

要求求出周长为n的不同的三角个数。。如果三条边互不相等时,则个数再加1。(x,y,z;     x,z,y;)假设三角形边长为x,y,z,已知z,则有x+y=n-z,x-y看别人的代码的出的理解。。还是怪怪的,希望大神能指点下~!!!! #includeusing namespace std;#includeusing namespace std;int max(int

2013-02-22 09:19:32 2702

原创 hdu 4492 Mystery

简单题。。。 #include#includeusing namespace std;int main(){ char s[100]; int l,i,n,t,x,ans=0,temp,a[550]; cin>>t; while(t--) { cin>>ans; getchar(); gets(

2013-02-19 20:09:09 641

原创 hdu 4484 Hailstone HOTPO

简单题~~按照题目意思,一直到n==1停止,求所产生的序列中的最大值。。。#includeusing namespace std;int main(){ int t,num,n,max,temp; cin>>t; while(t--) { cin>>num>>n; max=n; while(n!=1)

2013-02-19 20:08:07 782

原创 hdu 4485 B-Casting

求b进制数模b-1的值。。。b进制(xn.。。。x3x2x1x0)的值可以写成 xn*b^n+x(n-1)*b^(n-1).....(xn*b^n)%(b-1)=(xn*((b-1)+1)^n)%(b-1)=xn*(c(n,0)*(b-1)^0+c(n,1)*(b-1)^1+....c(n,n)*(b-1)^n)%(b-1)=xn%(b-1)故等同于 (x1+x2+x3+...xn)%

2013-02-19 18:06:45 685

原创 zoj 2417 Lowest Bit

水题~~。。#includeint main(){ int n,m; while(scanf("%d",&n)!=EOF,n) { m=1; while(!(n&1)) { n=n>>1; m*=2; } printf("%d\n",m); } return 0;}

2013-02-14 22:05:26 447

原创 zoj 2405 Specialized Four-Digit Numbers

水题~~ #includeint get(int n,int b){ int s=0; while(n) { s+=n%b; n/=b; } return s;}int main(){ int i,s10,s12,s16; for(i=1000;i<10000;i++) { s10=get(i,10); s12=g

2013-02-14 21:56:23 395

原创 zoj 2345 Gold Coins

和poj2000题目基本一样,就是zoj上有要求先输入块数t,且每个输出块间以空行分隔。。。#includeint ans[10005];void f(){ int i,s,j,k; ans[0]=0; for(i=1,j=1;;j+=i,i++) { for(k=0;k<i;k++) ans[k+j]=ans[k+j-1]+i; if(k+j>

2013-02-14 21:35:36 666

原创 zoj 2208 To and Fro

模拟题。。。 #include#includeusing namespace std;int main(){ char s[205]; int l,i,j,t,n,a,b; while(cin>>n,n) { cin>>s; l=strlen(s); for(i=0,j=2*n-1;j>=1&&i<n;j-=2,i++) {

2013-02-14 21:25:06 408

原创 zoj 2099 Frame Polygonal Line

水题~~~求出 maxx minx maxy miny#include#define MAX 0x07fffffffint main(){ int x,y,maxx=0,maxy=0,minx=MAX,miny=MAX,flag=0; while(scanf("%d%d",&x,&y)!=EOF) { if(x==0&&y==0) { if(fl

2013-02-14 20:51:24 620

原创 zoj 2001 Adding Reversed Numbers

水题。。注意前导零的处理以及进位。#include#include#define N 100005void getsum(char a[],char b[]){ int la,lb,i,ans=0,x,y,t; la=strlen(a); lb=strlen(b); for(i=0;i<la;i++) { x=a[i]-'0'; y=b[i]

2013-02-14 20:22:26 458

原创 zoj 1949 Error Correction

每行每列和都为偶数,则输出ok,修改一个位置的状态,也使得每行每列和都为偶数,则输出Change bit (x,y),否则输出Corrupt先判断行中和是否有出现两个以上的 和为奇数,则输出 Corrupt。。。。 #includeint main(){ int a[105][105],i,j,ansx,ansy,count,flag,n; while(scanf("%

2013-02-14 18:40:19 522

原创 zoj 1889 Ones

给一个数n  不会被2或5整除  为了保证存在可以输出结果输出n的最小倍数,十进制表示时为全1 #includeint main(){ int digit,m,n; while(scanf("%d",&n)!=EOF) { if(n==1) { printf("1\n"); continue; } if(n<11) {

2013-02-14 18:21:24 501

原创 zoj 1879 Jolly Jumpers

sequence of n > 0 integers is called a jolly jumper if the absolute values of the difference between successive elements take on all the values 1 through n-1. 水题。。#include#includeint main()

2013-02-14 18:03:18 4039

原创 zoj 1813 Biker's Trip Odometer

水题 ~~学到些单词   diameter 直径  revolutions 转圈数 #include#define PI 3.1415927int main(){ int r,ans=0; double l,d,t; while(scanf("%lf%d%lf",&d,&r,&t)!=EOF,r) { l=PI*d*r/5280/12;

2013-02-14 17:27:14 411

原创 zoj 1796 Euchre Results

水题~~#includeusing namespace std;int main(){ int a,b,x1,y1,x2,y2,x3,y3,x,y; while(cin>>x1>>y1>>x2>>y2>>x3>>y3) { if(x1==0&&y1==0&&x2==0&&y2==0&&x3==0&&y3==0)break; a=x1-y1+x2-y2+x3-

2013-02-14 17:10:14 416

原创 zoj 1763 A Simple Question of Chemistry

水题~~c++中保留小数点后面指定位数,可以用#include......coutsetprecision(2)#include#includeusing namespace std;int main(){ double x,y; cin>>x; if(x==999) { cout<<"End of Output\n"; return

2013-02-14 16:55:03 477

原创 zoj 1760 Doubles

水题~~#includeusing namespace std;int main(){ int num[100],i,sum,x; while(cin>>x,x!=-1) { for(i=0;i<100;i++)num[i]=0; sum=0; num[x]++; while(cin>>x,x)num[x]++; for(i=0;i<50;

2013-02-14 16:42:46 414

原创 zoj 1755 Clay Bully

水题~~~每个学生所发的泥土是一样的,说明体积一定相同。。#includeusing namespace std;int main(){ int a[10],i,j,sum,t,x,y,z; char s[10][10]; while(cin>>t,t!=-1) { sum=0; for(i=0;i<t;i++) { cin>>x>>y

2013-02-14 16:33:20 526

原创 zoj 1715 When Can We Meet?

水题。。。在找出最多个会议成员空闲的公共时间相同的情况下输出最早的时间#includeint main(){ int n,q,m,i,num[105],x,max; while(scanf("%d%d",&n,&q)!=EOF) { if(n==0&&q==0)break; for(i=0;i<105;i++)num[i]=0; while(n--)

2013-02-14 00:56:08 584

原创 zoj 1622 switch

水题。。。。最少步使得10相间。。。。to make the lights on and off alternatively.#includeusing namespace std;int main(){ int n,i,num,a[1005],ans; while(cin>>n) { for(i=0;i>a[i]; num=0; ans=1-a[

2013-02-14 00:33:40 572

原创 zoj 1514 Fake Tickets

水题~~输出假票的数目,注意不重复计算,即若存在3张号码相同的,假票数目也只是加1#includeusing namespace std;int main(){ int n,m,sum,flag[10005],i,x; while(cin>>n>>m) { if(n==0&&m==0)break; for(i=1;i<=n;i++)flag[i]=0;

2013-02-14 00:19:30 569

原创 zoj 1494 Climbing Worm

水题~~不多说#includeusing namespace std;int main(){ int n,u,d,t; while(cin>>n>>u>>d) { if(n==0&&u==0&&d==0)break; if((n-u)%(u-d)==0)t=(n-u)/(u-d)*2+1; else t=t=(n-u)/(u-d)*2+3;

2013-02-14 00:05:07 408

原创 zoj 1414 Number Steps

从开始得出后面。。 n=0  (0,0)                                      n=1    (1,1)                                      n%4为0或1  xn=xn-1 ,yn=yn-1 +2                                      n%4为2或3  xn=xn-1

2013-02-13 23:50:32 378

原创 zoj 1405 Tanning Salon

水题,求顾客离开的人数 标记顾客来为1,离开为0,计算已占的beds数,和总的相比较。。。。#include#includeint main(){ int n,num,flag[26],i,leave,l; char s[26]; while(scanf("%d",&n)!=EOF,n) { for(i=0;i<26;i++)flag[i]=0;

2013-02-13 23:22:43 579

原创 zoj 1402 Magnificent Meatballs

水题~~~输出一个位置 可以使左右两边之和相等#includeusing namespace std;int main(){ int n,i,a[50],s,sn; while(cin>>n,n) { s=0; for(i=1;i<=n;i++) { cin>>a[i]; s+=a[i]; } sn=0; for(

2013-02-13 17:15:14 385

原创 zoj 1394 Polar Explorer

Using this information along with how much gasoline is available for your planet-rover (which gets a measley 5 miles per gallon), you have to determine if you can possibly get to the crash site and ba

2013-02-13 16:57:46 485

原创 zoj 1383 Binary Numbers

输出二进制表示的数中1的位置。。注意输出结束直接换行,不能多空格。。。#includeusing namespace std;int main(){ int t,n,i; cin>>t; while(t--) { cin>>n; i=0; while(n) { if(n%2) if(n!=1)cout<<i<<" ";

2013-02-12 12:39:06 386

原创 zoj 1382 A Simple Task

水题~~~#includeint main(){ int n,p,t; scanf("%d",&t); while(t--) { scanf("%d",&n); p=0; while(n%2==0) { n/=2; p++; } printf("%d %d\n",n,p); } return 0;}

2013-02-12 12:27:13 324

原创 zoj 1365 Mileage Bank

水题。。。。   注意四舍五入可以通过  (int)(x+0.5)来实现对x的四舍五入。。。 #include#includeint main(){ char b[20],s[20]; int sum=0,x; while(scanf("%s",s)!=EOF,strcmp(s,"#")) { if(!strcmp(s,"0")) { pri

2013-02-12 12:19:21 597

原创 zoj 1337 Pi

题目要求给n个数,从中选出两个数,不考虑次序,则个数为s,这些对中两个数不存在公因子,即最大公约数为1,的个数为num,有6/PI^2=num/s即可求出PI。。。#include#includeint gcf(int x,int y) //最大公约数{ if(x<y)return gcf(y,x); if(x%y==0)return y;

2013-02-11 01:45:53 431

原创 zoj 1334 Basically Speaking

进制间的转换。。。主要是题目有限制数大小范围只会是7位,因此int就够了。。。故可以先转换为十进制,再转换成相应的进制#include#includeint get10(char s[],int a){ int l,i,sum=0; l=strlen(s); for(i=0;i<l;i++) if(s[i]>='A'&&s[i]<='F')sum=sum*a+

2013-02-11 01:23:50 471

原创 zoj 1331 Perfect Cubes

水题   暴力搜索#include#includeint main(){ int a,b,c,d; for(a=2;a<=200;a++) { for(b=2;b<a;b++) { for(c=b;b*b*b+c*c*c<a*a*a;c++) { for(d=c;a*a*a>=b*b*b+c*c*c+d*d*d;d++)

2013-02-11 00:30:10 325

原创 zoj 1251 Box of Bricks

水题~~#includeint main(){ int n,height[105],i,sum,num,ans=0; while(scanf("%d",&n)!=EOF,n) { sum=num=0; for(i=0;i<n;i++) { scanf("%d",&height[i]); sum+=height[i]; } sum

2013-02-10 23:43:39 516

原创 zoj 1242 Carbon Dating

公式对了  但是提交老是错。。#include#includeint main(){ int w,d,t,ans=0; double year; while(scanf("%d%d",&w,&d)!=EOF) { if(w==0&&d==0)break; printf("Sample #%d\n", ++ans); year=5730*(log

2013-02-10 23:31:15 463

原创 zoj 1241 Geometry Made Simple

水题。。#include#includeint main(){ int a,b,c,ans=0; while(scanf("%d%d%d",&a,&b,&c)!=EOF&&(a||b||c)) { printf("Triangle #%d\n",++ans); if(a==0||b==0||c==0) { printf("Impossible.

2013-02-10 22:22:36 358

原创 zoj 1240 IBM Minus One

水题~~~~~#include#includeint main(){ char s[55]; int i,l,t,ans=0; scanf("%d",&t); getchar(); while(t--) { gets(s); l=strlen(s); for(i=0;i<l;i++) if(s[i]=='z')s[i]='a';

2013-02-10 21:58:49 370

原创 zoj 1216 Deck

其实题目没看懂   但是知道输入为n   则输出 (1/2)+(1/4)+(1/6)+(1/8).。+(1/(2×n))格式有要求   n要右对齐于第5列,长度的小数点要和第12列对齐。。。所以有printf("%5d%10.3lf\n",n,s); #includeint main(){ int n,i; double s; printf("# Cards

2013-02-10 21:52:06 496

原创 zoj 1201 Inversion

题目意思    如果输入的是p类串,则输出i类串;如果输出的是i类,则输出p类串。。。p转i:寻找在p串中在j左边的比j大的数的个数,i串中的第j个数填为该数。。i转p:从尾部开始,若第j个数的值为x,则说明在p串中j的左边有x个数大于j,通过从后到前一个个插入,即可得到p串。。例如:2 3 6 4 0 2 2 1 01、9 0 0 0 0 0 0 0 02、第8位

2013-02-10 20:26:31 457

原创 zoj 1205 Martian Addition

题目意思很简单,两个数相加,按照二十进制的。。。。看了别人的文章,发现了这题应该注意的地方:~~~注意输出时要去掉前导零。。。#include#includechar str[105];char getsum(char str1[],char str2[]){ int l,i,of,j,a,b,t; l=strlen(str1); of=0; for(i

2013-02-10 20:17:36 407

java微信开发工程

java微信开发工程,myeclipse+servlet,测试可用哦 注意使用时要将tomcat端口改为80 url地址为 xxx/WeiXinTest/WeiXinServlet token weixin encodingAESKey 随机生成 消息加解密方式 “明文模式” 具体参考 http://blog.csdn.net/yylxid/article/details/50408049

2015-12-26

mysql-5.6.26-win32 软件包

window下32位软件包 mysql-5.6.26-win32.msi

2015-11-15

json-lib-jdk.jar

不同版本的json jar包 包括json-lib-2.2.3-jdk15.jar,json-lib-2.4-jdk15.jar

2015-09-02

Python for Informatics.pdf

Python for Informatics.pdf

2015-06-12

PyDev4.1.0

eclipse搭建python环境所需的插件。。

2015-06-02

FileTool.exe

解决visual c++ 6.0 存在的打开或添加文件出错的情况。。。很有效哦

2014-11-11

推荐系统实践.pdf

推荐系统实践.pdf 学习推荐系统的一本很好的书

2013-12-25

mysqlJDBC.jar

mysqlJDBC.jar jar包,用于连接mysql的驱动包

2013-12-25

apache-tomcat

apache-tomcat-6.0.37-windows-x86.zip

2013-12-25

org.b1.android.archiver.apk

文件浏览器 基于安卓系统

2013-12-10

mysql-gui-tools

mysql图形化管理工具 适用于windows 32位的用户下载使用

2013-12-10

mahout-distribution-0.8-src

mahout0.8版的源代码~ 包括 core example等

2013-12-09

maven3.1.1

maven下载 使用于windows下的资源

2013-12-09

Javadddddd

水水水水水水水水水水水水水水水水水水水水水水水水水水水水水水水水水水水水水水水水水水水水水水水

2012-12-23

Java售票系统

Java代码介绍

2012-12-23

debian-handbook

debian详细操作手册 pdf版本 大家有兴趣的看看 本人觉得挺有用的 不过是英文版的

2012-09-23

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除