QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#24440#3507. Broken Device 2Qingyu10 36ms4152kbC++20907b2022-03-30 20:09:282023-09-14 02:27:12

Judging History

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

  • [2023-09-14 02:27:12]
  • 管理员手动重测本题所有提交记录
  • 测评结果:10
  • 用时:36ms
  • 内存:4152kb
  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2023-01-22 10:33:22]
  • 评测
  • 测评结果:10
  • 用时:43ms
  • 内存:3872kb
  • [2022-03-30 20:09:28]
  • 提交

Anna

#include "Anna.h"
#include <bits/stdc++.h>

namespace {

int variable_example = 0;

auto valToVector(int64_t x) {
	for (int len = 0; ; ++len) {
		if (x > 2 * len) x -= 2 * len + 1;
		else {
			std::vector<int> a(len), b(len);
			int part_a = std::min(len, (int)x);
			int part_b = x - part_a;
			for (int j = 0; j < part_a; ++j)
				a[j] = 1;
			for (int j = 0; j < part_b; ++j)
				b[j] = 1;
			return std::make_pair(a, b);
		}
	}
	throw;
}



}

int Declare() {
  return 2000;
}


std::pair<std::vector<int>, std::vector<int> > Anna(long long A) {
	auto [X, Y] = valToVector(A);
	return std::make_pair(X, Y);
}

Bruno

#include "Bruno.h"
#include <bits/stdc++.h>

namespace {

int variable_example = 0;

}

long long Bruno(std::vector<int> u) {
	int len = u.size() / 2;
	int ones = 0;
	for (int x : u)
		ones += x;
	int64_t ans = 0;
	for (int i = 0; i < len; ++i)
		ans += 2 * i + 1;
	ans += ones;
	return ans;
}

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 5
Accepted

Test #1:

score: 5
Accepted
time: 0ms
memory: 3816kb

input:

1000
2
00
2
01
2
11
4
0000
4
0100
4
0101
4
1110
4
1111
6
000000
6
100000
6
110000
6
011100
6
111001
6
111110
6
111111
8
00000000
8
10000000
8
00110000
8
11100000
8
01100110
8
11100011
8
11111001
8
11111110
8
11111111
10
0000000000
10
0010000000
10
0100010000
10
1001001000
10
1110010000
10
1101001010...

output:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
...

input:


output:

2000

result:

ok m = 2000

Test #2:

score: 5
Accepted
time: 0ms
memory: 3904kb

input:

1000
62
11111111111111111111110100100111110111001000000000100011001111
62
11111111111111111111111111000101010100001010111000100111100010
62
11111111111111111110110110100000101011100111111110001101000110
62
11111111111111111111110101110010101100111011011000100010110101
62
1111111111111111111111111110...

output:

1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
...

input:


output:

2000

result:

ok m = 2000

Subtask #2:

score: 5
Accepted

Test #3:

score: 5
Accepted
time: 10ms
memory: 3812kb

input:

1000
3092
11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

output:

2392149
3237369
2749856
2195337
1287710
2355845
3335395
3368329
3788433
3809503
2138066
3919234
3445205
1969808
2611344
2738622
102224
3755713
692366
1999357
1791368
1080377
2887807
292605
3650162
2047893
2886267
1927376
3812776
1734518
521926
417160
3517895
3437895
1741109
2515055
2130145
1493727
1...

input:


output:

2000

result:

ok m = 2000

Test #4:

score: 5
Accepted
time: 18ms
memory: 3864kb

input:

1000
3604
00010001101101010001001000101110100100001011011001010000111111110110001000110101001110111111110000101011000001101011111001000110001001110011111011110010111001111110110111001111000011101110100100010010100001111000111100000101100100011011100111011110110010100111110110000110000101110010110111...

output:

3247998
2952264
101276
3985524
3481871
1597107
3102982
3200769
3944600
2638234
857913
1577621
929409
1919652
544240
852963
1790135
212465
3013164
2949591
127124
1297806
1856199
3039926
2515945
2102087
1462642
132487
574908
500789
1691249
635288
2102814
2987943
1680123
135165
14678
3784008
3163536
26...

input:


output:

2000

result:

ok m = 2000

Test #5:

score: 5
Accepted
time: 18ms
memory: 3868kb

input:

1000
3422
10010001000010111110000000111100011011010001001111010011010100101011010011101110001001111111101011010000011010100010100101000100000011010111010110001010001011101011010101111101001110000000110110111101000111000101001110101010001110111011000101110010110010010000110011000101001010000011110101...

output:

2928097
288621
493405
2654107
1392477
2720264
695372
3246724
3873799
1943259
36019
3099034
2080793
264593
1251607
796288
2422366
2512087
15926
1481435
79016
3777761
2022970
920671
347165
3723201
311611
2228046
354289
2867459
2249190
478736
3044429
840358
3511060
3254619
842641
3999896
2458483
147725...

input:


output:

2000

result:

ok m = 2000

Test #6:

score: 5
Accepted
time: 7ms
memory: 3896kb

input:

1000
3880
11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

output:

3767405
1695402
1062411
520565
3753621
2849376
3544378
3642084
1041553
2246415
3636456
2175599
1208697
1285012
973829
1829274
348285
2682972
3232655
1600823
406856
2199316
353863
69430
3039540
3142014
168684
1207681
3945314
965971
358058
3182008
176715
1601189
2141110
32793
798136
3097583
3776345
37...

input:


output:

2000

result:

ok m = 2000

Test #7:

score: 5
Accepted
time: 9ms
memory: 4152kb

input:

1000
3106
01000100110100000011110011101101110100000100100000010111010111000110110010001001001101111010011001000000101100001101110100000010111001111011100000001111100001101010001110111101100110010111001100001010011011010101000001100101110000110111001010011010100100110000100011010001000000000001001100...

output:

2411978
1765946
3265867
2545974
1826937
805418
3154938
3052442
24781
1476109
3308102
2969474
1833779
494220
59723
3155918
503704
3941543
2213661
846943
3910588
1104614
3619613
1556790
3232609
2475271
2516715
3641605
3120720
2979060
1980061
527445
3930920
1088555
3220479
3373216
2150502
3028732
71176...

input:


output:

2000

result:

ok m = 2000

Test #8:

score: 5
Accepted
time: 9ms
memory: 3912kb

input:

1000
4000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

output:

4000000
3999999
3999998
3999997
3999996
3999995
3999994
3999993
3999992
3999991
3999990
3999989
3999988
3999987
3999986
3999985
3999984
3999983
3999982
3999981
3999980
3999979
3999978
3999977
3999976
3999975
3999974
3999973
3999972
3999971
3999970
3999969
3999968
3999967
3999966
3999965
3999964
3999...

input:


output:

2000

result:

ok m = 2000

Test #9:

score: 5
Accepted
time: 17ms
memory: 4116kb

input:

1000
4000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

output:

4000000
4000000
4000000
4000000
4000000
4000000
4000000
4000000
4000000
4000000
4000000
4000000
4000000
4000000
4000000
4000000
4000000
4000000
4000000
4000000
4000000
4000000
4000000
4000000
4000000
4000000
4000000
4000000
4000000
4000000
4000000
4000000
4000000
4000000
4000000
4000000
4000000
4000...

input:


output:

2000

result:

ok m = 2000

Subtask #3:

score: 0
Wrong Answer

Test #10:

score: 0
Wrong Answer
time: 36ms
memory: 4148kb

input:

1000

output:


input:


output:


result:

wrong output format Unexpected end of file - int32 expected

Subtask #4:

score: 0
Skipped

Subtask #5:

score: 0
Skipped

Subtask #6:

score: 0
Skipped