Can I submit SEVERAL files (e.g. header file, several classes) as ONE solution ?

When writing a solution, I would like to separate classes (Java) or header/ implementation (C++) and submit the solution in this form.

Can I submit SEVERAL files (e.g. header file, several classes) as ONE solution ?

Thank you!

1 Like

AFAIK this is not possible for C++. Probably for Java you can create jar, but I never tried. Contest programming is different in this comparing to enterprise programming.

In C++ you can define all your constants and other things in .cpp file.

In Java your file can contain more classes also (but none of them should be public). So you have 2 possibilities:

class A {
	// ...
}

class B {
	// ...
}

I never tested the above code, or (Iā€™m using this one) you can use inner classes

class A {
	// ...
	
	static class B {
		// ...
	}

}
2 Likes