How could Cornelius the centurian's prayers ascend to heaven as a memorial since he was not saved?

Is there a difference between what is implied in Acts 10:4, 22, 31 and what is taught in Romans 3:10 -12?

Romans 3:10-12 and the wider context state categorlcally that all, without exception, born of human parents are unrighteous. This must of necessity include Cornelius. The words, "Peter... shall tell thee words, whereby thou and all thy house shall be saved" (Acts 11: 14), and subsequent verses clearly teach that prior to Peter's visit all who heard him preach were in their sins. Until all who heard Peter actually believed the message and received the Holy Spirit, none in Cornelius' house were saved.

How then are we to understand how Cornelius' alms and prayers "went up for a memorial before God" even though he wasn't vet saved? Consider the saints of the Old Testament. Their piety and righteousness were not a prerequisite to God's favor, but rather a response to God's dealings. Consider Cornelius in this context: his good works are not a result of being intrinsically good, but a response to what he had learned of God. He was responding to light from God. God then reveals to Cornelius further truth by sending Peter to preach. Again, Cornelius receives God's message. We must conclude that Cornelius is not good in himself, just as Romans 3:10-12 teaches, but is reckoned righteous as a result of his response to the gospel Peter preached.

S. Wells