QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#418254#8416. Dzielniki [B]RedreamMer2 2032ms8004kbC++171.2kb2024-05-23 12:08:172024-05-23 12:08:18

Judging History

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

  • [2024-05-23 12:08:18]
  • 评测
  • 测评结果:2
  • 用时:2032ms
  • 内存:8004kb
  • [2024-05-23 12:08:17]
  • 提交

answer

// #pragma GCC optimize("O3")
#pragma GCC optimize("Ofast")
#pragma GCC optimize("unroll-loops")
// #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,avx2,tune=native")
#include "dzilib.h"
#include <map>
#include <set>
#include <queue>
#include <cmath>
#include <vector>
#include <cstdio>
#include <random>
#include <iomanip>
#include <cstring>
#include <cassert>
#include <iostream>
#include <algorithm>
#include <unordered_map>
using namespace std;

#define PB emplace_back
// #define int long long
#define ll long long
#define vi vector<int>
#define siz(a) ((int) ((a).size()))
#define rep(i, a, b) for (int i = (a); i <= (b); ++i)
#define per(i, a, b) for (int i = (a); i >= (b); --i)
void print(vi n) { rep(i, 0, siz(n) - 1) cerr << n[i] << " \n"[i == siz(n) - 1]; }

const int N = 1e6 + 100;

int s[N + 5], t[105];

signed main() {
	rep(i, 1, N) for(int j = i; j <= N; j += i) ++s[j];
	int T = GetT();
	int q = GetQ();
	long long c = GetC();
	long long n = GetN();
	while(T--) {
		int tmp = 0;
		rep(i, 0, 99) t[i] = Ask(i);
		rep(i, 1, N) {
			bool is = 1;
			rep(j, 0, 99) is &= s[i + j] == t[j];
			if(is) {
				Answer(i);
				break;
			}
		}
	}
	return 0;
}

詳細信息

Subtask #1:

score: 1
Accepted

Test #1:

score: 1
Accepted
time: 161ms
memory: 7704kb

input:

50 100000 50000 1000000000000
49108
86361
48807
44296
98962
74228
70938
50085
85439
82491
61850
10270
86867
40660
48433
67675
57312
17321
8228
87878
61853
80754
9880
65714
55443
34797
89187
44610
75431
56726
52425
16106
49808
75351
46368
19446
65264
39323
25273
46629
98
24463
76734
54088
12393
93157...

output:

Accepted: queries used = 5000.

result:

ok 

Test #2:

score: 0
Accepted
time: 150ms
memory: 7712kb

input:

50 100000 50000 1000000000000
21469
57104
22446
74024
60004
7599
18880
42347
76178
83980
96162
67460
33521
66752
35898
60176
83640
97657
55440
58256
4483
15397
7528
42761
18012
741
45496
43216
80215
99629
62890
29063
77462
98071
27424
32544
47601
98801
53915
3299
38560
96577
24569
10735
75026
52968
...

output:

Accepted: queries used = 5000.

result:

ok 

Test #3:

score: 0
Accepted
time: 145ms
memory: 8000kb

input:

50 100000 50000 1000000000000
11001
35509
7673
24690
15443
22930
85249
2442
65424
21223
65223
91708
37676
68800
98505
70082
53761
70029
43022
17965
67076
23681
68973
40488
84861
99396
72157
48846
77583
16679
18879
95548
8806
64669
21819
37682
33092
28505
32069
94584
11546
43718
16791
87013
95852
893...

output:

Accepted: queries used = 5000.

result:

ok 

Test #4:

score: 0
Accepted
time: 234ms
memory: 7704kb

input:

50 100000 50000 1000000000000
93976
96052
99996
98628
98776
92381
99938
91670
71221
81945
99650
78522
50592
94448
98247
97344
99997
78935
84535
99572
91874
99119
99242
79099
99678
78737
72474
99966
99297
98800
92568
96640
98771
99452
94930
98479
99024
97127
98334
85199
91969
99900
96749
97754
95988
...

output:

Accepted: queries used = 5000.

result:

ok 

Test #5:

score: 0
Accepted
time: 238ms
memory: 7776kb

input:

50 100000 50000 1000000000000
99861
97227
99965
99800
81573
86111
95881
90856
95494
98052
92544
99501
99293
98305
93153
98858
98448
99031
98925
97265
91357
96759
99204
99930
99648
84420
99965
96328
99657
98260
79899
92365
99519
82788
96039
95438
78665
98042
99570
96899
77557
99941
88088
99276
97363
...

output:

Accepted: queries used = 5000.

result:

ok 

Test #6:

score: 0
Accepted
time: 236ms
memory: 7704kb

input:

50 100000 50000 1000000000000
88455
98295
98552
97350
99585
94633
92948
95778
99872
99849
99749
97597
99139
92554
99317
99373
99836
97283
96490
91063
84414
88108
95620
92364
99829
95010
90394
99309
98432
99754
74609
99744
71161
81694
99966
99798
99242
98336
92819
81590
99749
98143
87421
89941
63828
...

