Hi, this is the solution for UVa 700, I'm not sure why it is returning Wrong Answer on the judge all the time, could someone tell me what I'm missing?
It works fine in my testing
The first problem you have is compile errors. Fix them first.
(Set your compiler to use C++14 as strictly as possible. That means you'll have to get rid of those VLAs — you really don't need them — and fix the drop-through bug in findYear().)
I found the problem, it is when I initialized arrays I assumed all the values are false, but although it is on my compiler it isn't on the judge's compiler. I fixed this by initializing a 2D array using this;
1 2 3 4
bool** existYear=newbool*[n];
for (int loop=0; loop<n; loop++) {
existYear[loop]=newbool[10000](); // () needed for initializing w/ all elements set to false in all compilers
}