QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#285710#2627. Intercastellarpaul200825 31ms7044kbC++23484b2023-12-16 21:37:552023-12-16 21:37:55

Judging History

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

  • [2023-12-16 21:37:55]
  • 评测
  • 测评结果:25
  • 用时:31ms
  • 内存:7044kb
  • [2023-12-16 21:37:55]
  • 提交

answer

#include <bits/stdc++.h>
using namespace std;

const int N=2e5+5;

long long a[N],x[N];

int main()
{
	int n;
	cin >> n;
	for(int i=1;i<=n;i++)
		scanf("%lld",&a[i]);

	int q;
	cin >> q;
	for(int i=1;i<=q;i++)
		scanf("%lld",&x[i]);

	int sum=0,cur=1;
	for(int i=1;i<=n;i++)
	{
		int sz=1;
		while(a[i]%2==0)
		{
			sz *= 2;
			a[i] /= 2;
		}

		sum += sz;
		while(cur<=q && x[cur]<=sum)
		{
			printf("%lld\n",a[i]);
			cur++;
		}
	}
	return 0;
}

詳細信息

Subtask #1:

score: 25
Accepted

Test #1:

score: 25
Accepted
time: 1ms
memory: 5928kb

input:

1
1
1
1

output:

1

result:

ok single line: '1'

Test #2:

score: 0
Accepted
time: 0ms
memory: 3924kb

input:

1
6
1
1

output:

3

result:

ok single line: '3'

Test #3:

score: 0
Accepted
time: 14ms
memory: 6208kb

input:

192149
8
1
6
5
3
1
1
7
2
2
5
8
8
6
8
1
6
5
8
1
7
5
2
5
3
8
8
6
6
8
7
7
5
7
1
7
4
2
7
8
6
2
6
7
2
6
5
1
4
4
6
1
7
4
3
2
8
3
6
1
3
3
6
2
6
6
1
3
6
3
3
4
4
4
2
3
7
1
2
1
8
1
6
8
8
2
2
4
4
3
4
8
3
7
5
6
2
3
6
6
3
8
1
1
4
5
8
1
2
6
6
4
6
8
6
8
8
7
5
3
5
2
8
6
7
7
5
8
1
2
8
8
4
2
1
2
6
3
7
2
5
2
8
3
6
2
7...

output:

1
3
5
1
1
1
1
1
7
1
3
3
1
3
1
1
3
1
3
1
1
1
5
5
1
1
1
3
1
7
3
5
3
1
1
3
3
7
1
3
3
1
1
5
3
5
1
1
1
3
7
5
7
1
1
3
1
3
3
1
3
7
3
1
1
3
1
1
1
3
1
1
7
3
3
7
3
1
1
1
3
3
5
1
1
7
5
7
7
7
1
3
1
1
1
7
1
1
3
3
3
3
1
3
1
1
1
3
3
1
1
1
1
5
1
1
7
1
1
3
7
7
1
1
1
7
7
7
3
3
3
3
3
5
3
1
1
3
5
1
3
1
3
7
7
1
3
3
3
1
...

result:

ok 37369 lines

Test #4:

score: 0
Accepted
time: 17ms
memory: 5308kb

input:

47998
4
4
7
3
6
1
8
2
1
5
1
4
8
3
7
1
4
7
4
6
7
6
1
7
2
7
4
5
1
8
6
7
3
5
6
8
8
8
5
3
4
8
1
5
1
5
3
5
1
3
2
7
2
2
4
4
2
4
3
7
3
1
5
2
5
2
8
2
4
5
2
8
5
1
3
1
3
2
8
5
3
6
8
2
5
8
2
3
6
6
4
7
5
2
5
1
2
4
4
1
7
6
2
8
7
3
3
1
8
1
6
6
3
7
6
2
7
5
8
3
4
8
4
7
7
8
5
8
7
3
7
6
7
4
5
2
8
3
3
3
1
8
5
4
1
1
1
...

output:

1
1
1
1
1
1
1
1
1
1
1
7
7
7
7
7
7
3
3
3
3
3
3
1
1
1
1
1
1
1
1
1
1
1
1
5
1
1
1
1
1
1
1
1
1
3
3
3
3
3
7
7
7
1
1
1
1
1
1
1
7
7
1
1
1
1
3
3
3
3
3
3
3
7
7
7
7
3
3
1
7
7
7
7
1
1
1
1
1
7
7
7
7
7
1
1
1
5
5
5
5
1
1
1
1
1
1
1
1
1
1
1
3
7
7
7
7
7
3
3
5
5
5
3
3
3
3
3
3
3
1
1
1
1
1
1
1
1
1
5
3
3
3
1
1
1
1
1
1
1
...

result:

ok 152264 lines

Test #5:

score: 0
Accepted
time: 31ms
memory: 6864kb

input:

200000
1
5
5
3
5
8
4
4
7
3
3
2
1
1
7
8
6
7
6
3
8
1
2
7
5
1
3
6
1
3
6
8
5
6
4
3
1
8
3
5
3
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5
1
1
3
3
3
1
1
1
3
3
1
1
1
1
5
1
3
1
3
3
3
1
1
5
1
1
1
1
1
1
1
1
1
3
1
1
1
1
1
1
1
1
1
1
1
1
1
1
3
1
3
1
1
1
1
1
1
3
5
3
1
1
7
7
3
1
1
1
1
1
...

result:

ok 95402 lines

Test #7:

score: 0
Accepted
time: 27ms
memory: 6888kb

input:

