QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#876042#7695. Double UpLaVuna47#WA 471ms9856kbPython3452b2025-01-30 16:28:432025-01-30 16:28:43

Judging History

This is the latest submission verdict.

  • [2025-01-30 16:28:43]
  • Judged
  • Verdict: WA
  • Time: 471ms
  • Memory: 9856kb
  • [2025-01-30 16:28:43]
  • Submitted

answer

n=int(input())
a=list(map(int, input().split()))

while(len(a) > 1):
	rem=False
	na=[]
	for i in range(0,len(a)):
		if(i+1<len(a) and a[i]==a[i+1]):
			na.append(2*a[i])
			++i
			rem=True
		else:
			na.append(a[i])
	if(rem):
		a=na
	else:
		na=[]
		min_el_ind=0
		for i in range(1,len(a)):
			if(a[i]<a[min_el_ind]):
				min_el_ind=i
		for i in range(0,len(a)):
			if(i != min_el_ind):
				na.append(a[i])
		a=na
print(a[0])

詳細信息

Test #1:

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

input:

5
4 2 2 1 8

output:

16

result:

ok single line: '16'

Test #2:

score: -100
Wrong Answer
time: 471ms
memory: 9856kb

input:

1000
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...

output:

5357543035931336604742125245300009052807024058527668037218751941851755255624680612465991894078479290637973364587765734125935726428461570217992288787349287401967283887412115492710537302531185570938977091076523237491790970633699383779582771973038531457285598238843271083830214915826312193418602834034688

result:

wrong answer 1st lines differ - expected: '512', found: '535754303593133660474212524530...0214915826312193418602834034688'