pushpavel's blog

By pushpavel, 3 years ago, In English

The starting part of my competitive programming setup felt just ideal with vscode and its amazing cphelper extension. I remember reading articles like "Setting up your C++ competitive programming environment" that got me up in no time. Later, when I heard about Clion, I understood how much it could offer me. This time around CLion the starting part was not ideal but still okay. But I could not find something as simple and straightforward as cphelper in any of the plugins that I looked and most of their docs were clearly not making my setup any simpler. There was no way I could ignore CLion and its amazing features. So, I had to do something and this plugin is what I did.

Despite making it easier for me to use, I hope to make it as accessible as possible. It would be very helpful if you could let me know of any issues or suggestions on GitHub by opening a new issue and would love feedback by rating or reviewing the plugin. Use Discussions for any questions.

The instructions in this post are outdated, please refer the latest docs

AutoCp

Generate and judge your solution files in Programming Contests. See Docs

Competitive Companion browser extension is required to parse the problems from cp websites

AutoCp helps you

  • Create solution Files using Competitive Companion
  • Build and run any programming language by customizing the build command in Settings/Preferences > AutoCp
  • Test your solutions against sample testcases, or your own testcases
  • Test results are presented in Test Runner UI built in the IDE.

Installation

  • Using JetBrains Marketplace
  • Using IDE built-in plugin system:
    • Settings/Preferences > Plugins > Marketplace > Search for "AutoCp" > Install Plugin
  • Manually:
    • Download the latest release and install it manually using Settings/Preferences > Plugins > settings icon > Install plugin from disk...

Quick Start

  • Generate files by Tools > Gather Problems and parsing the problem or contest using Competitive Companion
  • Write your program
  • Run the file by right-clicking
  • Open View > Tool Windows > AutoCp to open testcase viewer
  • Customize Build commands or add new Programming Languages through Settings / Preferences > AutoCp

Supported IDEs

Android Studio, CLion, DataGrip, JetBrains Gateway, GoLand, IntelliJ IDEA Ultimate, IntelliJ IDEA Community, IntelliJ IDEA Educational, MPS, AppCode, PhpStorm, PyCharm Professional, PyCharm Community, PyCharm Educational, Rider, RubyMine, WebStorm

Screenshot

  • Vote: I like it
  • +29
  • Vote: I do not like it

| Write comment?
»
3 years ago, # |
  Vote: I like it 0 Vote: I do not like it

mass thala !!!

»
3 years ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

Output Issue with v0.2.0

If someone faces issues with output of your code, It is fixed in v0.2.1 which will go public within two business days in JetBrains marketplace. But, you can install it now manually.

Download the latest release and install it manually using Settings / Preferences > Plugins > settings icon > Install plugin from disk... and selecting the downloaded zip file

Screenshot

»
3 years ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

Why .autocp file appears on every project that I have ?

  • »
    »
    3 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    It is a bug, I am planning to remove .autocp altogether. I hope I will finish it soon. disable Autocp in other projects for now. Thank you

  • »
    »
    3 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    This issue is fixed in v0.5.0-eap.1 which can be installed using this instructions

»
3 years ago, # |
  Vote: I like it 0 Vote: I do not like it

Hello. Today I have installed this plugin, and I'm excited. This is very comfortable to use. But when we creating new task in Clion, we must add file into CmakeLists.txt, else we cannot use some features like highlighting errors in code. Can you add automatic addition files in CmakeLists.txt?

»
3 years ago, # |
  Vote: I like it 0 Vote: I do not like it

hi i am facing constant issue of detecting problems from browser and even if it detects it throws error that can't run program on debug

  • »
    »
    3 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Hi, debugging is not supported with AutoCp. You can use a regular run configuration to debug your program. For the detecting problems issue, file a bug report on my GitHub repo.

»
2 years ago, # |
Rev. 2   Vote: I like it -21 Vote: I do not like it

hello! I installed the plugins and it's very cool...but I can't write the template and define the things that I usually write in the file to run ..when I copy the code and put it in the template it makes an error after some search I found that... I should use specific syntax to define my template can you give me an example to make my template like it !!! I searched a lot and don't find any help.. and I think not all the programmers know that this plugin even exists...I shared it with my friends and it's so nice.

#Inlcude#<bits/stdc++.h> with this command i can define this to the template

but how to define other things!!!

  • »
    »
    2 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Hi, check this template reference guide. If you don't want to use these features you can wrap your whole template code inside #[[ and ]]#. Great to hear your feedback :)

»
2 years ago, # |
Rev. 2   Vote: I like it -10 Vote: I do not like it

how to set default code ?

  • »
    »
    2 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it
    • »
      »
      »
      2 years ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      AutoCp does not have enough info on the issue. You may have missed arguments for a file template directive like #parse directive without arguments You may have not escaped a file template directive like #define which is also a valid c++ syntax You can refer more about velocity file template syntax Or if you do not use any file template specific syntax, simply wrap the entire file template within #template# If the error above is unexpected, please file an issue

      showing error after installation can you help please

      worked for only 3 days

      • »
        »
        »
        »
        2 years ago, # ^ |
          Vote: I like it 0 Vote: I do not like it

        Can you share your file template that is causing this issue

»
5 months ago, # |
  Vote: I like it 0 Vote: I do not like it

I wanted to thank you for the excellent project, one of the best I've ever seen. Congratulations! God bless you...

»
5 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Great approach