This document outlines the format for the input data used in the program.
- The first line contains the number
OP, representing the number of operations. - Starting from the second line, each operation is encoded as follows:
- 1 - ADD:
1 N fd1 size1 fd2 size2 ... fdN sizeNN: Number of files to be added.fdX: File descriptor.sizeX: File size in kB.
- 2 - GET:
2 fdfd: File descriptor to retrieve.
- 3 - DELETE:
3 fdfd: File descriptor to delete.
- 4 - DEFRAGMENTATION:
4
- 1 - ADD:
4
1
5
1
124
4
350
121
75
254
1024
70
30
2
121
3
4
4
1. **4 operations** are performed.
2. **ADD** operation:
- 5 files are added with descriptors and sizes:
- `1: 124 kB`
- `4: 350 kB`
- `121: 75 kB`
- `254: 1024 kB`
- `70: 30 kB`
3. **GET** operation for file descriptor `121`.
4. **DELETE** operation for file descriptor `4`.
5. **DEFRAGMENTATION** operation.
1: (0, 15)
4: (16, 59)
121: (60, 69)
254: (70, 197)
70: (198, 201)
(60, 69)
1: (0, 15)
121: (60, 69)
254: (70, 197)
70: (198, 201)
1: (0, 15)
121: (16, 25)
254: (26, 153)
70: (154, 157)