You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+36
Original file line number
Diff line number
Diff line change
@@ -31,7 +31,43 @@ and help execute tests locally via their favorite programming language.
31
31
-`egor batch (in developement)`: Tests the main solution for this task against another solution (probably written in another language than the main one)
32
32
by running both of them and feeding them the tests for this task, this is useful if you have a brute force solution and an efficient solution
33
33
and you want to validate the optimal solution against the one you are sure that is working.
34
+
35
+
## C++ Library code
36
+
- If you are using C++ to do competitive programming, and you have your own library that you use,
37
+
you can just tell egor the location of your library, and it will use it when finding tasks that rely on it.
34
38
39
+
### Steps to make it work
40
+
1- run `egor config set cpp.lib.location /path/to/root/of/library` to tell egor the path to use to resolve your includes.
41
+
42
+
2- Create your tasks normally and use your library:
43
+
44
+
```cpp
45
+
#include<iostream>
46
+
#include<vector>
47
+
// notice the include is using " and not <
48
+
#include"kratos/graphs/tree.h"
49
+
50
+
usingnamespacestd;
51
+
52
+
intmain() {
53
+
int n; cin >> n;
54
+
kratos::Tree tree;
55
+
for(int i = 0; i < n - 1; ++i) {
56
+
int u, v; cin >> u >> v;
57
+
tree.add_edge(u, v):
58
+
}
59
+
cerr << tree.debug() << endl;
60
+
}
61
+
```
62
+
63
+
3- In this example, the configuration i have is:
64
+
```
65
+
$ egor config set cpp.lib.location
66
+
/home/directory/include
67
+
68
+
$ ls /home/directory/include
69
+
kratos
70
+
```
35
71
## Contribution
36
72
37
73
- Contribution to the project can be done in multiple ways, you can report bugs and issues or you can discuss new features that you like being added in future versions by creating a new issue
0 commit comments