QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#24440#3507. Broken Device 2Qingyu10 43ms3872kbC++20907b2022-03-30 20:09:282023-01-22 10:33:22

Judging History

This is a historical verdict posted at 2023-01-22 10:33:22.

  • [2023-09-14 02:27:12]
  • 管理员手动重测本题所有提交记录
  • Verdict: 10
  • Time: 36ms
  • Memory: 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]
  • Judged
  • Verdict: 10
  • Time: 43ms
  • Memory: 3872kb
  • [2022-03-30 20:09:28]
  • Submitted

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: 12ms
memory: 3636kb

input:

1000
2
00
2
01
2
11
4
0000
4
1000
4
0101
4
1011
4
1111
6
000000
6
100000
6
101000
6
110001
6
111001
6
111110
6
111111
8
00000000
8
00010000
8
01100000
8
01110000
8
10100101
8
11100101
8
11111010
8
11111101
8
11111111
10
0000000000
10
0100000000
10
0110000000
10
0100101000
10
0010101010
10
0111010010...

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

input:

1000
62
11111111111111111111111101000001100001100101110000001101100111
62
11111111111111111111001001111111011101100000011111000100100001
62
11111111111111111111111110100100110110110111001111101000000000
62
11111111111111111111101100000011111001101111110001100001011101
62
1111111111111111111111010001...

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: 23ms
memory: 3628kb

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: 25ms
memory: 3692kb

input:

1000
3604
01010100101011011101001001100100111111010011001111100110100100111010111000011101110000110001010000011001100100001110001000110111110000110000010101010011000100001101000101100001001001110111111101001101011010100100010101010011000010010011001001011010100000000101001000110111111010010000010011...

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: 16ms
memory: 3568kb

input:

1000
3422
01001110111000001110000100100011101110110010111011010101001110010010110100000110110000000111011001001111011100011100000100101001001101011000011001011101011110101111000100010110000000100001101001101101100110100010001110011100010011110010111100000101101110111010100110111010010101100000100000...

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: 25ms
memory: 3624kb

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: 16ms
memory: 3576kb

input:

1000
3106
11011001011110111001101111011011000000000110010101000101100001111111010000100011001110101110001110111000001110100001011110110111000010001100111111100011100000100100100001000011011011000101101110100110110111000000111001000010011100000011011101111000000101110111001011001000100100010110000110...

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: 25ms
memory: 3608kb

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: 43ms
memory: 3676kb

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: 43ms
memory: 3872kb

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