can you plz tell why this code showing nzec

java
nzec
nzecerror

#1

Code for the pproblem : http://www.codechef.com/problems/CLEANUP

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.StringTokenizer;

class Walk {

public static void main(String[] args) throws Exception {
	// TODO Auto-generated method stub
	int noOfTestCases;
	BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
	PrintWriter pw = new PrintWriter(System.out);
	noOfTestCases = Integer.parseInt(in.readLine());

	while (noOfTestCases > 0) {

		int totalNoOfJobs;
		int noOfJobsDone;
		boolean flag = true;
		String input = in.readLine();
		StringTokenizer st = new StringTokenizer(input);
		totalNoOfJobs = Integer.parseInt(st.nextToken());
		noOfJobsDone = Integer.parseInt(st.nextToken());

		input = in.readLine();
		StringTokenizer st1 = new StringTokenizer(input);

		int[] indexOfJobDone = new int[noOfJobsDone];
		int[] chef = new int[totalNoOfJobs];
		int[] assistant = new int[totalNoOfJobs];
		int chefIndex = 0;
		int assistantIndex = 0;

		for (int i = 0; i < noOfJobsDone; i++)
			indexOfJobDone* = Integer.parseInt(st1.nextToken());

		Arrays.sort(indexOfJobDone);

		for (int i = 1; i <= totalNoOfJobs; i++) {

			if (Arrays.binarySearch(indexOfJobDone, i) < 0) {
				if (flag) {
					flag = false;
					chef[chefIndex++] = i;
				} else {
					flag = true;
					assistant[assistantIndex++] = i;
				}
			}
		}

		for (int i = 0; chef* != 0; i++)
			pw.print(chef* + " ");
		pw.println();
		for (int i = 0; assistant* != 0; i++)
			pw.print(assistant* + " ");
		pw.println();

		pw.flush();
		noOfTestCases--;
	}
}

}

#2

@harishmohanani, bro from my experience, here you wont get the answer for your above tl;dr code. reasons, imho:

1 - code is not clear and simple

2 - no link to the problem

3 - intention is not clear

etc.

and after checking your profile, i realized that 1st you got nzec and then AC. you should close the question after AC or mention here that you got AC. the forum is not for “fix my bugs” purpose. you have to google your bug or see other AC codes before bothering others. my downvote goes to you for your laziness, sorry.


#3

the link to the problem stmt
http://www.codechef.com/problems/CLEANUP

It is working on my machine perfectly