ejudge | EOJ 评测核心 沙箱接口 - Readme | REST library
kandi X-RAY | ejudge Summary
kandi X-RAY | ejudge Summary
Readme not ready yet.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Judge a test
- Runs the experiment
- Trace the dependencies of the dependency graph
- Runs the checker
- Upload a case
- Write binary data to file
- Write the given buffer to the output file
- Decorator to require authentication
- Check username and password
- Decorator to catch errors and reject errors
- Submit a script
ejudge Key Features
ejudge Examples and Code Snippets
Community Discussions
Trending Discussions on ejudge
QUESTION
I am implementing a simple solution of the sequence to see if it's monotonic or strictly monotonic. I tried different inputs, corner/worst cases, it works, for a better presentation of the problem, the following is the specific statement of the problem.
Determine whether a sequence of number is strictly monotonic or monotonic.
Input:
Contains integer number n (2 ≤ n ≤ 10^9) - number of elements in sequence. There are n elements after it.
Output:
If sequence is strictly monotonic then write "2" else if sequence is juct monotonic then write "1" and "0" in other cases.
My code:
...ANSWER
Answered 2019-Sep-29 at 14:11I tried your code.
I had to remove the two freopens, which broke what otherwise seems a MRE.
It compiled successfully.
I entered 4, for 4 inputs, then
2
1
The output is 0.
a) your code ignores everything after the second value
b) your code terminates early
c) for the strictly monotonically decreasing sequence (the non-ignored part) "2,1", it outputs the value for "other cases"
I guess that this does not answer the question in your mind.
But you will have to ask that one, because the one you wrote I consider answered.
In case your question is actually "How can I find out which part of my code causes the error?" I recommend to use a debugger:
How to debug using gdb?
How to debug in Codeblocks?
Or, more generally,
https://ericlippert.com/2014/03/05/how-to-debug-small-programs/
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install ejudge
You can use ejudge like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page