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 17, 2026 13:07Tomislav TunkovicTomislav TunkovicError
Source Code

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

Challenge History
DateChallengerCostTypeStatus
Sep 7, 2026 17:43C#_user10.00CustomSolution Broken
Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Sep 7, 2026 17:44021,503,0458,781,0001,235,00045,056No answer to stdout. Died or killed?
2Aug 17, 2026 13:122,09831,556,22421,994,0001,093,00028,672
3Aug 17, 2026 13:122,10532,256,12422,033,0001,127,00028,672
4Aug 17, 2026 13:122,11432,401,24322,128,0001,128,00028,672
5Aug 17, 2026 13:122,11531,614,07122,160,0001,113,00028,672
6Aug 17, 2026 13:122,12438,393,52322,239,0001,133,00028,672
7Aug 17, 2026 13:122,12738,754,65922,257,0001,150,00028,672
8Aug 17, 2026 13:122,15541,640,73022,664,0001,043,00028,672
9Aug 17, 2026 13:122,15835,566,66222,698,0001,045,00028,672
10Aug 17, 2026 13:122,21741,997,54723,190,0001,202,00028,672