记录编号 204421 评测结果 AAAWWWWAWW
题目名称 [SYOI 2015] Asm.Def的微小贡献 最终得分 40
用户昵称 GravatarTen.X 是否通过 未通过
代码语言 Pascal 运行时间 1.410 s
提交时间 2015-11-04 12:15:41 内存使用 0.17 MiB
显示代码纯文本
var iiiii,iiii,iii,ii,i,n:longint;a:array[1..1005]of qword;
begin
assign(input,'asm_contribute.in');
assign(output,'asm_contribute.out');
reset(input);
rewrite(output);
read(n);
if n<=5 then begin writeln(2);write('1 2');halt;end;
if (n>5) and(n<=50) then begin
for i:=1 to n do read(a[i]);
for i:=2 to n do
for ii:=i-1 downto 1 do
if a[i]=a[ii] then begin writeln(2);write(ii,' ',i);halt;end;
for i:=3 to n do
 for ii:=i-1 downto 1 do
  for iii:=i-2 downto 1 do
if a[i] xor a[ii] xor a[iii]=0  then begin writeln(3);write(iii,' ',ii,' ',i);halt;end;
for i:=4 to n do
 for ii:=i-1 downto 1 do
  for iii:=i-2 downto 1 do
   for iiii:=i-3 downto 1 do
if a[i] xor a[ii] xor a[iii] xor a[iiii]=0  then begin writeln(4);write(iiii,' ',iii,' ',ii,' ',i);halt;end;
for i:=5 to n do
 for ii:=i-1 downto 1 do
  for iii:=i-2 downto 1 do
   for iiii:=i-3 downto 1 do
    for iiiii:=i-4 downto 1 do
if a[i] xor a[ii] xor a[iii] xor a[iiii] xor a[iiiii]=0  then begin writeln(5);write(iiiii,' ',iiii,' ',iii,' ',ii,' ',i);halt;end;
end;
if n>50 then begin for i:=1 to 50 do read(a[i]);
for i:=2 to 50 do
for ii:=i-1 downto 1 do
if a[i]=a[ii] then begin writeln(2);write(ii,' ',i);halt;end;
for i:=3 to 50 do
 for ii:=i-1 downto 1 do
  for iii:=i-2 downto 1 do
if a[i] xor a[ii] xor a[iii]=0  then begin writeln(3);write(iii,' ',ii,' ',i);halt;end;
for i:=4 to 50 do
 for ii:=i-1 downto 1 do
  for iii:=i-2 downto 1 do
   for iiii:=i-3 downto 1 do
if a[i] xor a[ii] xor a[iii] xor a[iiii]=0  then begin writeln(4);write(iiii,' ',iii,' ',ii,' ',i);halt;end;
for i:=5 to 50 do
 for ii:=i-1 downto 1 do
  for iii:=i-2 downto 1 do
   for iiii:=i-3 downto 1 do
    for iiiii:=i-4 downto 1 do
if a[i] xor a[ii] xor a[iii] xor a[iiii] xor a[iiiii]=0  then begin writeln(5);write(iiiii,' ',iiii,' ',iii,' ',ii,' ',i);halt;end;
end;
close(input);
close(output);
end.