Recent

Author Topic: Free Pascal for Competitive Programming  (Read 701 times)

julkas

  • Sr. Member
  • ****
  • Posts: 424
  • KISS principle / Lazarus 2.0.0 / FPC 3.0.4
Free Pascal for Competitive Programming
« on: June 02, 2019, 03:01:33 pm »
Aim - create library of short, reusable algorithms and data structures for competitive programming.

https://github.com/JulStrat/fp-cp.
Ideas, comments, PR and criticism are welcome.
« Last Edit: June 02, 2019, 03:10:20 pm by julkas »
procedure mulu64(a, b: QWORD; out clo, chi: QWORD); assembler;
asm
  mov rax, a
  mov rdx, b
  mul rdx
  mov [clo], rax
  mov [chi], rdx
end;

jwdietrich

  • Hero Member
  • *****
  • Posts: 1036
    • formatio reticularis
Re: Free Pascal for Competitive Programming
« Reply #1 on: June 02, 2019, 06:40:35 pm »
Thanks, that is promising, but the information provided is rather sparse. Additionally, the two books available for download there seem to be unrelated to your project and to Pascal in general (although they are interesting).

Could you provide some documentation?
function GetRandomNumber: integer; // xkcd.com
begin
  GetRandomNumber := 4; // chosen by fair dice roll. Guaranteed to be random.
end;

http://www.formatio-reticularis.de

Lazarus 2.0.6 | FPC 3.0.4 | PPC, Intel, ARM | macOS, Windows, Linux

julkas

  • Sr. Member
  • ****
  • Posts: 424
  • KISS principle / Lazarus 2.0.0 / FPC 3.0.4
Re: Free Pascal for Competitive Programming
« Reply #2 on: June 03, 2019, 08:39:57 am »
Thanks, that is promising, but the information provided is rather sparse.

It's just new idea and needs work and patience.
procedure mulu64(a, b: QWORD; out clo, chi: QWORD); assembler;
asm
  mov rax, a
  mov rdx, b
  mul rdx
  mov [clo], rax
  mov [chi], rdx
end;