We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Zig Zag Sequence
- Discussions
Zig Zag Sequence
Zig Zag Sequence
Sort by
recency
|
991 Discussions
|
Please Login in order to post a comment
void findZigZagSequence(vector &a, int n) { sort(a.begin(), a.end()); int mid = (n-1)/2; swap(a[mid], a[n-1]);
}
function findZigZagSequence(arr, n){ arr.sort((a,b)=> a-b);
}
function processData(input) { //Enter your code here let lines = input.trim().split('\n') let t = parseInt(lines[0]); let index = 1; for(let i=0; i
}
process.stdin.resume(); process.stdin.setEncoding("ascii"); _input = ""; process.stdin.on("data", function (input) { _input += input; });
process.stdin.on("end", function () { processData(_input); });
Compiler Message Custom checker Failed: Success Input (stdin) 1 7 1 2 3 4 5 6 7 Your Output (stdout) 1 2 3 7 6 5 4 Expected Output 1 2 3 7 6 5 4 Custom Checker Error Message Traceback (most recent call last): File "Solution.py", line 174, in run_custom_checker(t_obj, r_obj) File "Solution.py", line 75, in run_custom_checker system_code = code_data[t_obj.submission_language].strip() KeyError: u'javascript'
I was stuck on the test case where even though the output result and the expected result was the same, it was flagged as incorrect. If you only edit three parts of the code, it works.
My answer is the same of the resolution, but is not acepted as correct, why? I made my test on python
I think something is not well on this problem, I'm trying with C#, on test I have the expected output but bellow this error:
Traceback (most recent call last): File "Solution.py", line 174, in run_custom_checker(t_obj, r_obj) File "Solution.py", line 75, in run_custom_checker system_code = code_data[t_obj.submission_language].strip() KeyError: u'csharp'