output:

Accepted: queries used = 5000.

result:

ok 

Test #7:

score: 0
Accepted
time: 105ms
memory: 7964kb

input:

50 100000 50000 1000000000000
98297
93305
82937
78725
73721
69977
65529
62201
59042
55289
52481
49145
46649
41465
39359
36857
34985
32761
31097
27641
26237
24569
23321
20729
19676
18425
17489
16377
15545
13817
13115
12281
11657
10361
9209
8741
8185
7769
6905
6554
6137
5825
5177
4601
4367
4089
3881
3...

output:

Accepted: queries used = 5000.

result:

ok 

Test #8:

score: 0
Accepted
time: 113ms
memory: 8004kb

input:

50 100000 50000 1000000000000
31397
31398
31396
31399
31393
31402
31388
31407
31381
31414
31372
31423
31361
31434
31348
31447
31333
31462
31316
31479
31297
31498
31276
31519
31253
31542
31228
31567
31201
31594
31172
31623
31141
31654
31108
31687
31073
31722
31036
31759
30997
31798
30956
31839
30913
...

output:

Accepted: queries used = 5000.

result:

ok 

Test #9:

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

input:

50 100000 50000 1000000000000
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

output:

Accepted: queries used = 5000.

result:

ok 

Test #10:

score: 0
Accepted
time: 247ms
memory: 7652kb

input:

50 100000 50000 1000000000000
100000
99999
99998
99997
99996
99995
99994
99993
99992
99991
99990
99989
99988
99987
99986
99985
99984
99983
99982
99981
99980
99979
99978
99977
99976
99975
99974
99973
99972
99971
99970
99969
99968
99967
99966
99965
99964
99963
99962
99961
99960
99959
99958
99957
99956...

output:

Accepted: queries used = 5000.

result:

ok 

Subtask #2:

score: 1
Accepted

Test #11:

score: 1
Accepted
time: 1062ms
memory: 7676kb

input:

50 1000000 5000 1000000000000
986587
791769
338733
959743
466876
613054
887723
862451
853797
721415
115910
736804
796748
950095
362863
419090
786887
27917
364483
289769
26581
70926
685791
12202
554610
768721
279241
297080
445667
441723
529286
230179
985659
690926
297172
606535
540585
426446
300803
5...

output:

Accepted: queries used = 5000.

result:

ok 

Test #12:

score: 0
Accepted
time: 828ms
memory: 7708kb

input:

50 1000000 5000 1000000000000
408852
226852
398523
636358
555959
300412
871671
303116
560497
760348
742976
83603
260140
462078
36416
407802
37046
49682
137208
553464
298995
441806
740810
507554
524963
58279
426298
655003
152450
334164
857376
197237
678363
591606
177637
558873
346552
51195
502626
326...

output:

Accepted: queries used = 5000.

result:

ok 

Test #13:

score: 0
Accepted
time: 1018ms
memory: 7676kb

input:

50 1000000 5000 1000000000000
475851
599572
835167
406006
533260
156523
477653
89984
814218
489456
622070
810236
795761
417808
258143
685831
445924
76632
24975
215368
199249
944470
163761
887029
938625
71271
2534
914049
450895
539206
191036
370740
92189
688228
636358
357555
783609
513286
796976
3290...

output:

Accepted: queries used = 5000.

result:

ok 

Test #14:

score: 0
Accepted
time: 1927ms
memory: 7724kb

input:

50 1000000 5000 1000000000000
823436
981396
973639
990740
996965
994293
690890
991471
999810
991906
823138
979610
986734
943349
901503
996704
995147
991339
972977
993899
988312
977475
875590
939929
999724
963303
775835
941842
997000
999951
970974
969242
993922
935100
993699
698621
814436
969687
9574...

output:

Accepted: queries used = 5000.

result:

ok 

Test #15:

score: 0
Accepted
time: 1866ms
memory: 7744kb

input:

50 1000000 5000 1000000000000
987255
976641
997474
991190
770527
999577
989283
993717
951472
999889
926163
921981
918110
685260
886099
999958
845011
991923
978408
921494
992390
961625
989377
989669
965377
989396
980844
980883
638798
843662
799429
999740
779625
916349
916091
996245
971073
919164
9943...

output:

Accepted: queries used = 5000.

result:

ok 

Test #16:

score: 0
Accepted
time: 1885ms
memory: 7708kb

input:

50 1000000 5000 1000000000000
986002
730529
998317
710151
993336
843598
459393
963205
947031
977557
980552
999997
976592
972309
996529
837839
964651
984151
951398
989019
975047
978997
998440
989916
811153
890989
854128
995451
999428
924093
994201
790186
785594
999948
932698
858896
985210
998139
8547...

