QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#662059#7747. MemoryudiandianisWA 927ms30540kbPython3338b2024-10-20 20:22:142024-10-20 20:22:23

Judging History

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

  • [2024-10-20 20:22:23]
  • 评测
  • 测评结果:WA
  • 用时:927ms
  • 内存:30540kb
  • [2024-10-20 20:22:14]
  • 提交

answer

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

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')


详细

Test #1:

score: 100
Accepted
time: 11ms
memory: 10968kb

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: 14ms
memory: 11036kb

input:

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

output:

-++++++++-

result:

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

Test #3:

score: 0
Accepted
time: 20ms
memory: 11320kb

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
Wrong Answer
time: 927ms
memory: 30540kb

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:

wrong answer 1st lines differ - expected: '-+++++++++++++++++++++++++++++...++++++++++++++++++++++++++++++-', found: '-+++++++++++++++++++++++++++++...++++++++++++++++++++++++++++++0'