QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#662054#7747. MemoryudiandianisTL 71ms11408kbPython3338b2024-10-20 20:21:072024-10-20 20:21:08

Judging History

你现在查看的是最新测评结果

  • [2024-10-20 20:21:08]
  • 评测
  • 测评结果:TL
  • 用时:71ms
  • 内存:11408kb
  • [2024-10-20 20:21:07]
  • 提交

answer

from decimal import *
getcontext().prec = int(1e5)

n = int(input())
a = list(map(Decimal, input().split()))
t = Decimal('0')
for i in a:
    t += i
    if t > Decimal('0'):
        print('+', end = '')
    elif t == Decimal('0'):
        print('0', end = '')
    else:
        print('-', end = '')
    t /= Decimal('2')


Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 15ms
memory: 11144kb

input:

10
2 -1 4 -7 4 -8 3 -6 4 -7

output:

+0+-+---+-

result:

ok single line: '+0+-+---+-'

Test #2:

score: 0
Accepted
time: 12ms
memory: 11116kb

input:

10
-1 36 18 18 18 18 18 18 18 -18

output:

-++++++++-

result:

ok single line: '-++++++++-'

Test #3:

score: 0
Accepted
time: 71ms
memory: 11408kb

input:

1000
-1 193552 96776 96776 96776 96776 96776 96776 96776 96776 96776 96776 96776 96776 96776 96776 96776 96776 96776 96776 96776 96776 96776 96776 96776 96776 96776 96776 96776 96776 96776 96776 96776 96776 96776 96776 96776 96776 96776 96776 96776 96776 96776 96776 96776 96776 96776 96776 96776 967...

output:

-+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++...

result:

ok single line: '-+++++++++++++++++++++++++++++...++++++++++++++++++++++++++++++-'

Test #4:

score: -100
Time Limit Exceeded

input:

100000
-1 696082628 348041314 348041314 348041314 348041314 348041314 348041314 348041314 348041314 348041314 348041314 348041314 348041314 348041314 348041314 348041314 348041314 348041314 348041314 348041314 348041314 348041314 348041314 348041314 348041314 348041314 348041314 348041314 348041314 ...

output:

-+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++...

result: