192021-01-07 21:43:34mraronKövek (100 pont)pascalAccepted 100/10012ms1612 KiB
Program kovek;
  const maxn=100000;
  var n,db,kell: integer;
      s,i,j: integer;
      k: array[1..maxn] of integer;
begin
  readln(n); 
  for i:=1 to n do read(k[i]);
  readln;
  s:=0;
  for i:=1 to n do s:=s+k[i];
  kell:=s div n;
  db:=n; s:=0; j:=0;
  for i:=1 to n do
  begin
    s:=s+k[i];
    if s=(i-j)*kell then 
    begin
      dec(db); s:=0; j:=i;
    end;
  end;
  writeln(db);
end.
SubtaskSumTestVerdictTimeMemory
base100/100
1Accepted0/01ms1056 KiB
2Accepted0/012ms1420 KiB
3Accepted5/51ms1148 KiB
4Accepted5/51ms1224 KiB
5Accepted5/51ms1220 KiB
6Accepted5/51ms1160 KiB
7Accepted5/51ms1160 KiB
8Accepted5/51ms1220 KiB
9Accepted7/71ms1156 KiB
10Accepted7/71ms1220 KiB
11Accepted8/81ms1224 KiB
12Accepted8/81ms1156 KiB
13Accepted8/81ms1224 KiB
14Accepted8/82ms1260 KiB
15Accepted8/84ms1328 KiB
16Accepted8/810ms1612 KiB
17Accepted8/810ms1580 KiB