Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support jagged multiline input format #178

Open
prabowo02 opened this issue Nov 10, 2019 · 0 comments
Open

Support jagged multiline input format #178

prabowo02 opened this issue Nov 10, 2019 · 0 comments

Comments

@prabowo02
Copy link

Suppose we have N arrays, each having the length M_i
The arrays are given in the input in the following format:

N
M[1] A[1][1] A[1][2] ... A[1][M[1]]
M[2] A[2][1] A[2][2] ... A[2][M[2]]
.
.
M[N] A[N][1] A[N][2] ... A[N][M[N]]

Currently, the InputFormat is written as LINES(M, A) % SIZE(N) and the size of each array is checked again in the Constraints
I think it is better to have the sizes of each array validated in the Input Format (maybe we can have something like LINES(M, A % SIZE(M)) % SIZE(N)).

This is also useful for multiple queries problem, where each query type has differing format.

Example problem: https://training.ia-toki.org/problemsets/182/problems/1065/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant