QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#24511#3507. Broken Device 2zmhsn113 18ms4156kbC++201.9kb2022-03-31 11:05:082023-09-14 02:27:20

Judging History

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

  • [2023-09-14 02:27:20]
  • 管理员手动重测本题所有提交记录
  • 测评结果:13
  • 用时:18ms
  • 内存:4156kb
  • [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:53]
  • 评测
  • 测评结果:13
  • 用时:40ms
  • 内存:3204kb
  • [2022-03-31 11:05:08]
  • 提交

Anna

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

namespace {

int variable_example = 0;

}

int Declare() {
  variable_example++;
  return 2000;
}

std::pair<std::vector<int>, std::vector<int> > Anna(long long A) {
	vector<int> u,v;
	int tot=A;
	for (int i=1;i<=2000;i++){
		if (tot<=(i+i+1)*4){//0..2i
			if (tot<=(i+i+1)){
				int v1=min(i,tot-1),v2=tot-1-v1;
				u.push_back(0); v.push_back(0);
				for (int j=1;j<=i;j++) u.push_back(j>v1);
				for (int j=1;j<=i;j++) v.push_back(j>v2);
				u.push_back(0); v.push_back(0);
				break;
			}
			if (tot<=2*(i+i+1)){
				tot-=(i+i+1); 
				int v1=min(i,tot-1),v2=tot-1-v1;
				u.push_back(0); v.push_back(0);
				for (int j=1;j<=i;j++) u.push_back(j>v1);
				for (int j=1;j<=i;j++) v.push_back(j>v2);
				u.push_back(1); v.push_back(1);
				break;
			}
			if (tot<=3*(i+i+1)){
				tot-=2*(i+i+1); 
				int v1=min(i,tot-1),v2=tot-1-v1;
				u.push_back(1); v.push_back(1);
				for (int j=1;j<=i;j++) u.push_back(j>v1);
				for (int j=1;j<=i;j++) v.push_back(j>v2);
				u.push_back(0); v.push_back(0);
				break;
			}
				tot-=3*(i+i+1); 
				int v1=min(i,tot-1),v2=tot-1-v1;
				u.push_back(1); v.push_back(1);
				for (int j=1;j<=i;j++) u.push_back(j>v1);
				for (int j=1;j<=i;j++) v.push_back(j>v2);
				u.push_back(1); v.push_back(1);
				break;
		} else tot-=(i+i+1)*4;
	}
	return make_pair(u,v);
}

Bruno

#include "Bruno.h"
#include <utility>
#include <vector>

namespace {

int variable_example = 0;

}

long long Bruno(std::vector<int> u) {
	variable_example++;
	int tot=0,n=(u.size()-4)/2;
	for (int i=1;i<=n;i++){
		if (i==n){//0..2i
			int val=1;
			for (int i=0;i<(int)u.size();i++) val+=(u[i]==0);
			if (u[0]==0&&u.back()==0) tot+=val-4;
			else if (u[0]==0&&u.back()==1) tot+=(i+i+1)+val-2;
			else if (u[0]==1&&u.back()==0) tot+=(i+i+1)*2+val-2;
			else tot+=(i+i+1)*3+val;
		} else tot+=4*(i+i+1);
	}
	return tot;
}

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 5
Accepted

Test #1:

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

input:

1000
6
010010
6
001000
6
000000
6
010111
6
000111
6
001001
6
111100
6
110100
6
101000
6
111111
6
101111
6
101011
8
01101100
8
00101100
8
00010100
8
00000100
8
00000000
8
00111111
8
00011111
8
00010111
8
00011001
8
00001001
8
11110110
8
10110110
8
11110000
8
11010000
8
11000000
8
11111111
8
11101111
...

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

input:

1000
34
1111110010000010100101111111111111
34
1001100011010011101010011111111111
34
1010100100111111001111010100011111
34
1111110100000100010101111101001111
34
1101010100011011011001011100001111
34
1011000010011110011010110110000111
34
1100000101110110110100101000110011
34
10100000001111100100101000...

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

input:

