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 8, 2026 06:27 | C#_user | 10.00 | Custom | Solution Broken |
Run Statistics
| # | Date | Score | Wall Time | CPU User | CPU System | Memory | Error | |
|---|---|---|---|---|---|---|---|---|
| 1 | Sep 8, 2026 06:31 | 0 | 60,060,148,292 | 60,003,739,000 | 40,023,000 | 40,960 | Killed by timeout | |
| 2 | May 22, 2021 17:44 | 6,198 | 94,307,064 | 65,173,000 | 3,008,000 | 2,334,720 | ||
| 3 | May 22, 2021 17:25 | 6,200 | 91,636,035 | 66,199,000 | 2,006,000 | 2,334,720 | ||
| 4 | May 22, 2021 17:25 | 6,201 | 87,172,792 | 66,210,000 | 2,006,000 | 2,334,720 | ||
| 5 | May 22, 2021 22:36 | 6,215 | 92,757,963 | 66,360,000 | 2,010,000 | 2,527,232 | ||
| 6 | May 22, 2021 17:25 | 6,221 | 92,878,435 | 66,422,000 | 2,012,000 | 2,531,328 | ||
| 7 | May 22, 2021 17:44 | 6,221 | 91,704,783 | 66,422,000 | 2,012,000 | 2,334,720 | ||
| 8 | May 22, 2021 17:44 | 6,225 | 129,401,005 | 68,474,877 | 0 | 2,199,552 | ||
| 9 | May 22, 2021 22:36 | 6,225 | 90,954,663 | 67,464,000 | 1,006,000 | 2,334,720 | ||
| 10 | May 22, 2021 22:36 | 6,226 | 88,659,987 | 67,478,000 | 1,007,000 | 2,523,136 | ||
| 11 | May 22, 2021 17:44 | 6,226 | 91,035,124 | 67,477,000 | 1,007,000 | 2,334,720 | ||
| 12 | May 22, 2021 17:25 | 6,227 | 89,935,429 | 66,487,000 | 2,014,000 | 2,531,328 | ||
| 13 | May 22, 2021 17:44 | 6,236 | 92,345,344 | 67,585,000 | 1,008,000 | 2,338,816 | ||
| 14 | May 22, 2021 17:25 | 6,237 | 98,194,730 | 67,598,000 | 1,008,000 | 2,535,424 | ||
| 15 | May 22, 2021 17:25 | 6,241 | 99,210,102 | 67,643,000 | 1,009,000 | 2,334,720 | ||
| 16 | May 22, 2021 22:36 | 6,243 | 131,313,070 | 68,676,200 | 0 | 2,191,360 | ||
| 17 | May 22, 2021 22:36 | 6,243 | 98,002,985 | 67,666,000 | 1,009,000 | 2,531,328 | ||
| 18 | May 22, 2021 22:36 | 6,243 | 96,408,669 | 66,659,000 | 2,019,000 | 2,531,328 | ||
| 19 | May 22, 2021 17:44 | 6,244 | 93,885,064 | 67,677,000 | 1,010,000 | 2,531,328 | ||
| 20 | May 22, 2021 17:44 | 6,245 | 100,069,771 | 66,679,000 | 2,020,000 | 2,334,720 | ||
| 21 | May 22, 2021 17:44 | 6,245 | 94,942,262 | 67,687,000 | 1,010,000 | 2,334,720 | ||
| 22 | May 22, 2021 17:25 | 6,246 | 93,364,383 | 66,688,000 | 2,020,000 | 2,334,720 | ||
| 23 | May 22, 2021 17:25 | 6,247 | 137,702,780 | 68,718,766 | 0 | 2,187,264 | ||
| 24 | May 22, 2021 17:25 | 6,249 | 123,924,794 | 68,743,660 | 0 | 2,191,360 | ||
| 25 | May 22, 2021 22:36 | 6,252 | 126,402,522 | 68,766,517 | 0 | 2,195,456 | ||
| 26 | May 22, 2021 22:36 | 6,255 | 95,511,099 | 66,806,000 | 1,994,000 | 2,334,720 | ||
| 27 | May 22, 2021 22:36 | 6,256 | 94,570,637 | 66,823,000 | 1,994,000 | 2,334,720 | ||
| 28 | May 22, 2021 17:25 | 6,257 | 97,270,065 | 65,830,000 | 2,992,000 | 2,355,200 | ||
| 29 | May 22, 2021 22:36 | 6,258 | 95,384,721 | 65,846,000 | 2,993,000 | 2,531,328 | ||
| 30 | May 22, 2021 17:44 | 6,259 | 94,951,673 | 66,856,000 | 1,995,000 | 2,531,328 | ||
| 31 | May 22, 2021 17:25 | 6,260 | 98,912,617 | 67,867,000 | 998,000 | 2,523,136 | ||
| 32 | May 22, 2021 22:36 | 6,261 | 95,819,575 | 66,873,000 | 1,996,000 | 2,334,720 | ||
| 33 | May 22, 2021 17:44 | 6,262 | 94,858,598 | 68,879,000 | 0 | 2,334,720 | ||
| 34 | May 22, 2021 17:44 | 6,262 | 125,247,900 | 68,883,392 | 0 | 2,195,456 | ||
| 35 | May 22, 2021 17:44 | 6,264 | 133,981,269 | 68,904,676 | 0 | 2,199,552 | ||
| 36 | May 22, 2021 17:25 | 6,269 | 127,967,820 | 68,961,886 | 0 | 2,179,072 | ||
| 37 | May 22, 2021 22:36 | 6,270 | 122,370,389 | 68,974,317 | 0 | 2,183,168 |