Parse JSON Sergey Svistunov

Compute the total amount of non-canceled external USD transactions from a stream of JSON records as fast as possible.

Input: 1 000 000 JSON records on STDIN, one per line. Each record has the following structure:

{
    "user_id": 0,
    "currency": "USD",
    "transactions": [
        {
            "amount": 0,
            "to_user_id": 0,
            "canceled": false
        }
    ]
}
Field Constraints
user_id Integer, max 10 000
currency One of "GBP", "USD", "RUB", "JPY", "CHF"
transactions Array, max 10 elements
amount Integer, max 1000
canceled Boolean; may be omitted when false

Field order is not guaranteed within any object.

Output: The total amount of all transactions where:

  • record.currency == "USD"
  • transaction.to_user_id != record.user_id (external)
  • transaction.canceled is false or absent
Back to listAug 16, 2026 23:10Tomislav TunkovicTomislav TunkovicError
Source Code

Source code access is restricted. Log in to request access.

Challenge History
DateChallengerCostTypeStatus
Sep 7, 2026 17:46C#_user10.00CustomSolution Broken
Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Sep 7, 2026 17:47017,988,8447,775,000016,384No answer to stdout. Died or killed?
2Aug 17, 2026 03:362,21834,055,37724,408,000020,480
3Aug 17, 2026 03:362,22032,551,85924,424,000020,480
4Aug 17, 2026 03:362,22032,533,11824,423,000020,480
5Aug 17, 2026 03:362,22532,562,83424,476,000020,480
6Aug 17, 2026 03:362,22832,693,17924,514,000020,480
7Aug 17, 2026 03:362,23632,818,93224,596,000020,480
8Aug 17, 2026 03:362,23632,735,31124,606,000020,480
9Aug 17, 2026 03:362,25033,146,67924,753,000020,480
10Aug 17, 2026 03:362,27633,158,36725,040,000020,480