File size: 2,639 Bytes
6ec8295
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
---
license: cc-by-nd-4.0
dataset_info:
  features:
  - name: prob_zh
    dtype: string
  - name: prob_en
    dtype: string
  - name: prob_level
    dtype: string
  - name: algorithm_tag_zh
    dtype: string
  - name: algorithm_tag_en
    dtype: string
  - name: canonical_solution
    dtype: string
  - name: test_case
    list:
    - name: input
      dtype: string
    - name: output
      dtype: string
  - name: pseudo_code
    dtype: string
  - name: buggy_code
    dtype: string
  - name: corrupted_code
    dtype: string
  - name: id
    dtype: string
  splits:
  - name: test
    num_bytes: 2383665753
    num_examples: 100
  download_size: 1579799948
  dataset_size: 2383665753
configs:
- config_name: default
  data_files:
  - split: test
    path: data/test-*
---


# OIBench Dataset

## Dataset Overview
The **OIBench Dataset** contains algorithm problem statements, solutions, and associated metadata such as test cases, pseudo code, and difficulty levels. The dataset has been processed and stored in Parquet format for efficient access and analysis.

We provide complete information for the first 100 questions in the data (use `dataset = load_dataset("Milo0007/OIBench")` to access, as the test cases are large and the default Dataset Viewer on Hugging Face may not fully display the information). After the submission is accepted, we will provide the complete information for all 250 questions.  

For the remaining 150 questions, currently we provide the problem descriptions in both Chinese and English in `problem.parquet`.  

We provide the competition records of human participants in `human_participants_data.parquet`.

## Dataset Structure
The dataset includes the following fields:

- **`id`**: Problem ID (e.g., `000`, `001`, ..., `249`)
- **`prob_zh`**: Problem description in Chinese
- **`prob_en`**: Problem description in English
- **`algorithm_tag_zh`**: Algorithm tags in Chinese
- **`algorithm_tag_en`**: Algorithm tags in English
- **`level`**: Problem difficulty
- **`canonical_solution`**: Official solution code in C++
- **`test_case`**: List of test cases, each containing `input` and `output`. 
    - Each test case is structured as a list of objects containing:
      - `input`: The input for the test case
      - `output`: The output for the test case
- **`pseudo_code`**: Pseudo code for the algorithm
- **`buggy_code`**: Buggy code for the problem
- **`corrupted_code`**: Incomplete code for the problem

## Usage

You can load the dataset in your Python code using the following example:

```python
from datasets import load_dataset

dataset = load_dataset("Milo0007/OIBench")
print(dataset)