rocks2hm's blog

By rocks2hm, history, 8 years ago, In English

Is is possible to create an application using c++ and qt creator, which will take input(code) from user and will show result of submission as Wrong answer or Accepted!

  • Vote: I like it
  • -3
  • Vote: I do not like it

| Write comment?
»
8 years ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

You need to know the concept behind judging. Usually there are two types of judge,

  1. Normal Judge: They compare the result of the submitted problems execution for a input with the judges output file. AC is given if they match. Other verdict can be given by analyzing the submitted programs behivour.

  2. Special Judge: There are programs inside the judge, which takes the submitted programs output and determine if that is correct. Problems that allow multiple type of solution require this.

So, basically you need the output and input file for every problem you are going to test. If the problem require special judge, you need the program that can check the result, NB: every problem need different program.

You may also want to see the program PC^2, check if that meet your needs.

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

    How can I integrate compiler to my application, there are no option in language, the person can submit in only c++, there is no server or lan, the application will be in the users desktop, he will submit soln and a log will be created for his each submission.

    I just want to integrate a compiler to my application, user submit a soln in c++, he can see the verdict, and there will be a log file which will contain all the verdicts and timings of soln!

    Please help!

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

      For what OS do you make the program? Under linux you have the exec function, which can run commands such as g++. So you will make the executable by compiling the code usung exec and g++, and then you will run the binary file (your program, the executable) also with exec.