MineForces is used to filter problems on Codeforces. You could get several sets of problems like this:
then you could use Virtual Judge to host contests with the problems that meet your specific conditions.
You need Node.js installed and type the following in command line:
sudo npm install -g mine-forces
Usage: mineforces [options]
Options:
-h, --help output usage information
-V, --version output the version number
-s, --setting <path> the path of the setting file
-u, --user <user_name> add your id to team value
-f, --force force updating the problem information
-o, --output <path> save filter result to output path
Setting is stored in a JSON file. If you do not provide the path of the file with -s
, the program will use the default setting:
{
"team": [],
"chase": [],
"accepted": false, // Single
"set_num": 10,
"problem_num": 5,
"force_update": false,
"solved": [5000, 2000, 1000, 500, 100], // Single
"tag_accept": [], // Array
"tag_reject": [], // Array
"tag_reject_if_single": [], // Array
"tag_reject_if_none": false, // Single
"id_range": [0, 100000], // Array
"id_alpha": [], // Array
"id_reject": [], // Array
"reject_sub": false, // Single
"ascii_only": true,
"show_team_status": ["total"],
"show_problem_detail": ["title", "solved", "tag", "url"],
"force_new_tag": false,
"random_order": false,
"output_path": ""
}
Team contains an array of Codeforces IDs, when your team are practicing together, MineForces is useful to find problems that none of your team members has solved.
If you want to find the unsolved problems of vjudge1
, you can write a json file named team_1.json
:
{
"team": "vjudge1"
}
and type:
mineforces -s ./team_1.json
or without specifying a json file:
mineforces -u vjudge1
However, you should NEVER use vjudge[1-5]
in team
or chase
because each of these accounts has thousands of pages of submissions.
If you have a team contains vjudge1
, vjudge2
and vjudge3
, you can write a json file named team_2.json
:
{
"team": ["vjudge1", "vjudge2", "vjudge3"]
}
and type:
mineforces -s ./team_2.json
This property has the same format as team
, when chase
is not an empty array, only the problems that chase
has solved will be returned.
Imagine one day you suddenly want to solve all the problems that tourist
has solved on Codeforces, you can create a json file chase.json
:
{
"team": "your_cf_id",
"chase": "tourist"
}
and type:
mineforces -s chase.json
The default value is false
. When accepted
is set to false
, only the unsolved problems will be returned. However, if it is set to true
, BOTH solved and unsolved problems would be returned. This property is mostly used for testing, you can ignore this property.
The number of problem sets that will be returned.
The number of problems in one problem set.
The problem stats will not update if it has updated the stats within a week. And the submission information will not be updated if the last update happended within ten minutes.
You can see some properties followed with the comment single
and some with array
. For a single
property, if the value is not an array, then this value is used to filter all the problems. Otherwise, the length of the array should be the same as problem_num
, the value is used to filter the problem with corresponding index. While for a array
property, if the value is not an array, then the value could be seen as an array with one element. If it is an array of array, then the rule is the same as single
with an array supplied.
If solved
is an empty array, then there is no limitation about how many users have solved the problem. If solved
is non-empty, it should have the same length as problem_num
. The problem which has a larger solved number will not be returned. For example, the second problem in a problem set which has been solved by 301 users will not be returned if the solved
value is [400, 300, 200, 100, 50]
.
This property is useful to control the difficulty, if you want a set of problems that has the approximately difficuly as Div 2
, you can use:
{
"team": "your_cf_id",
"solved": [5000, 4000, 3000, 1000, 700]
}
And if you want a Div 1
:
{
"team": "your_cf_id",
"solved": [3000, 1000, 700, 400, 100]
}
If the value is empty, then all the cateogries will be returned. If the value is non-empty, only the problem with one tag appeared in the tag_accept
array will be returned.
If you want to solve dynamic programming problems only, you can use:
{
"team": "your_cf_id",
"tag_accept": "dp"
}
The problem with one tag appeared in the tag_reject
array will not be returned.
The problem which has only one tag and the tag appeared in the tag_reject_if_single
array will not be returned. This is useful to filter out implementation
and brute force
.
The problem with no tag will not be returned.
If you do not want to solve old problems, you can set:
{
"id_range": [100, 100000]
}
then problems like 99A
, 99B
, 1C
will not returned.
If the value is an empty array, then nothing happends. If you want to solve problems like 100E
, 101E
, 102E
, you can set:
{
"id_alpha": "E"
}
If you want to specify each problem, you can use:
{
"id_accept": [["A"], ["B"], ["C"], ["D"], ["E"]]
}
The specific problem ids will not returned:
{
"id_reject": ["123B", "456C"]
}
Suggestions:
- April Fools' Rounds:
- 2012: 171 A-G
- 2013: 290 A-F
- 2014: 409 A-I
- 2016: 656 A-G
- 2017: 784 A-G
- Superise/Unknown Language Rounds:
- Tcl: 64 A-I
- Io: 72 A-I
- Pike: 100 A-J
- Refunge: 130 A-J
- COBOL: 153 A-E
- Factor: 162 A-J
- Roco: 188 A-H
- FALSE: 470 A-H
- Picat: 530 A-I
- Kotlin: 683 A-J
Some problems have multiple difficulties (178C1
, 178C2
and 178C3
), these problems will not returned if reject_sub
is set to true
.
Some problems on Codeforces are not written in English, the problem with a title that has non-ascii character will not return.
Show how many problems have been solved by the team in each category. The value could be total
, alpha
and tag
.
Each problem in a problem suite should have at least one tag that has not appeared before.
The problems in a problem suite will show in random order.
GPL-2.0