There is no contradiction whatsoever. One only needs to look at the Hebrew and Greek words used and understand that context is important. The words mean "just", "impartial", or "righteous". The righteousness of Christ is obviously inclusive of all of those. When an man is called righteous one needs to take context into consideration.
When Paul says "there is no one righteous he wouldn't have meant there is no one who is just. Certainly there were just men. When we are required to be "righteous before God" it would mean much more then just being just or impartial.
For salvation we need the perfect righteousness of Christ and that is imparted to us by faith in His perfect sacrifice for our sins and our faith in Him alone.
In your examples of Matthew 13:49 and Matthew 25:37 those were believers who had been covered with the righteousness of Christ.
"as it is written: 'None is righteous [Greek: "Dikaios"], no, not one'" (Romans 3:10, citing Psalm 14 and similar Scriptures)The Greek word is identical (only the case ending of the word changed a bit, as it's used in different parts of speech). That handles the "Greek words" part of your response; now, could you explain to me how "context" helps your case, here? Especially since I've seem people use the word "context" as a sort of "magical incantation" to mean "my opinion is right, and yours is wrong, and you'd know that if only you had eyes to see!" (which is a garden-variety "special pleading" fallacy).
compared to the following:
"Truly, I say to you, many prophets and righteous [Greek: "Dikaioi"] men longed to see what you see, and did not see it, and to hear what you hear, and did not hear it."
(Matthew 13:17)
"The angels will come out and separate the evil from the righteous [Greek: "Dikaion"]..."
(Matthew 13:49)
"Then the righteous [Greek: "Dikaioi"] will answer him, `Lord, when did we see thee hungry and feed thee [...]?"
(Matthew 25:37)
"Now there was a man named Joseph from the Jewish town of Arimathe'a. He was a member of the council, a good and righteous [Greek: "Dikaios"] man,"
(Luke 23:50)