361645085
361645085
关注数: 2
粉丝数: 2
发帖数: 60
关注贴吧数: 2
貌似仿GOOGLE的。。。不怎么样 仿GOOGLE的。。。还是原来的简单模式比较实用。
noip付出什么样的努力才能获奖啊~~~??? noip付出什么样的努力才能获奖啊~~~???
8数码问题 这是深搜的经典题!大家能不能将输入文件按字符窜的形式输入,而非二维数组。希望大家帮帮忙!!!!
fifa2005-独孤求败(有敢挑的留下QQ) fifa2005-独孤求败(有敢挑的留下QQ)电脑早以没有难度希望高手留下QQ ~~~~~~~~~~
@Noip2004和noip2005的我的程序原创@ program peter;varname:array[1..100] of string;scoreA,scoreB:array[1..100] of integer;west,job:array[1..100] of boolean;article:array[1..100] of boolean;i,j,n:integer;total:longint;l,s:string;money:array[1..100] of LONGINT;procedure getdata;beginassign(input,'data\scholar\scholar5.in');reset(input);assign(output,'data\pp.txt');rewrite(output);readln(n); for j:=1 to n do begin readln(l); i:=pos(' ',l); name[j]:=copy(l,1,i-1); delete(l,1,i); i:=pos(' ',l); s:=copy(l,1,i-1); if length(s)=3 then scoreA[j]:=100 else scoreA[j]:=10 *(ord(s[1])-ord('0')) +( ord(s[2])-ord('0')); delete(l,1,i); i:=pos(' ',l); s:=copy(l,1,i-1); if length(s)=3 then scoreB[j]:=100 else scoreB[j]:=10 *(ord(s[1])-ord('0')) +( ord(s[2])-ord('0')); delete(l,1,i); i:=pos(' ',l); s:=copy(l,1,i-1); if s='Y' then job[j]:=true else job[j]:=false; delete(l,1,i); i:=pos(' ',l); s:=copy(l,1,i-1); if s='Y' then west[j]:=true else west[j]:=false; delete(l,1,i); i:=length(l); s:=copy(l,1,i); if s<>'0' then article[j]:=true else article[j]:=false; end; end;procedure tongji;vari:integer;beginfor i:=1 to n dobeginif( scoreA[i] > 80) and( article[i]) then money[i]:=money[i]+8000;if(scoreA[i] > 85) and(scoreB[i]>80) then money[i]:=money[i]+4000;if (scoreA[i]>90) then money[i]:=money[i]+2000;if (scoreA[i]>85) and( west[i]) then money[i]:=money[i]+1000;if(scoreB[i]>80) and (job[i]) then money[i]:=money[i]+850;end;end;procedure compelte;vari,max:integer;beginfor i:=1 to n dototal:=total+money[i];max:=money[1];for i:=2 to n do if money[i]>max then begin max:=money[i]; j:=i; end; writeln(name[j]); writeln(max); writeln(total);end;BEGINtotal:=0;getdata;tongji;compelte;close(input);close(output);end.这是2005的第一题经过官方10组测试程序~~~~~~~~~
pascal的才子们,帮个忙看看这个程序!!!!!! 程序题目如下:简单的说是图中'1'所围的'0'的个数;2 2 2 2 2 2 2 2 2 2 2 22 0 0 0 0 0 0 0 0 0 0 22 0 0 0 0 1 1 1 0 0 0 22 0 0 0 0 1 0 0 1 0 0 22 0 0 0 0 0 1 0 0 1 0 22 0 0 1 0 0 0 1 0 1 0 22 0 1 0 1 0 1 0 0 1 0 22 0 1 0 0 1 1 0 1 1 0 22 0 0 1 0 0 0 0 1 0 0 22 0 0 0 1 1 1 1 1 0 0 22 0 0 0 0 0 0 0 0 0 0 22 2 2 2 2 2 2 2 2 2 2 2 {程序如下}program peter;const n=12;var{定义变量}p,q:integer;{临时存储x,y值}x,y:integer;i,j:integer;d:array[1..4,1..2] of integer;{存储方向变量}f,r:integer;s0,s1:integer;{整个图中0,1的个数}a:array[1..n,1..n] of -1..2;{存储图}procedure getdata;{从文本文件中读数据}vari,j:integer;beginassign(input,'data/wenben.txt');reset(input);for i:= 1 to n do begin for j:= 1 to n do read(a[i,j]); readln; end;end;procedure tongji;{统计0和1的个数}vari,j:integer;beginfor i:= 1 to n do begin for j:= 1 to n do begin if a[i,j]=0 then s0:=s0+1; if a[i,j]=1 then s1:=s1+1; end; end;end;procedure start;{程序初始化}begind[1,1]:=0;d[1,2]:=1;d[2,1]:=1;d[2,2]:=0;d[3,1]:=0;d[3,2]:=-1;d[4,1]:=-1;d[4,2]:=0;r:=1;f:=0;x:=1;y:=1;end;BEGIN{主程序}getdata;tongji;start;while f<>r dobegin for i:= 1 to 4 do begin x:=p+d[i,1]; y:=q+d[i,2]; if (x>0) and(x<=n) and(y>0) and(y<=n) then if a[x,y]=0 then begin r:=r+1;{入栈} a[x,y]:=-1;{访问后设为-1} p:=x; q:=y; end; end; f:=f+1;{出栈} end;writeln('area=',s0-s1-r);end.文本文件如下:2 2 2 2 2 2 2 2 2 2 2 22 0 0 0 0 0 0 0 0 0 0 22 0 0 0 0 1 1 1 0 0 0 22 0 0 0 0 1 0 0 1 0 0 22 0 0 0 0 0 1 0 0 1 0 22 0 0 1 0 0 0 1 0 1 0 22 0 1 0 1 0 1 0 0 1 0 22 0 1 0 0 1 1 0 1 1 0 22 0 0 1 0 0 0 0 1 0 0 22 0 0 0 1 1 1 1 1 0 0 22 0 0 0 0 0 0 0 0 0 0 22 2 2 2 2 2 2 2 2 2 2 2ps:这个程序花费我很长时间,我基本已经认定除了主程序外, 其他没有问题,可是我就是不知道错在哪了,因为在调试时 总是不执行while的内容,我觉得还是出在进栈和出栈的问题上 知识不扎实啊!! 请大家帮个忙!!!!!!!!!!
!!!!!!!SOS!!!!!!!! 本人电脑出现恶心症状 望各位高手指点~~~`我的电脑 总无原因的重新启动 与点那个小钮的情形一样我想可能是硬件的事情 因为我都重新装了系统情况还是一样希望大家帮帮忙!!!!
求救 本人急需一套pascal语言的习题集请各位有发现比较好的书 请给我贴个下载地址最好有关NOIP的、!!!!!!!!!!1
1
下一页