bicsi / cprep Goto Github PK
View Code? Open in Web Editor NEWA very handy utility for preparing tests for contests.
License: GNU General Public License v3.0
A very handy utility for preparing tests for contests.
License: GNU General Public License v3.0
Is there any way to change the default code of gen.cpp and sol.cpp without going to the source code? Would be great if there is a command allowing users to config them.
Something like cprep config-template -g path_to_gen -s path_to_sol
.
Currently, all test cases are named in one format test$$.in
. However, it's quite hard to track which one is in which subtask or which one is an edge case. For example, it is great if we can name them like big$$.in
and small$$.in
with some configs. I would prefer if the configs are put in tests.sh because it's much easier to manage all test cases there. It already has the hashtag line to separate subtasks, what about putting another line right below for the name (use the default config if empty)?
In Windows 10, it doesn't give TLE status if a solution passes time limit (it works in Ubuntu though). It is a Python problem as stated here. I tried running the subprocess.run()
with timeout and it does not work. It works if not set shell=True
in subprocess.run()
.
Here is the log, seems like an encoding error. (Windows 10)
$ cprep generate
Discovered files:
- gen.cpp (generator)
- sol.cpp (solution)
- tests.sh (tests)
Compiling all files...
- gen.cpp Traceback (most recent call last):
File "d:\programdata\miniconda3\lib\runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "d:\programdata\miniconda3\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "D:\ProgramData\Miniconda3\Scripts\cprep.exe\__main__.py", line 7, in <module>
File "d:\programdata\miniconda3\lib\site-packages\cprep_cli\__main__.py", line 54, in main
args.run(cfg, args)
File "d:\programdata\miniconda3\lib\site-packages\cprep_cli\commands\generate.py", line 15, in run
pipelines.compile_files(files, cfg)
File "d:\programdata\miniconda3\lib\site-packages\cprep_cli\pipelines.py", line 74, in compile_files
print(line)
File "d:\programdata\miniconda3\lib\encodings\cp1252.py", line 19, in encode
return codecs.charmap_encode(input,self.errors,encoding_table)[0]
UnicodeEncodeError: 'charmap' codec can't encode character '\u2713' in position 5: character maps to <undefined>
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.