200000
6
4
3
6
1
6
4
4
8
5
8
3
5
4
8
1
8
4
6
8
8
1
2
6
4
7
5
4
8
2
6
7
4
8
8
2
4
8
4
4
8
1
8
8
8
1
4
3
4
6
5
6
3
2
8
7
8
2
8
4
4
2
8
2
4
5
4
6
8
3
8
6
6
2
4
4
4
4
1
8
1
6
3
4
2
4
2
6
1
3
8
4
4
8
4
2
4
1
7
6
4
4
5
4
8
8
4
3
4
6
4
6
3
5
6
4
2
8
6
8
4
8
7
6
7
3
4
2
2
4
8
8
6
3
4
2
4
4
4
6
4
1
7
8
1
2
2...

output:

3
1
3
3
3
3
3
1
1
5
5
3
5
5
1
1
1
1
1
1
1
1
1
1
1
1
1
3
3
7
7
5
5
1
1
1
3
7
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
3
3
3
3
1
1
1
1
1
5
1
3
3
1
1
1
1
1
1
1
1
1
1
1
1
1
3
1
1
3
3
3
3
1
1
1
1
1
1
1
1
1
1
3
1
1
1
5
1
3
3
3
3
1
3
3
3
5
3
3
1
1
1
1
1
1
3
3
3
3
1
1
1
1
7
7
7
1
1
1
1
3
3
3
1
1
1
1
1
1
1
1
3
3
3
1
3
...

result:

ok 200000 lines

Test #8:

score: 0
Accepted
time: 30ms
memory: 7044kb

input:

200000
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8...

output:

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
1
1
...

result:

ok 200000 lines

Subtask #2:

score: 0
Wrong Answer

Test #9:

score: 35
Accepted
time: 1ms
memory: 5784kb

input:

1
1
1
1

output:

1

result:

ok single line: '1'

Test #10:

score: 0
Accepted
time: 0ms
memory: 3924kb

input:

1
6
1
1

output:

3

result:

ok single line: '3'

Test #11:

score: 0
Accepted
time: 0ms
memory: 3840kb

input:

1
536870912
1
1

output:

1

result:

ok single line: '1'

Test #12:

score: 0
Accepted
time: 1ms
memory: 5928kb

input:

1
805306368
1
1

output:

3

result:

ok single line: '3'

Test #13:

score: 0
Accepted
time: 0ms
memory: 3736kb

input:

1
999999999
1
1

output:

999999999

result:

ok single line: '999999999'

Test #14:

score: 0
Accepted
time: 1ms
memory: 5936kb

input:

500
914512501
350865937
625540101
505206780
218037675
563675478
308821453
187441051
67676364
940338309
220976749
110946802
533291356
273888882
812478300
331886237
111406259
716251160
792208800
982104502
701931051
901049985
982329662
109349976
815608090
879767861
878144967
243417504
677418611
4731181...

output:

914512501
914512501
914512501
914512501
350865937
126301695
308821453
187441051
187441051
16919091
940338309
220976749
220976749
220976749
133322839
136944441
111406259
111406259
24756525
491052251
701931051
701931051
701931051
491164831
878144967
677418611
677418611
677418611
214402029
214402029
55...

result:

ok 332 lines

Test #15:

score: 0
Accepted
time: 0ms
memory: 3892kb

input:

720
433955792
825119375
850102397
196995413
105642360
393131787
405371462
786379650
82328491
928471151
121946249
527566503
876637905
103697742
105543077
50408761
547967610
26892138
271101909
772691849
560184908
548016601
274624752
209101543
409572339
461216864
43218036
642518886
927443559
256023379
...

output:

27122237
82328491
928471151
50408761
13446069
271101909
409572339
961938765
803523721
66108913
176544153
177617813
725891195
226726397
464932269
416209755
452496981
24908085
5713465
5713465
81891007
81891007
562983219
387031507
540595131
59559413
645427319
327969519
346238585
14547659
37464731
43372...

result:

ok 151 lines

Test #16:

score: 0
Accepted
time: 1ms
memory: 5912kb

input:

1000
989239125
646470044
144672895
864176665
504788657
613211270
623879021
649473641
710521084
710253145
376033154
675127031
470625904
229212465
300065924
199956651
612252087
568260418
409895546
447429426
400846905
405204965
107241285
339494999
360840621
943490412
741263815
125507791
128148607
41627...

output:

989239125
989239125
144672895
144672895
864176665
864176665
864176665
504788657
306605635
306605635
623879021
177630271
710253145
675127031
229212465
75016481
204947773
223714713
223714713
400846905
400846905
107241285
416275485
485999529
485999529
577924593
138745117
138745117
208304729
244350579
1...

result:

ok 1000 lines

Test #17:

score: -35
Wrong Answer
time: 0ms
memory: 3884kb

input:

66
5275648
743538116
521041920
433188352
536870912
19978594
251658240
258588672
473956352
911490552
653864500
373644936
872415232
59179008
600702976
606930944
335544320
163577856
750446191
263461248
76658688
837419008
985661440
127597445
620756992
150630434
920584192
704643072
723643904
934312776
70...

output:

161
161
161
161
161
161
161
161
161
185884529
185884529
185884529
185884529
254415
254415
254415
254415
846071
846071
846071
846071
846071
846071
846071
846071
846071
846071
1
1
1
1
1
1
1
9989297
9989297
9989297
9989297
9989297
9989297
9989297
9989297
9989297
9989297
15
15
15
15
15783
15783
15783
15...

result:

wrong answer 219th lines differ - expected: '1', found: ''

Subtask #3:

score: 0
Skipped

Dependency #1:

100%
Accepted

Dependency #2:

0%