File size: 5,264 Bytes
9d9ed12
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
---
license: cc-by-4.0
language:
- pt
pretty_name: ProgramExBR
size_categories:
- 1K<n<10K
task_categories:
- text-generation
- text-classification
tags:
- code
- programming-exercises
- competitive-programming
- education
- portuguese
configs:
- config_name: default
  data_files:
  - split: train
    path: data/train.parquet
---

# ProgramExBR

O ProgramExBR reúne 2.102 exercícios de programação em português do Brasil, coletados de três plataformas públicas (Neps Academy, OBI e SPOJ Brasil) por coletores desenvolvidos para cada uma delas. Cada exercício traz o enunciado, a especificação de entrada e saída, os casos de teste de exemplo e, quando a plataforma informa, a dificuldade e os limites de tempo e memória.

ProgramExBR is a dataset of 2,102 programming exercises in Brazilian Portuguese, collected from three public platforms (Neps Academy, the Brazilian Olympiad in Informatics and SPOJ Brasil). Each record contains the problem statement, the input and output specification, the sample test cases and, when the platform provides them, the difficulty level and the time and memory limits. Datasets of this kind are common in English but still scarce in Portuguese, which limits research on code generation, exercise recommendation and learning analytics for Portuguese speaking students.

This repository mirrors version 1 of the dataset, originally published on Zenodo ([10.5281/zenodo.15724871](https://doi.org/10.5281/zenodo.15724871)) and described in a paper presented at WebMedia 2025. The data was converted to a single Parquet file with a unified schema so it can be loaded and browsed directly on the Hub.

```python
from datasets import load_dataset

ds = load_dataset("vkusterl/ProgramExBR", split="train")
print(ds[0]["name"], ds[0]["test_cases"][0])
```

## Data fields

| Field | Type | Description |
|---|---|---|
| `id` | string | Global identifier in the form `platform:source_id`, for example `neps:1503` |
| `platform` | string | `Neps Academy`, `OBI` or `SPOJ-BR` |
| `source_id` | int | Identifier in the original release, unique only within each platform |
| `name` | string | Problem title |
| `url` | string | Address of the original problem page |
| `statement` | string | Problem statement |
| `input_spec` | string | Description of the input format |
| `output_spec` | string | Description of the expected output |
| `test_cases` | list of {`input`, `output`} | Sample test cases shown on the problem page |
| `n_test_cases` | int | Number of sample test cases |
| `difficulty` | string | Difficulty reported by Neps Academy (`Super Fácil` to `Super Difícil`), null for the other platforms |
| `memory_limit` | string | Memory limit as written by the platform |
| `time_limit` | string | Time limit as written by the platform |

## Composition

| Platform | Exercises |
|---|---|
| Neps Academy | 1,448 |
| OBI | 353 |
| SPOJ Brasil | 301 |
| Total | 2,102 |

Statements have a median length of 1,046 characters, and each exercise has 2.25 sample test cases on average. Among the Neps Academy exercises, 562 are labeled `Difícil`, 324 `Médio`, 306 `Fácil`, 96 `Super Difícil` and 45 `Super Fácil`, while 115 have no difficulty.

## Possible uses

The sample test cases make it possible to check programs generated from Portuguese statements, which is useful for evaluating code generation models outside English. The statements and metadata also support exercise recommendation, difficulty estimation and the study of how programming problems are written in Portuguese.

## Limitations

The test cases are the public examples shown on each problem page, not the hidden tests used by the online judges, so passing them is a weaker signal than an accepted submission. 69 exercises have no sample test case and one has no statement. Difficulty is available only for Neps Academy. The Neps Academy file in the Zenodo release is missing its final closing bracket, and this version repairs it without changing any record. Identifiers repeat across platforms, so joins should use `id` rather than `source_id`.

The statements were collected from public pages, and the rights over the original texts remain with their platforms. Please credit the platforms and follow their terms when reusing the statements.

## Citation

```bibtex
@inproceedings{lodi2025programexbr,
  title     = {Building and Analyzing an Open Repository of Programming Exercises in Portuguese},
  author    = {Lodi, Vinicius Kuster and Sena, Jo{\~a}o Pedro Medrado and Reis, Julio Cesar Soares dos},
  booktitle = {Anais Estendidos do XXXI Simp{\'o}sio Brasileiro de Sistemas Multim{\'i}dia e Web},
  pages     = {45--48},
  year      = {2025},
  publisher = {Sociedade Brasileira de Computa{\c{c}}{\~a}o},
  doi       = {10.5753/webmedia_estendido.2025.16359}
}

@dataset{lodi2025programexbr_data,
  title     = {{PROGRAMEXBR}: A Dataset of Programming Exercises in Portuguese},
  author    = {Lodi, Vinicius Kuster and Sena, Jo{\~a}o Pedro Medrado and Reis, Julio Cesar Soares dos},
  year      = {2025},
  publisher = {Zenodo},
  doi       = {10.5281/zenodo.15724871}
}
```

## Authors

Vinicius Kuster Lodi and Julio Cesar Soares dos Reis (Universidade Federal de Viçosa) and João Pedro Medrado Sena (Universidade de São Paulo).