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:16Tomislav 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,386,8656,713,0001,031,00028,672No answer to stdout. Died or killed?stderr
2Aug 15, 2026 09:202,52136,127,42726,426,0001,315,0002,121,728stderr
3Aug 15, 2026 09:202,52536,179,33426,467,0001,313,0002,121,728stderr
4Aug 15, 2026 09:202,53936,378,11526,621,0001,314,0002,121,728stderr
5Aug 15, 2026 09:202,54236,406,47926,655,0001,316,0002,121,728stderr
6Aug 15, 2026 09:202,54336,425,50626,920,0001,055,0002,121,728stderr
7Aug 15, 2026 09:202,54636,408,63726,705,0001,304,0002,121,728stderr
8Aug 15, 2026 09:202,54636,495,73726,699,0001,313,0002,121,728stderr
9Aug 15, 2026 09:202,55936,582,13227,125,0001,030,0002,121,728stderr
10Aug 15, 2026 09:202,64437,531,29327,759,0001,335,0002,121,728stderr