132021-01-07 21:15:27mraronKövek (100 pont)pascalAccepted 100/10014ms1636 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/010ms1636 KiB
3Accepted5/51ms1204 KiB
4Accepted5/51ms1140 KiB
5Accepted5/51ms1204 KiB
6Accepted5/51ms1204 KiB
7Accepted5/51ms1204 KiB
8Accepted5/51ms1076 KiB
9Accepted7/71ms1204 KiB
10Accepted7/71ms1204 KiB
11Accepted8/81ms1144 KiB
12Accepted8/81ms1204 KiB
13Accepted8/81ms1204 KiB
14Accepted8/82ms1140 KiB
15Accepted8/84ms1364 KiB
16Accepted8/814ms1472 KiB
17Accepted8/810ms1624 KiB