@jutge.org/toolkit 4.4.45 → 4.4.48
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/prompts/io/creators/create-solution.tpl.txt +2 -0
- package/assets/prompts/io/proglangs/cc.md +3 -1
- package/assets/prompts/io/proglangs/py.md +6 -0
- package/dist/index.js +585 -580
- package/docs/getting-started-guide.md +1 -1
- package/docs/jutge-ai.md +5 -6
- package/docs/reference.md +1 -1
- package/package.json +1 -1
- package/toolkit/about.ts +1 -1
- package/toolkit/index.ts +1 -1
|
@@ -10,6 +10,8 @@ Take these instructions into account:
|
|
|
10
10
|
|
|
11
11
|
- The code must be well written and easy to understand to novices. It cannot use advanced constructs.
|
|
12
12
|
|
|
13
|
+
- Never overoptimize.
|
|
14
|
+
|
|
13
15
|
- The code does not have to check the preconditions stated in the problem statement.
|
|
14
16
|
|
|
15
17
|
- Do not use any non-standard libraries.
|
|
@@ -4,4 +4,6 @@
|
|
|
4
4
|
|
|
5
5
|
- Add a `using namespace std;` declaration after the include section and do not use `std::` prefixes.
|
|
6
6
|
|
|
7
|
-
- Avoid the use of long long
|
|
7
|
+
- Avoid the use of `long long int` and use `int` instead.
|
|
8
|
+
|
|
9
|
+
- Avoid using `break`, `continue` and exceptions.
|
|
@@ -4,6 +4,10 @@
|
|
|
4
4
|
|
|
5
5
|
- Use type hints for function definitions. Do not use old-style type hints such as `List[int]` with `List` imported from `typing`, but use modern syntax such as `list[int]`.
|
|
6
6
|
|
|
7
|
+
- Use `type` keyword or `TypeAlias` with a suitable semantic name rather than repeating raw complex types. For instance, use `type Temperatures = list[float]` instead of `list[float]`.
|
|
8
|
+
|
|
9
|
+
- Avoid using `break`, `continue` and exceptions.
|
|
10
|
+
|
|
7
11
|
- Ensure that the generated Python3 code follows best practices, including proper indentation, use of functions, use of docstrings, and adherence to PEP 8 style guidelines.
|
|
8
12
|
|
|
9
13
|
# Very important
|
|
@@ -41,4 +45,6 @@ for x in tokens(int): # iterates over all integers in the input
|
|
|
41
45
|
print(s) # prints the sum of all the integers in the input
|
|
42
46
|
```
|
|
43
47
|
|
|
48
|
+
Priorize `tokens(type)` over `scan(type)` when possible.
|
|
49
|
+
|
|
44
50
|
In yogi functions, `type` can be `int`, `float`, or `str`.
|