Parse JSON 
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.canceledisfalseor absent
Source Code
Source code access is restricted. Log in to request access.
Challenge History
| Date | Challenger | Cost | Type | Status |
|---|---|---|---|---|
| Sep 7, 2026 16:34 | C#_user | 27.50 | Custom | Solution Broken |
Run Statistics
| # | Date | Score | Wall Time | CPU User | CPU System | Memory | Error | |
|---|---|---|---|---|---|---|---|---|
| 1 | Sep 7, 2026 16:34 | 0 | 11,170,797 | 1,416,000 | 0 | 28,672 | Exit with code 101: thread 'main' panicked at 'internal error: entered unreachable code', main.rs:245:14 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace | stderr |
| 2 | May 8, 2021 21:12 | 10,165 | 138,900,289 | 78,576,000 | 33,243,000 | 2,289,664 | ||
| 3 | May 8, 2021 21:11 | 10,167 | 142,032,465 | 78,886,000 | 32,952,000 | 2,289,664 | ||
| 4 | May 8, 2021 21:12 | 10,169 | 141,717,610 | 77,901,000 | 33,956,000 | 2,281,472 | ||
| 5 | May 8, 2021 21:13 | 10,171 | 137,456,752 | 83,911,000 | 27,970,000 | 2,289,664 | ||
| 6 | May 8, 2021 21:13 | 10,171 | 136,858,032 | 80,913,000 | 30,966,000 | 2,289,664 | ||
| 7 | May 8, 2021 21:12 | 10,178 | 138,203,636 | 81,972,000 | 29,989,000 | 2,367,488 | ||
| 8 | May 8, 2021 21:11 | 10,180 | 135,078,714 | 80,984,000 | 30,994,000 | 2,289,664 | ||
| 9 | May 8, 2021 21:13 | 10,180 | 137,551,363 | 84,986,000 | 26,995,000 | 2,375,680 | ||
| 10 | May 8, 2021 21:11 | 10,185 | 136,588,698 | 80,027,000 | 32,010,000 | 2,289,664 | ||
| 11 | May 8, 2021 21:11 | 10,186 | 137,133,558 | 84,037,000 | 28,012,000 | 2,289,664 | ||
| 12 | May 8, 2021 21:12 | 10,187 | 134,709,569 | 84,042,000 | 28,014,000 | 2,289,664 | ||
| 13 | May 8, 2021 21:11 | 10,188 | 134,675,907 | 82,050,000 | 30,018,000 | 2,289,664 | ||
| 14 | May 8, 2021 21:11 | 10,193 | 133,328,075 | 84,092,000 | 28,030,000 | 2,289,664 | ||
| 15 | May 8, 2021 21:13 | 10,193 | 132,909,783 | 81,088,000 | 31,033,000 | 2,289,664 | ||
| 16 | May 8, 2021 21:11 | 10,194 | 134,840,559 | 83,098,000 | 29,034,000 | 2,379,776 | ||
| 17 | May 8, 2021 21:11 | 10,194 | 136,370,311 | 83,102,000 | 29,035,000 | 2,387,968 | ||
| 18 | May 8, 2021 21:11 | 10,195 | 134,445,727 | 80,107,000 | 32,042,000 | 2,289,664 | ||
| 19 | May 8, 2021 21:12 | 10,203 | 134,680,162 | 83,174,000 | 29,060,000 | 2,289,664 | ||
| 20 | May 8, 2021 21:13 | 10,204 | 135,391,061 | 80,178,000 | 32,071,000 | 2,289,664 | ||
| 21 | May 8, 2021 21:11 | 10,206 | 131,505,236 | 84,201,000 | 28,067,000 | 2,363,392 | ||
| 22 | May 8, 2021 21:11 | 10,207 | 132,851,023 | 84,209,000 | 28,069,000 | 2,371,584 | ||
| 23 | May 8, 2021 21:13 | 10,207 | 134,671,179 | 85,212,000 | 27,067,000 | 2,371,584 | ||
| 24 | May 8, 2021 21:12 | 10,209 | 140,033,501 | 80,217,000 | 32,087,000 | 2,289,664 | ||
| 25 | May 8, 2021 21:11 | 10,209 | 139,362,298 | 79,214,000 | 33,089,000 | 2,371,584 | ||
| 26 | May 8, 2021 21:11 | 10,209 | 134,843,883 | 80,212,000 | 32,085,000 | 2,371,584 | ||
| 27 | May 8, 2021 21:13 | 10,216 | 137,194,700 | 85,284,000 | 27,090,000 | 2,289,664 | ||
| 28 | May 8, 2021 21:12 | 10,218 | 140,717,992 | 85,300,000 | 27,095,000 | 2,289,664 | ||
| 29 | May 8, 2021 21:11 | 10,218 | 132,663,318 | 82,292,000 | 30,107,000 | 2,289,664 | ||
| 30 | May 8, 2021 21:12 | 10,219 | 134,203,112 | 82,296,000 | 30,108,000 | 2,375,680 | ||
| 31 | May 8, 2021 21:13 | 10,220 | 137,310,281 | 80,299,000 | 32,119,000 | 2,367,488 | ||
| 32 | May 8, 2021 21:13 | 10,221 | 135,455,311 | 86,335,000 | 26,101,000 | 2,465,792 | ||
| 33 | May 8, 2021 21:11 | 10,227 | 133,310,967 | 80,358,000 | 32,143,000 | 2,289,664 | ||
| 34 | May 8, 2021 21:12 | 10,232 | 139,810,460 | 84,418,000 | 28,139,000 | 2,289,664 | ||
| 35 | May 8, 2021 21:11 | 10,234 | 141,834,017 | 81,413,000 | 31,158,000 | 2,281,472 | ||
| 36 | May 8, 2021 21:11 | 10,239 | 140,602,422 | 81,456,000 | 31,174,000 | 2,289,664 | ||
| 37 | May 8, 2021 21:11 | 10,256 | 137,865,529 | 84,864,000 | 27,955,000 | 2,281,472 |