Wrong answer (5%)

Pether asked 2 years ago

Alguém me ajuda por favor? Deu certo para todos os mil casos de teste no uDebug.

Someone help me please? It worked for all 1,000 test cases on uDebug.

Question solved. Code removed.

This topic was solved and cannot recieve new replies.

  • feodorv replied 1 year ago

    I've added the following lines into my code and got RE:

        char *ptr = NULL;
        if( destination > 100000 ) *ptr = '\0';

    Seems that the judge input is wrong. Alas. To get AC you can generate graph on the fly. Or change the output line on

            cout << ((destino <= 100000) ? dist[destino] : -1) << "\n";
  • feodorv replied 1 year ago

    Oh. Here it is: line #45

                if(!pro[i]) {

    You skipped the outgoing edges from "some specific channels". Start channel can be one of "some specific channels".

  • feodorv replied 1 year ago

    Sorry, I can't find the error besides this one:

            for(int i = 0; i <= t; i++) {

    Seems you mean i < t. And you can freely set t as MAXN+1.

  • Pether replied 1 year ago

    Oh. That's right, I got AC! Thank you very much!!

  • Pether replied 1 year ago

    But even without this restriction I still get WA 5% :(