蒟蒻求找错qwq

P2814 家谱

都8120年了怎么还有人用Pascal
by shadowice1984 @ 2018-07-24 21:58:04


@[shadowice1984](/space/show?uid=56384) 怎么没有?
by willbe233 @ 2018-07-24 22:02:27


@[mega_aspirin](/space/show?uid=22658) 你试试把数据范围调大一点
by willbe233 @ 2018-07-24 22:04:15


@[i_happy1Rock](/space/show?uid=96544) 虽然失败了但还是感谢大佬捧场qwq
by sleepyNick @ 2018-07-24 22:08:01


@[mega_aspirin](/space/show?uid=22658) 呃……
by willbe233 @ 2018-07-24 22:12:56


这。。。水回复,同为蒟蒻
by dead_X @ 2018-07-24 22:13:24


# 兄弟,我只能帮你到这了。 ```pascal Var f:array[1..100000] of longint; l1,l2,l3,t1:longint; s:string[7]; a:array[0..100000] of string[7]; function hs(x:string):longint; Var s,i:longint; Begin for i:=1 to length(x) do s:=(s+ord(x[i])*i) mod 100007; exit(s); end; function find(x:longint):longint; Begin if f[x]<>x then f[x]:=find(f[x]); exit(f[x]); end; Begin readln(s); fillchar(f,sizeof(f),0); while s[1]<>'?' do Begin l1:=hs(copy(s,2,6)); if f[l1]=0 then Begin a[l1]:=copy(s,2,6); f[l1]:=l1; t1:=l1; end else t1:=f[l1]; readln(s); while s[1]='+' do Begin l2:=hs(copy(s,2,6)); if f[l2]=0 then Begin a[l2]:=copy(s,2,6); f[l2]:=t1; end else f[l2]:=find(t1); readln(s); end; end; while s<>'$' do Begin l3:=find(hs(copy(s,2,6))); writeln(copy(s,2,6),' ',a[l3]); readln(s); end; end. ```
by willbe233 @ 2018-07-24 22:22:54


主要因为我看不懂你的程序
by willbe233 @ 2018-07-24 22:24:36


8102年了还用Pascal?2202年NOIp就不支持pascal了,你落后了5900年(滑稽
by AThousandSuns @ 2018-07-24 22:36:00


# 有意思吗
by willbe233 @ 2018-07-24 22:59:23


| 下一页