output:

Accepted: queries used = 5000.

result:

ok 

Test #17:

score: 0
Accepted
time: 734ms
memory: 7720kb

input:

50 1000000 5000 1000000000000
995321
944777
884729
839801
786425
746489
708581
663545
629849
589817
559865
531434
524281
497657
472385
442361
419897
393209
373241
354287
331769
314921
294905
279929
262137
248825
236189
221177
209945
196601
186617
177140
165881
157457
147449
139961
131065
124409
1180...

output:

Accepted: queries used = 5000.

result:

ok 

Test #18:

score: 0
Accepted
time: 1031ms
memory: 7684kb

input:

50 1000000 5000 1000000000000
492113
492114
492112
492115
492109
492118
492104
492123
492097
492130
492088
492139
492077
492150
492064
492163
492049
492178
492032
492195
492013
492214
491992
492235
491969
492258
491944
492283
491917
492310
491888
492339
491857
492370
491824
492403
491789
492438
4917...

output:

Accepted: queries used = 5000.

result:

ok 

Test #19:

score: 0
Accepted
time: 35ms
memory: 7708kb

input:

50 1000000 5000 1000000000000
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

output:

Accepted: queries used = 5000.

result:

ok 

Test #20:

score: 0
Accepted
time: 2032ms
memory: 7656kb

input:

50 1000000 5000 1000000000000
1000000
999999
999998
999997
999996
999995
999994
999993
999992
999991
999990
999989
999988
999987
999986
999985
999984
999983
999982
999981
999980
999979
999978
999977
999976
999975
999974
999973
999972
999971
999970
999969
999968
999967
999966
999965
999964
999963
999...

output:

Accepted: queries used = 5000.

result:

ok 

Subtask #3:

score: 0
Wrong Answer

Test #21:

score: 0
Wrong Answer
time: 425ms
memory: 7516kb

input:

10 1000000000 50000 1000000000000
408103384
716411227
312685147
924284703
375298759
152825423
311623701
481729457
215396950
9146195

output:

Unauthorized output

result:

wrong answer 

Subtask #4:

score: 0
Wrong Answer

Test #31:

score: 0
Wrong Answer
time: 430ms
memory: 7588kb

input:

10 100000000000000 5000 100000000000000000
60077435990701
17220541740604
64191465861673
55745499051041
92001632467345
9358956369292
35872866769179
78367022100297
7839460363340
34668026591527

output:

Unauthorized output

result:

wrong answer 

Subtask #5:

score: 0
Wrong Answer

Test #41:

score: 0
Wrong Answer
time: 425ms
memory: 7584kb

input:

10 100000000000000 2000 100000000000000000
12494380076190
85448577530879
31501976723503
61560401637840
9958432442859
68538788138133
81056300713749
31455642088461
52813858531796
2350217441027

output:

Unauthorized output

result:

wrong answer 

Subtask #6:

score: 0
Wrong Answer

Test #51:

score: 0
Wrong Answer
time: 424ms
memory: 7864kb

input:

10 100000000000000 1300 100000000000000000
93861841503524
187801688618
12767914004896
68441979369935
44276894335941
10366130300247
10581531522622
34683620486862
71739885742802
31789387511772

output:

Unauthorized output

result:

wrong answer 

Subtask #7:

score: 0
Wrong Answer

Test #61:

score: 0
Wrong Answer
time: 387ms
memory: 7740kb

input:

10 100000000000000 950 100000000000000000
89476806232027
12353673422544
87587374109960
29662216144897
59695535958606
16446701644855
15698587958167
76032905298130
18875210693225
2202458936163

output:

ERROR: too many queries

result:

wrong answer 

Subtask #8:

score: 0
Wrong Answer

Test #71:

score: 0
Wrong Answer
time: 343ms
memory: 7704kb

input:

10 100000000000000 820 100000000000000000
57380646951677
24500445660413
52513218855562
35936833055954
21061776201610
17990465203024
53667291726216
50437972694073
8891884060027
40201586063900

output:

ERROR: too many queries

result:

wrong answer 

Subtask #9:

score: 0
Wrong Answer

Test #81:

score: 0
Wrong Answer
time: 309ms
memory: 7704kb

input:

10 100000000000000 750 100000000000000000
5121346638871
87604132110850
89767773421324
36910678760633
22317088453717
9150554156208
86627018380188
91455697966830
39854585335842
25531102467103

output:

ERROR: too many queries

result:

wrong answer 

Subtask #10:

score: 0
Wrong Answer

Test #91:

score: 0
Wrong Answer
time: 305ms
memory: 7660kb

input:

10 100000000000000 720 100000000000000000
32571246806419
17047845628559
72028252544868
84189424781123
34278867527450
31844169904318
25833108322349
14895620716019
41844198477918
35390870210849

output:

ERROR: too many queries

result:

wrong answer