diff options
author | Nguyễn Gia Phong <mcsinyx@disroot.org> | 2020-06-06 21:33:13 +0700 |
---|---|---|
committer | Nguyễn Gia Phong <mcsinyx@disroot.org> | 2020-06-06 21:33:13 +0700 |
commit | 2f674dc80f0382f1c3178f435714960734dc9d3c (patch) | |
tree | 2abba7e4ec72bd16f58f7375126144d3fd9f4bca /09/TP-HN-2014/cau2.pas | |
parent | b2d80610db6beda38573890ed169815e495bc663 (diff) | |
download | cp-2f674dc80f0382f1c3178f435714960734dc9d3c.tar.gz |
Reorganize stuff from secondary school
Diffstat (limited to '09/TP-HN-2014/cau2.pas')
-rw-r--r-- | 09/TP-HN-2014/cau2.pas | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/09/TP-HN-2014/cau2.pas b/09/TP-HN-2014/cau2.pas deleted file mode 100644 index aed61ed..0000000 --- a/09/TP-HN-2014/cau2.pas +++ /dev/null @@ -1,31 +0,0 @@ -var - f: text; - n, i, j: smallint; - d: longint; - v: array of smallint; - t: array of real; - -begin - assign(f, 'CAU2.INP'); - reset(f); - readln(f, n, d); - setlength(v, n); - for i := 0 to n - 1 do - read(f, v[i]); - close(f); - - setlength(t, n); - for i := 0 to n - 1 do - t[i] := i + d / v[i]; - - d := 0; - for i := 1 to n - 1 do - for j := 0 to i - 1 do - if t[i] < t[j] then - inc(d); - - assign(f, 'CAU2.OUT'); - rewrite(f); - writeln(f, d); - close(f) -end. |