Commit graph

42 commits

Author SHA1 Message Date
5fa844da30
feat(cpp): wrap includes in region
Signed-off-by: Matej Focko <mfocko@redhat.com>
2024-02-28 12:24:12 +01:00
5f32910486
fix(java): add debugging output on run
Signed-off-by: Matej Focko <me@mfocko.xyz>
2023-11-19 23:28:00 +01:00
1d46d07ff9
chore(cpp): add RNG generator to skeleton
For details see: https://codeforces.com/blog/entry/61675

Signed-off-by: Matej Focko <me@mfocko.xyz>
2023-08-19 00:32:36 +02:00
afe1859bc6
chore(cpp): implement isqrt
Signed-off-by: Matej Focko <mfocko@redhat.com>
2023-08-12 23:20:17 +02:00
1bb9745299
chore(cpp): factor out modular integer to a struct
Signed-off-by: Matej Focko <mfocko@redhat.com>
2023-08-12 23:19:59 +02:00
35e432c481
chore(cpp): rework reading collections
Signed-off-by: Matej Focko <mfocko@redhat.com>
2023-08-12 23:17:31 +02:00
e928da17af
chore(cpp): introduce data structures
mainly wrappers around heaps for now

Signed-off-by: Matej Focko <mfocko@redhat.com>
2023-08-12 23:16:31 +02:00
c8035c22dc
chore(cpp): introduce aliases
Signed-off-by: Matej Focko <mfocko@redhat.com>
2023-08-12 23:16:08 +02:00
e39ed7a5c0
chore(cpp): reorder regions of helpers
Signed-off-by: Matej Focko <mfocko@redhat.com>
2023-08-12 23:02:33 +02:00
3911ca609c
chore(rs): implement printing of ‹Vec<T>›
Signed-off-by: Matej Focko <mfocko@redhat.com>
2023-08-12 21:11:20 +02:00
efed3b5976
chore(rs): adjust the skeleton
* add data structures as a module with min-heap
* switch ‹.next_vec› to ‹.collect› that also supports other collections
  than ‹Vec<T>›

Signed-off-by: Matej Focko <me@mfocko.xyz>
2023-08-05 21:48:51 +02:00
d7af3b2543
chore(rs): refactor the ‹main›
Signed-off-by: Matej Focko <me@mfocko.xyz>
2023-07-29 23:18:21 +02:00
44aa0b6d6d
chore(rs): reorder modules to reflect alphabetic order
Signed-off-by: Matej Focko <me@mfocko.xyz>
2023-07-29 19:51:35 +02:00
cae33b8f38
chore(rs): remove unused ‹use›
Signed-off-by: Matej Focko <me@mfocko.xyz>
2023-07-29 19:51:22 +02:00
b9135e34a2
chore(rs): refactor reading ‹Vec<T>›
Signed-off-by: Matej Focko <me@mfocko.xyz>
2023-07-29 19:48:45 +02:00
b48cdc97f9
chore(rs): add aliases
Signed-off-by: Matej Focko <me@mfocko.xyz>
2023-07-29 19:48:35 +02:00
c376b11d32
chore(rs): add ‹Z›
Signed-off-by: Matej Focko <me@mfocko.xyz>
2023-07-29 19:47:35 +02:00
ee4703623b
chore(rs): format
Signed-off-by: Matej Focko <me@mfocko.xyz>
2023-07-29 19:47:30 +02:00
b8e79c09f6
chore(cpp): add Y-combinator
Signed-off-by: Matej Focko <me@mfocko.xyz>
2023-07-29 16:01:32 +02:00
7c7377e138
chore(cpp): add debugging output
Signed-off-by: Matej Focko <me@mfocko.xyz>
2023-07-29 16:01:18 +02:00
e9a7fb0955
chore(cpp): add ‹<<› for containers
Signed-off-by: Matej Focko <me@mfocko.xyz>
2023-07-29 16:00:10 +02:00
f6e3929fee
chore(cpp): don't use Catch2 to allow faster iterations
* Also rework the way ‹main› is done

