Skip to content

Commit

Permalink
Boost AC Ranking
Browse files Browse the repository at this point in the history
  • Loading branch information
中村 謙弘 committed May 6, 2016
1 parent 6dc8b02 commit 4465b7f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/src/AtCoderServer/APIServer.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def get_ranking(kind, lim=100000):
elif kind == "short":
query += " LEFT JOIN submissions ON submissions.id=problems.shortest_submission_id"
elif kind == "ac":
query = "SELECT COUNT(DISTINCT(problem_id)) AS count, user_name FROM submissions WHERE status='AC'"
query = "SELECT count, user_name FROM ac_ranking"
else:
return []
query += " GROUP BY user_name ORDER BY count DESC LIMIT %s"
Expand Down

0 comments on commit 4465b7f

Please sign in to comment.