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 15, 2026 09:24Tomislav TunkovicTomislav TunkovicError
Source Code

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

Challenge History
DateChallengerCostTypeStatus
Sep 7, 2026 17:48C#_user10.00CustomSolution Broken
Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Sep 7, 2026 17:48016,376,1446,736,0001,033,00028,672No answer to stdout. Died or killed?stderr
2Aug 15, 2026 09:252,52736,274,33526,491,0001,315,0002,121,728stderr
3Aug 15, 2026 09:252,53236,271,51626,544,0001,314,0002,121,728stderr
4Aug 15, 2026 09:252,53236,292,53226,557,0001,303,0002,121,728stderr
5Aug 15, 2026 09:252,53436,345,38526,820,0001,054,0002,121,728stderr
6Aug 15, 2026 09:252,53936,415,42126,627,0001,312,0002,121,728stderr
7Aug 15, 2026 09:252,54136,452,99126,643,0001,316,0002,121,728stderr
8Aug 15, 2026 09:252,58436,881,62527,123,0001,305,0002,121,728stderr
9Aug 15, 2026 09:252,62937,362,70727,602,0001,323,0002,121,728stderr
10Aug 15, 2026 09:252,66837,759,65828,006,0001,343,0002,121,728stderr