Signed-off-by: Matej Focko <me@mfocko.xyz>
2023-07-29 15:59:06 +02:00
17e43f0ebf
chore(cpp): don't use namespaces in skeleton
Signed-off-by: Matej Focko <me@mfocko.xyz>
2023-07-29 15:57:32 +02:00
42315a22b8
chore(cpp): extend the includes
Signed-off-by: Matej Focko <me@mfocko.xyz>
2023-07-29 15:27:25 +02:00
7e4ed33c34
chore(rs): add unsigned shifts and ‹isqrt›
Signed-off-by: Matej Focko <me@mfocko.xyz>
2023-07-24 23:07:50 +02:00
c78900b631
chore(rs): use ‹min›/‹max› and ‹HashMap› in skeleton
Signed-off-by: Matej Focko <me@mfocko.xyz>
2023-07-24 23:07:14 +02:00
183ebc2891
chore(rs): fix clippy warnings
Signed-off-by: Matej Focko <me@mfocko.xyz>
2023-07-24 23:07:01 +02:00
1913a247b4
chore(rs): fix warnings
Signed-off-by: Matej Focko <me@mfocko.xyz>
2023-07-23 21:33:13 +02:00
bbe76f33d6
chore(rs): create a template and adjust gitignore
Signed-off-by: Matej Focko <me@mfocko.xyz>
2023-07-23 21:33:09 +02:00
f333cf115a
chore(java): adjust skeleton
* add comments marking the regions
* adjust runner to take care of SINGLE v. MULTIPLE test cases

Signed-off-by: Matej Focko <me@mfocko.xyz>
2023-07-23 20:45:21 +02:00
02cbe139e9
chore(cpp): use fully-qualified names
use fully-qualified names in the helpers instead of abusing the ‹using›

Signed-off-by: Matej Focko <me@mfocko.xyz>
2023-07-23 20:42:09 +02:00
663472e5da
chore(cpp): improve the template
* add missing headers: ‹bit›, ‹map›, ‹queue› and ‹set›
* name the namespaces
* math
  * introduce ‹MODULO› for big numbers in problems
* input
  * implement ‹load_vector›
* output
  * implement ‹operator<<› for ‹std::pair›
  * implement ‹yesno› as shortcut for YES/NO answers
* implement ‹LOOP(n)› for quick range-like for-loops
* make ‹N› test cases the default

Signed-off-by: Matej Focko <me@mfocko.xyz>
2023-07-23 11:39:05 +02:00
2ef5f300ca
chore(cpp): add frequently used headers and yes/no
Signed-off-by: Matej Focko <me@mfocko.xyz>
2023-07-10 20:20:19 +02:00
fddc548fbb
chore(cpp): update skeleton
Signed-off-by: Matej Focko <me@mfocko.xyz>
2023-07-10 14:23:09 +02:00
c2192f52e7
chore(cpp): improve skeleton
* add power
* add ‹using namespace std›

Signed-off-by: Matej Focko <me@mfocko.xyz>
2023-07-10 11:39:30 +02:00
9e5f237dfd
chore(cpp): build catch2 only in common directory
Signed-off-by: Matej Focko <me@mfocko.xyz>
2023-07-10 11:32:16 +02:00
5013af5dcb
chore(cpp): adjust skeleton and makefile
Signed-off-by: Matej Focko <me@mfocko.xyz>
2023-07-10 11:32:16 +02:00
9cc2b8ba35
chore(java): add skeleton and run script
Signed-off-by: Matej Focko <me@mfocko.xyz>
2023-07-10 09:56:54 +02:00
4a18e8b988
chore: move common files to subdirectories
Signed-off-by: Matej Focko <me@mfocko.xyz>
2023-07-10 09:56:53 +02:00
12ffad5a8b
chore(cpp): support catch for tests
Signed-off-by: Matej Focko <me@mfocko.xyz>
2023-07-10 09:56:53 +02:00
edfa2fe026
chore: support more than one target
Signed-off-by: Matej Focko <mfocko@redhat.com>
2023-05-14 14:56:37 +02:00
a92e9dac08
chore: add commonly used files
* add makefile
* add c++ skeleton

Signed-off-by: Matej Focko <mfocko@redhat.com>
2023-05-14 14:39:42 +02:00