1000
1550
00101110000111100100100100111110110100000101000111111011001100010011111110111010011000101010010101010010111100110000111001110001000001000100101010000011111100011111110001010000011101001000001000000011101100010101111111010101001100101011000111101011100001001111100010001110100100111010101001...

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

input:

1000
1806
00000000110001000010110110011000100001110101001100011011100111101110011010010111100010010000010001001110101011110001110011101011110111011110011000011110001111110100100001000110110101100111011100111000000101110110011100001000110001000011101101000110000110100010110110011001110111100001010000...

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

input:

1000
1714
11101001110101101100100010001000001000111001010100011100101100110001101000010011000101011100000001000100001110111000000100001010011101111011110101011010111110100010000110001011101111111111011110110000100010111000001011110001111000101010100100100110011101111010101110101010011010100101010100...

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

input:

1000
1944
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

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

input:

1000
1556
11000001101100110001010110000001011011110100110010010011101011111110100100101001101011101111010011110000100001100010100100110010011000000010000110000111100100011011100001110110011000011000011101100101111101000110100000111100110011011101110101000010001100000010100110011010100000111011000000...

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

input:

1000
2004
00111010111011111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

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

input:

1000
2004
00101111011111011111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

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: 3
Accepted

Test #10:

score: 3
Accepted
time: 12ms
memory: 3848kb

input:

1000
2804
11111111111011000011100011111110010110010000000110101000101001110111100100110011100100011001101111111110000111010011100010010011011001101101011111000010101110001110110111000100110101000010111011111000011000010111011111100101011110100100011001000101011101000111111000110111100001011000110111...

output:

7846775
8382012
6960772
2404116
8677412
678745
979722
6774319
3437411
7700246
3932261
582072
2662108
1913302
9666010
3371652
2312541
4159600
8783066
993904
5398654
7248427
8232055
3643242
5202338
290310
1551528
3983196
7816277
5663064
8661901
964937
8144699
6117845
8804933
9971775
5436597
3766214
79...

input:


output:

2000

result:

ok m = 2000

Test #11:

score: 3
Accepted
time: 15ms
memory: 3924kb

input:

1000
1610
00100011001000110101110110001111111000001011011111110110011101101000101111011111010110110101000011001110100010011111101100100001000001010100111110001010101010101000011110010111010011011000011101110001001110001010010100010110001011010010000111001000100000101011000110100111110111100000001010...

output:

2579500
3476332
4512501
865937
5540101
5206780
8037675
3675478
8821453
7441051
7676364
338309
976749
946802
3291356
3888882
2478300
1886237
1406259
6251160
2208800
2104502
1931051
1049985
2329662
9349976
5608090
9767861
8144967
3417504
7418611
3118179
4298349
6201707
9025067
6059364
9663241
450971
5...

input:


output:

2000

result:

ok m = 2000

Test #12:

score: 3
Accepted
time: 6ms
memory: 3876kb

input:

1000
1468
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

output:

2145720
7247151
3955792
5119375
102397
6995413
5642360
3131787
5371462
6379650
2328491
8471151
1946249
7566503
6637905
3697742
5543077
408761
7967610
6892138
1101909
2691849
184908
8016601
4624752
9101543
9572339
1216864
3218036
2518886
7443559
6023379
1953149
1938765
837135
2363275
3523721
4435652
...

input:


output:

2000

result:

ok m = 2000

Test #13:

score: 3
Accepted
time: 8ms
memory: 3868kb

input:

1000
3042
10000111101100110000101100111010010010000101100000001000110000000100101110110100000101101010101110000011101101011011010111000010111010000000101011101111001111000010000001101001000100110100010100101101100100001100001110000111100010011101011010001010011001110101111001101011110110100001101010...

output:

9239125
6470044
4672895
4176665
4788657
3211270
3879021
9473641
521084
253145
6033154
5127031
625904
9212465
65924
9956651
2252087
8260418
9895546
7429426
846905
5204965
7241285
9494999
840621
3490412
1263815
5507791
8148607
6275485
1999058
1528587
7924593
4980468
3054715
6609458
4350579
5735464
804...

