WARRIORS - Code working correctly except on CodeChef

I am solving the problem WARRIORS. My Code is running correctly on my local machine as well as other IDE’s on sample test cases, but not on CodeChef.
Error is that my Code gives Wrong Answer
I can’t figure out what’s wrong with my code.

#include <bits/stdc++.h>
using namespace std;

long int kills(std::vector<long double> &Fight, long int X, long int N)
	for (long int i = 0; i < N; ++i)
			return i;

	return N;

int main()

	int test_cases; cin>>test_cases;
	for (int i = 0; i < test_cases; ++i)
		long int N, Q; cin>>N>>Q;
		long int X;
		std::vector<long int> P(N,0);
		std::vector<long double> Fight(N,0);
		for (long int j = 0; j < N; ++j)


    //Stores the min energy level required for every next fighter
		for (long int j = 1; j < N; ++j)
		for (long int j = 0; j < Q; ++j)
		{ scanf("%ld",&X); 
		  cout<< kills(Fight,X,N)<<'\n';}
1 Like

same happened with me too. +1