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 17:20Tomislav 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:43022,073,8958,829,0001,223,00024,576No answer to stdout. Died or killed?
2Aug 17, 2026 18:152,09831,481,70522,015,0001,070,00028,672
3Aug 17, 2026 18:152,10031,495,62722,039,0001,069,00028,672
4Aug 17, 2026 18:152,10231,483,47122,029,0001,103,00028,672
5Aug 17, 2026 18:152,10431,517,64422,065,0001,085,00028,672
6Aug 17, 2026 18:152,10831,504,77022,063,0001,129,00028,672
7Aug 17, 2026 18:152,11031,617,56422,124,0001,089,00028,672
8Aug 17, 2026 18:152,12431,764,75022,231,0001,138,00028,672
9Aug 17, 2026 18:152,14832,006,65822,547,0001,089,00028,672
10Aug 17, 2026 18:152,20041,677,99822,955,0001,249,00028,672