disisbig's blog

By disisbig, history, 5 weeks ago, In English,

Did you ever wish in a contest for something which would tell you which competitive programming concept will be used to solve the problem?

Check out Code with AI where you just need to copy-paste the problem statement and AI will help you figure out which concept you should apply to get an AC :)

 2). Copy the problem statement you're solving

 3). Paste it and hit enter

Issues at: https://github.com/goru001/code-with-ai

Update: I've added the code for data collection and model training in the repository. Those who're interested can check out.

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

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

Auto comment: topic has been updated by disisbig (previous revision, new revision, compare).

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

Nice concept but I think you are using tags of problems which are already known. I'm curious to know how will it work on the problems having no tags given already.

  • »
    »
    5 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    I don't think that's the case. I tested it with a problem from here and it pretty much gave me the correct tags.

  • »
    »
    5 weeks ago, # ^ |
      Vote: I like it +19 Vote: I do not like it

    I've used the same name of tags which codeforces uses — to train my model using NLP. So, there's no "hashtable" kind of implementation about which you're thinking maybe. The model is generalized enough to give good enough score — and to be precise — I've a model with F1 Score of 60. I'll be posting my model and how I trained it soon on github and then maybe it'll be clear how it's happening.

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

Auto comment: topic has been updated by disisbig (previous revision, new revision, compare).

»
3 weeks ago, # |
  Vote: I like it +28 Vote: I do not like it

Did you consider contacting ItsNear! They work on similar project (producing complete solution from the statement)

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

    I didn't know about that. They've open-sourced their work? Can you point me to their repo?

»
3 weeks ago, # |
  Vote: I like it +8 Vote: I do not like it

However, it says A+B problem contains "data stuctures" and "number theory" :-)

Statement
Output the sum of two integers A and B.
Input
two integers, A and B.

Output

One integer, sum of A and B.

constraint
1 <= A, B <= 10^9

Example
input
3 5
output
8

Sorry but I don't know how to insert pictures...

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

    To your first point, a similar comment was made on Jeremy's tweet as well. But the thing is, input should be similar to the training data (which was competitive programming problems), only then you'll get reasonable results.

    I can handle A+B, 1+2 kind of situations through a hack by doing something like

    if len(problemStatement) < 10:
         # Don't output any class
    

    but I'm looking for a neat solution, which will only come with such training data (tell me if any of you has any ideas on this) I guess.

    To your second point, No need to insert pictures (or no way to input pictures into the model yet), just copy paste the rest of the text of your problem, and if the output isn't too dependent on pictures, you'll get the correct answer.

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

      Thank you for your reply.

      And for the second point, I meant that I made a screenshot of that page but don't know how to insert it into the comment. Sorry if it has different meanings.