Let's practice algorithms with Acmicpc Kit !
Acmicpc Kit
is a template project for creating the problem
project using fully customizable templates. Click button to get started right now.
- Creating a new problem
$ ./mvnw -N acmicpc:create -Dproblem=1234
- Creating a new problem with a specific template
$ ./mvnw -N acmicpc:create -Dproblem=1234 -Dtemplate=specific
- Creating a problem for specific site
$ ./mvnw -N acmicpc:create -Dproblem=two-sum -Dsite=leetcode.com
- Revalidating project
$ ./mvnw -N acmicpc:revalidate
- Click
Use this template
button above to create a repository. - Clone the repository to your machine.
$ git clone https://github.com/{{username}}/acmicpc-kit.git
- Enter the directory.
$ cd acmicpc-kit
The pre-defined template is java
template under the templates
directory. And it is used as a default template.
If you want to create a new template then please follow these steps.
- Create a new directory with desired name under the
templates
directory. - Fill in the directory with your template files.
- Edit
template
property inpom.xml
.<properties> <template>new-template-dir-name</template> <!-- e.g. 'java' --> </properties>
This kit provides two site specific templates which is acmicpc.net and leetcode.com.
If you want to create a new template for new site then please follow these steps.
- Create a new directory like
site-domain/template-name
under thetemplates
directory. - Fill in the directory with your template files.
- Edit
site
andtemplate
properties inpom.xml
.<properties> <site>new-site-dir-name</site> <!-- e.g. 'leetcode.com' --> <template>new-template-dir-name</template> <!-- e.g. 'java' --> </properties>
-
I am not a Java developer. Can I use this program ?
Of course you can. Just create a new template directory under the
templates
and edittemplate
property to template directory name inpom.xml
. -
I'm using another site(s) instead of acmicpc.net to solve algorithm problems. Can I use this program?
Of course you can. There are no restrictions on the use of this program. And you can edit the template. If you are using multiple sites then you can set
site
property. It's up to you. -
I just created a problem project but where is it ?
It is created in the
problems
directory. -
Can I delete the
pom.xml
file that exists in each problem directory ?Please do not delete that file if you are a Java developer. It is designed for IDE to recognize the problem directory as a Maven module so that makes you to develop much easier.
-
It shows
Error: JAVA_HOME not found in your environment.
This program requires Java. Please install it and try again.
-
How can I run
mvnw
command ? It shows me one of the following error messages.- zsh: command not found: mvnw
- The term 'mvnw' is not recognized as a cmdlet, function, operable program, or script file. Verify the term and try again.
- '.' is not recognized as an internal or external command, operable program or batch file
(Mac or *nix) Try
./mvnw ..
instead ofmvnw ..
.
(Windows) Trymvnw ..
instead of./mvnw ..
. -
It shows
Some problems were encountered while processing the POMs:
Try
./mvnw -N acmicpc:revalidate
to revalidate the Kit. -
It seems try to compile all of problems project when I create a new one. And it makes me to wait for a long time.
That's why I describe
-N
flag to all of themvnw
commands. The-N
flag will do what you want. Try./mvnw -N acmicpc:create ..
. -
All of problems project seems to being skipped from maven build when I create a new one.
It's OK. It works really well.
-
Can you provide a feature to download the problem text as a file from acmicpc.net ?
No. This can lead to sensitive issues related with copyright. Also, web scraping isn't allowed according to the rules.
-
Then can you provide a migration feature for downloading my source code that I've already submitted to acmicpc.net ?
No. According to the rules, web scraping isn't allowed for now.
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please note we have a CODE_OF_CONDUCT, please follow it in all your interactions with the project.
Please refer to LICENSE.