Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add submission details after submitting any problem #50

Closed
Vishal1541 opened this issue Jan 31, 2019 · 5 comments · Fixed by #54
Closed

Add submission details after submitting any problem #50

Vishal1541 opened this issue Jan 31, 2019 · 5 comments · Fixed by #54
Assignees

Comments

@Vishal1541
Copy link
Member

The submission schema should look like:
username: String,
qID: Number,
subID: Number,
code: String,
language: String,
verdict: String,
time: Number,
memory: Number,
isVisible: Boolean,
timeStamp: Date,
tc: [{ status: String, time: Number, memory: Number }]

The subID will be 1 + total no of submissions till now. URL: http://localhost:3000/submit/:qID

@vsvipul
Copy link
Member

vsvipul commented Jan 31, 2019

on it

@Vishal1541
Copy link
Member Author

The main function to edit is in ./controls/problems.js: submitSolution()

@Vishal1541
Copy link
Member Author

Also, @vsvipul, the first non AC status will be the verdict and hence the time and memory, else the verdict will be "Accepted" and time = max(tc(time)) and memory = max(tc(memory))

@vsvipul
Copy link
Member

vsvipul commented Jan 31, 2019

why max and not avg @Vishal1541 ?

@Vishal1541
Copy link
Member Author

@vsvipul in case of AC it kinda shows how much worse or good is your solution (by looking at the worst case time and memory taken). The same happens in Codechef and Codeforces.

This was referenced Jan 31, 2019
Vishal1541 pushed a commit that referenced this issue Feb 2, 2019
* add submissions model

* add mongoose-double for time and fix submission id count

* Closes #50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants