thanks a lot for your help. Sedefcho, you were perfectly right, the algorithm was ok, I almost don't dare to tell you that I missed to initialize the last field of my array . I submitted both versions we discussed for the cases N=3,4 and both were accepted.
I submitted this problem so many times now, no matter whether I output 0 3 or 0 2 for this query, they all give WA. All queries I found on the board work fine. The only thing that is not entirely clear to me is what you pointed out , mf (the problem is clear, the correct way to ...
thanks for your immediate reply. IMHO the inconsistency remains: let's consider N=3. Using your definition, we know that 3 is element of the triple (3,4,5), but since z > N holds, we do not count 3. Since (3,4,5) is the smallest existing triple N = 3 cannot be part of any other triple ...