/in/Main.java:1: error: class, interface, or enum expected
type hehe=record
^
/in/Main.java:3: error: class, interface, or enum expected
end;
^
/in/Main.java:4: error: class, interface, or enum expected
var n,i,j,len,k,min,c,d:longint;
^
/in/Main.java:5: error: class, interface, or enum expected
tem:array[1..10]of hehe;
^
/in/Main.java:6: error: class, interface, or enum expected
s:string;
^
/in/Main.java:7: error: class, interface, or enum expected
t,tp:array[0..100001]of integer;
^
/in/Main.java:8: error: class, interface, or enum expected
ans,anss:array[1..10]of longint;
^
/in/Main.java:9: error: class, interface, or enum expected
procedure merge1(head,mid,tail,num:longint);
^
/in/Main.java:10: error: class, interface, or enum expected
var tt,tl,tr,j:longint;
^
/in/Main.java:11: error: class, interface, or enum expected
begin
^
/in/Main.java:13: error: class, interface, or enum expected
tl:=head;
^
/in/Main.java:14: error: class, interface, or enum expected
tr:=mid+1;
^
/in/Main.java:15: error: class, interface, or enum expected
while (tl<=mid)and(tr<=tail)do
^
/in/Main.java:20: error: class, interface, or enum expected
inc(tl);
^
/in/Main.java:21: error: class, interface, or enum expected
end
^
/in/Main.java:24: error: class, interface, or enum expected
inc(tr);
^
/in/Main.java:25: error: class, interface, or enum expected
anss[num]:=anss[num]+mid+1-tl;
^
/in/Main.java:26: error: class, interface, or enum expected
end;
^
/in/Main.java:27: error: class, interface, or enum expected
inc(tt);
^
/in/Main.java:28: error: class, interface, or enum expected
end;
^
/in/Main.java:29: error: class, interface, or enum expected
while (tl<=mid) do begin t[tt]:=tem[num].a[tl];inc(tl);inc(tt); end;
^
/in/Main.java:29: error: class, interface, or enum expected
while (tl<=mid) do begin t[tt]:=tem[num].a[tl];inc(tl);inc(tt); end;
^
/in/Main.java:29: error: class, interface, or enum expected
while (tl<=mid) do begin t[tt]:=tem[num].a[tl];inc(tl);inc(tt); end;
^
/in/Main.java:29: error: class, interface, or enum expected
while (tl<=mid) do begin t[tt]:=tem[num].a[tl];inc(tl);inc(tt); end;
^
/in/Main.java:30: error: class, interface, or enum expected
while (tr<=tail) do begin t[tt]:=tem[num].a[tr];inc(tr);inc(tt); end;
^
/in/Main.java:30: error: class, interface, or enum expected
while (tr<=tail) do begin t[tt]:=tem[num].a[tr];inc(tr);inc(tt); end;
^
/in/Main.java:30: error: class, interface, or enum expected
while (tr<=tail) do begin t[tt]:=tem[num].a[tr];inc(tr);inc(tt); end;
^
/in/Main.java:30: error: class, interface, or enum expected
while (tr<=tail) do begin t[tt]:=tem[num].a[tr];inc(tr);inc(tt); end;
^
/in/Main.java:31: error: class, interface, or enum expected
for j:=head to tail do tem[num].a[j]:=t[j];
^
/in/Main.java:32: error: class, interface, or enum expected
end;
^
/in/Main.java:33: error: class, interface, or enum expected
procedure merge_sort1(head,tail,num:longint);
^
/in/Main.java:34: error: class, interface, or enum expected
var mid:longint;
^
/in/Main.java:35: error: class, interface, or enum expected
begin
^
/in/Main.java:36: error: class, interface, or enum expected
if head<tail then begin mid:=(head+tail)div 2; merge_sort1(head,mid,num); merge_sort1(mid+1,tail,num); merge1(head,mid,tail,num); end; end; procedure merge(head,mid,tail,num:longint); var tt,tl,tr,i:longint; begin tt:=head; tl:=head; tr:=mid+1; while (tl<=mid)and(tr<=tail)do begin if tem[num].a[tl]<=tem[num].a[tr] then begin t[tt]:=tem[num].a[tl]; inc(tl); end else begin t[tt]:=tem[num].a[tr]; inc(tr); ans[num]:=ans[num]+mid+1-tl end; inc(tt); end; while (tl<=mid) do begin t[tt]:=tem[num].a[tl];inc(tl);inc(tt); end; while (tr<=tail) do begin t[tt]:=tem[num].a[tr];inc(tr);inc(tt); end; for i:=head to tail do tem[num].a[i]:=t[i]; end; procedure merge_sort(head,tail,num:longint); var mid:longint; begin if head<>tail then
^
/in/Main.java:36: error: class, interface, or enum expected
if head<tail then begin mid:=(head+tail)div 2; merge_sort1(head,mid,num); merge_sort1(mid+1,tail,num); merge1(head,mid,tail,num); end; end; procedure merge(head,mid,tail,num:longint); var tt,tl,tr,i:longint; begin tt:=head; tl:=head; tr:=mid+1; while (tl<=mid)and(tr<=tail)do begin if tem[num].a[tl]<=tem[num].a[tr] then begin t[tt]:=tem[num].a[tl]; inc(tl); end else begin t[tt]:=tem[num].a[tr]; inc(tr); ans[num]:=ans[num]+mid+1-tl end; inc(tt); end; while (tl<=mid) do begin t[tt]:=tem[num].a[tl];inc(tl);inc(tt); end; while (tr<=tail) do begin t[tt]:=tem[num].a[tr];inc(tr);inc(tt); end; for i:=head to tail do tem[num].a[i]:=t[i]; end; procedure merge_sort(head,tail,num:longint); var mid:longint; begin if head<>tail then
^
/in/Main.java:36: error: class, interface, or enum expected
if head<tail then begin mid:=(head+tail)div 2; merge_sort1(head,mid,num); merge_sort1(mid+1,tail,num); merge1(head,mid,tail,num); end; end; procedure merge(head,mid,tail,num:longint); var tt,tl,tr,i:longint; begin tt:=head; tl:=head; tr:=mid+1; while (tl<=mid)and(tr<=tail)do begin if tem[num].a[tl]<=tem[num].a[tr] then begin t[tt]:=tem[num].a[tl]; inc(tl); end else begin t[tt]:=tem[num].a[tr]; inc(tr); ans[num]:=ans[num]+mid+1-tl end; inc(tt); end; while (tl<=mid) do begin t[tt]:=tem[num].a[tl];inc(tl);inc(tt); end; while (tr<=tail) do begin t[tt]:=tem[num].a[tr];inc(tr);inc(tt); end; for i:=head to tail do tem[num].a[i]:=t[i]; end; procedure merge_sort(head,tail,num:longint); var mid:longint; begin if head<>tail then
^
/in/Main.java:36: error: class, interface, or enum expected
if head<tail then begin mid:=(head+tail)div 2; merge_sort1(head,mid,num); merge_sort1(mid+1,tail,num); merge1(head,mid,tail,num); end; end; procedure merge(head,mid,tail,num:longint); var tt,tl,tr,i:longint; begin tt:=head; tl:=head; tr:=mid+1; while (tl<=mid)and(tr<=tail)do begin if tem[num].a[tl]<=tem[num].a[tr] then begin t[tt]:=tem[num].a[tl]; inc(tl); end else begin t[tt]:=tem[num].a[tr]; inc(tr); ans[num]:=ans[num]+mid+1-tl end; inc(tt); end; while (tl<=mid) do begin t[tt]:=tem[num].a[tl];inc(tl);inc(tt); end; while (tr<=tail) do begin t[tt]:=tem[num].a[tr];inc(tr);inc(tt); end; for i:=head to tail do tem[num].a[i]:=t[i]; end; procedure merge_sort(head,tail,num:longint); var mid:longint; begin if head<>tail then
^
/in/Main.java:36: error: class, interface, or enum expected
if head<tail then begin mid:=(head+tail)div 2; merge_sort1(head,mid,num); merge_sort1(mid+1,tail,num); merge1(head,mid,tail,num); end; end; procedure merge(head,mid,tail,num:longint); var tt,tl,tr,i:longint; begin tt:=head; tl:=head; tr:=mid+1; while (tl<=mid)and(tr<=tail)do begin if tem[num].a[tl]<=tem[num].a[tr] then begin t[tt]:=tem[num].a[tl]; inc(tl); end else begin t[tt]:=tem[num].a[tr]; inc(tr); ans[num]:=ans[num]+mid+1-tl end; inc(tt); end; while (tl<=mid) do begin t[tt]:=tem[num].a[tl];inc(tl);inc(tt); end; while (tr<=tail) do begin t[tt]:=tem[num].a[tr];inc(tr);inc(tt); end; for i:=head to tail do tem[num].a[i]:=t[i]; end; procedure merge_sort(head,tail,num:longint); var mid:longint; begin if head<>tail then
^
/in/Main.java:36: error: class, interface, or enum expected
if head<tail then begin mid:=(head+tail)div 2; merge_sort1(head,mid,num); merge_sort1(mid+1,tail,num); merge1(head,mid,tail,num); end; end; procedure merge(head,mid,tail,num:longint); var tt,tl,tr,i:longint; begin tt:=head; tl:=head; tr:=mid+1; while (tl<=mid)and(tr<=tail)do begin if tem[nu