Submission #4062103


Source Code Expand

import numpy as np
n, y = np.array(list(input().split()), dtype=int)

vals = np.array([10000, 5000, 1000])

table = []
for c in range(n + 1):
    part = np.zeros((n + 1 - c, 3), dtype=int)
    part[:, 0] = c
    part[:, 1] = np.arange(n + 1 - c)
    table += [part]
table = np.concatenate(table)
table[:, 2] = n - table[:, 0:2].sum(axis=1)

accum = (table * vals).sum(axis=1)
flags = np.where(accum == y)[0]

if len(flags) == 0:
    print("-1 -1 -1")
else:
    nums = table[flags[0]]
    print("{} {} {}".format(*nums))

Submission Info

Submission Time
Task C - Otoshidama
User Silverion
Language Python (3.4.3)
Score 300
Code Size 540 Byte
Status AC
Exec Time 335 ms
Memory 152616 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 300 / 300
Status
AC × 4
AC × 24
Set Name Test Cases
Sample a01, a02, a03, a04
All a01, a02, a03, a04, b05, b06, b07, b08, b09, b10, b11, b12, b13, b14, b15, b16, b17, b18, b19, b20, b21, b22, b23, b24
Case Name Status Exec Time Memory
a01 AC 164 ms 12376 KB
a02 AC 151 ms 12504 KB
a03 AC 208 ms 47784 KB
a04 AC 328 ms 122284 KB
b05 AC 152 ms 12452 KB
b06 AC 152 ms 12504 KB
b07 AC 150 ms 12452 KB
b08 AC 330 ms 122284 KB
b09 AC 330 ms 122184 KB
b10 AC 328 ms 122280 KB
b11 AC 330 ms 122152 KB
b12 AC 335 ms 152616 KB
b13 AC 313 ms 112840 KB
b14 AC 322 ms 118056 KB
b15 AC 325 ms 120392 KB
b16 AC 316 ms 113480 KB
b17 AC 320 ms 115496 KB
b18 AC 153 ms 12376 KB
b19 AC 154 ms 13224 KB
b20 AC 326 ms 119720 KB
b21 AC 327 ms 121256 KB
b22 AC 319 ms 116392 KB
b23 AC 321 ms 117960 KB
b24 AC 326 ms 142008 KB