How does the grade system work?

So I'm wondering how this system works, right now I think it's pretty messy. one game I play I got A with rammus with 14/3/16. That's just one example out of 100. But the point of this discussion is what are the requirements to get a S grade? Is it the average score that gives you a average grade, or is it maybe how good you farmed. What are the most important, kills or assists? Does it matter if you play annie mid or if you play annie support? Thanks for all answers even if it just clears up one question :)
Report as:
Offensive Spam Harassment Incorrect Board