You are not logged in. Please login at www.codechef.com to post your questions!

×

Getting java NZEC error on codechef compiler

Guys i am trying to solve the DAG Delete problem of December contest. My code runs perfectly fine on my computer and i have tested it for multiple cases. I have also made sure that everything is properly initialized and checked for corner cases too. Earlier i was using too much memory and even that is not the case now. Please tell me what are the not so common reasons where you people got Run Time Error or how should i proceed with debugging my code.

Best Regards

asked 09 Dec '18, 16:52

hellopkhere's gravatar image

3★hellopkhere
-1
accept rate: 0%


can you provide test cases for which you are getting error

link

answered 15 Dec '18, 09:13

ankitydav's gravatar image

4★ankitydav
1
accept rate: 0%

I am facing the same problem in directing edges question. any suggestions?

link

answered 15 Dec '18, 13:43

martinian97's gravatar image

3★martinian97
1
accept rate: 0%

hi i have tried to solve this package it's working fine when i try it but when i upload the answer i get NZEC so plz someone help! this is my code java application1; import java.util.Scanner; public class Main { public static void main(String[] args) {

Scanner sc = new Scanner(System.in);
int arr[][] = new int[100][2];

int x = sc.nextInt();
int y = sc.nextInt();

int ii = 0;
while ((x!=-1)&&(y!=-1)){
    arr[ii][0] = x;
    arr[ii][1] = y;
    ii++;
     x = sc.nextInt();
 y = sc.nextInt();
}

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


        x = arr[i][0];

        y = arr[i][1];
        if ((x == 1) || (y == 1)){

            System.out.println(x + "+" + y + "=" + (x + y));
        }

else{ System.out.println(x + "+" + y + " !=" + (x + y)); } }

} }

link

answered 17 Jan, 14:46

yashnit's gravatar image

0★yashnit
1
accept rate: 0%

toggle preview
Preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported
  • mathemetical formulas in Latex between $ symbol

Question tags:

×532

question asked: 09 Dec '18, 16:52

question was seen: 140 times

last updated: 17 Jan, 14:46