input:


output:

2000

result:

ok m = 2000

Test #14:

score: 3
Accepted
time: 8ms
memory: 3908kb

input:

1000
498
111110000001111000100101010110010101101101010100100011100010101000000100100011111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

output:

245066
6788319
1673516
1668834
394553
2942265
555022
6915166
2504160
1167605
3060080
5061148
7819952
4994649
4012235
5538388
3227745
3332942
4170563
4170898
1363994
9468160
2991713
1733063
9809544
852809
5008917
2273965
3916627
9975559
9716708
7799492
6082722
4525699
6435787
7981909
1178233
462472
3...

input:


output:

2000

result:

ok m = 2000

Test #15:

score: 3
Accepted
time: 18ms
memory: 3900kb

input:

1000
3166
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

output:

10000000
9999999
9999998
9999997
9999996
9999995
9999994
9999993
9999992
9999991
9999990
9999989
9999988
9999987
9999986
9999985
9999984
9999983
9999982
9999981
9999980
9999979
9999978
9999977
9999976
9999975
9999974
9999973
9999972
9999971
9999970
9999969
9999968
9999967
9999966
9999965
9999964
999...

input:


output:

2000

result:

ok m = 2000

Test #16:

score: 3
Accepted
time: 14ms
memory: 3792kb

input:

1000
3166
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

output:

10000000
10000000
10000000
10000000
10000000
10000000
10000000
10000000
10000000
10000000
10000000
10000000
10000000
10000000
10000000
10000000
10000000
10000000
10000000
10000000
10000000
10000000
10000000
10000000
10000000
10000000
10000000
10000000
10000000
10000000
10000000
10000000
10000000
100...

input:


output:

2000

result:

ok m = 2000

Test #17:

score: 3
Accepted
time: 14ms
memory: 3860kb

input:

1000
1778
11000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

output:

3153792
4161536
523264
2542806
2796202
2715035
127
1048575
2405805
4997816
854
4194288
3365266
2097120
4161528
5000490
2097088
4229086
9999049
2738419
4997529
9999460
195
2097151
4129023
4997159
9998647
8126431
4194303
262143
2796202
2796194
1665
5001324
5001890
32640
4161791
2467411
611027
636635
4...

input:


output:

2000

result:

ok m = 2000

Test #18:

score: 3
Accepted
time: 9ms
memory: 4156kb

input:

1000
1446
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

output:

2080767
2778778
8386560
263
5000855
5588341
9999126
5592407
5594453
254
262140
4996865
9997774
3678144
5592437
524352
1966080
326
6285999
4128895
1048544
2061203
32764
1032319
680
1693
1265501
8565439
2796202
16256
25
9850730
9998672
2788010
5313877
1387923
7713052
399
9998730
4128768
9999888
279620...

input:


output:

2000

result:

ok m = 2000

Test #19:

score: 3
Accepted
time: 6ms
memory: 4156kb

input:

1000
1344
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011010110111101101000101110011001011000000111...

output:

1796388
1093
524885
1657
5592405
5592405
4998184
4178944
2796202
4186048
5625173
9998208
9997035
262143
9999343
7551730
5592401
5001314
9997285
1023
522
5001860
130560
3
2101184
1048576
4194431
9999335
1
3353805
2064895
2935661
4129279
4999239
4194296
1898
179
3564902
4997984
8322047
2279
2871
93685...

input:


output:

2000

result:

ok m = 2000

Subtask #4:

score: 0
Wrong Answer

Test #20:

score: 0
Wrong Answer
time: 7ms
memory: 3848kb

input:

1000
3998
00010010000000011101011010011110010110001000100111100110101011100000010010011100001101110000101011111110011001000011110000010000011111101100101011100100000110011110110101100111110010101001100011111010011111000101010110111001111111000111011001001100100010011100101101010101010101001101010011...

output:

15956231

input:


output:


result:

wrong output format Unexpected end of file - int32 expected

Subtask #5:

score: 0
Skipped

Subtask #6:

score: 0
Skipped