QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#513629#9178. All-You-Can-Eatucup-team004#AC ✓39ms3864kbC++202.4kb2024-08-10 18:48:352024-08-10 18:48:41

Judging History

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

  • [2024-08-10 18:48:41]
  • 评测
  • 测评结果:AC
  • 用时:39ms
  • 内存:3864kb
  • [2024-08-10 18:48:35]
  • 提交

answer

#include <bits/stdc++.h>

using u32 = unsigned;
using i64 = long long;
using u64 = unsigned long long;

void solve() {
    int n;
    std::cin >> n;
    
    std::vector<int> a(n);
    
    int sum = 0;
    std::vector<int> v;
    
    for (int i = 0; i < n; i++) {
        std::cin >> a[i];
        
        if (sum >= 600 || a[i] == 0) {
            std::cout << 0 << std::endl;
            std::cout << "IGNORE" << std::endl;
            continue;
        }
        if (a[i] >= 600) {
            std::cout << v.size() << std::endl;
            for (auto j : v) {
                std::cout << " " << j + 1;
            }
            std::cout << std::endl;
            std::cout << "TAKE" << std::endl;
            v = {i};
            sum = a[i];
            continue;
        }
        if (a[i] < 400) {
            std::cout << 0 << std::endl;
            std::cout << "TAKE" << std::endl;
            v.push_back(i);
            sum += a[i];
            continue;
        }
        int x = -1;
        for (auto j : v) {
            if (a[j] >= 400) {
                x = j;
            }
        }
        if (x != -1 && a[x] + a[i] <= 1000) {
            std::cout << v.size() - 1;
            for (auto j : v) {
                if (j != x) {
                    std::cout << " " << j + 1;
                }
            }
            std::cout << std::endl;
            std::cout << "TAKE" << std::endl;
            v = {x, i};
            sum = a[x] + a[i];
            continue;
        }
        if (x != -1 && a[i] >= a[x]) {
            std::cout << 0 << std::endl;
            std::cout << "IGNORE" << std::endl;
            continue;
        }
        std::vector<int> nv;
        int nsum = 0;
        nv.push_back(i);
        nsum += a[i];
        std::vector<int> del;
        for (auto j : v) {
            if (nsum + a[j] <= 1000) {
                nv.push_back(j);
                nsum += a[j];
            } else {
                del.push_back(j);
            }
        }
        std::cout << del.size();
        for (auto j : del) {
            std::cout << " " << j + 1;
        }
        std::cout << std::endl;
        std::cout << "TAKE" << std::endl;
        v = nv;
        sum = nsum;
    }
}

int main() {
    std::ios::sync_with_stdio(false);
    std::cin.tie(nullptr);
    
    int t;
    std::cin >> t;
    
    while (t--) {
        solve();
    }
    
    return 0;
}

这程序好像有点Bug,我给组数据试试?

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 1ms
memory: 3756kb

input:

1
5
10
13
450
585
465

output:

0
TAKE
0
TAKE
0
TAKE
0
IGNORE
2 1 2
TAKE

result:

ok OK, worst = 0.975480 (1 test case)

Test #2:

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

input:

1
1
100

output:

0
TAKE

result:

ok OK, worst = 1.000000 (1 test case)

Test #3:

score: 0
Accepted
time: 11ms
memory: 3596kb

input:

2000
5
535
529
536
588
558
5
515
525
599
507
549
5
561
567
504
557
596
5
592
503
549
549
536
5
590
572
589
540
544
5
524
553
545
555
543
5
523
571
577
506
594
5
519
527
521
587
539
5
561
569
573
552
587
5
571
515
585
525
589
5
512
572
565
516
527
5
573
579
564
514
557
5
518
595
509
518
549
5
549
541...

output:

0
TAKE
1 1
TAKE
0
IGNORE
0
IGNORE
0
IGNORE
0
TAKE
0
IGNORE
0
IGNORE
1 1
TAKE
0
IGNORE
0
TAKE
0
IGNORE
1 1
TAKE
0
IGNORE
0
IGNORE
0
TAKE
1 1
TAKE
0
IGNORE
0
IGNORE
0
IGNORE
0
TAKE
1 1
TAKE
0
IGNORE
1 2
TAKE
0
IGNORE
0
TAKE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
TAKE
0
IGNORE
0
IGNORE
1 1
TAKE
0
IGNORE...

result:

ok OK, worst = 0.836394 (2000 test cases)

Test #4:

score: 0
Accepted
time: 39ms
memory: 3552kb

input:

500
20
535
529
536
588
558
515
525
599
507
549
561
567
504
557
596
592
503
549
549
536
20
590
572
589
540
544
524
553
545
555
543
523
571
577
506
594
519
527
521
587
539
20
561
569
573
552
587
571
515
585
525
589
512
572
565
516
527
573
579
564
514
557
20
518
595
509
518
549
549
541
580
535
531
540
...

output:

0
TAKE
1 1
TAKE
0
IGNORE
0
IGNORE
0
IGNORE
1 2
TAKE
0
IGNORE
0
IGNORE
1 6
TAKE
0
IGNORE
0
IGNORE
0
IGNORE
1 9
TAKE
0
IGNORE
0
IGNORE
0
IGNORE
1 13
TAKE
0
IGNORE
0
IGNORE
0
IGNORE
0
TAKE
1 1
TAKE
0
IGNORE
1 2
TAKE
0
IGNORE
1 4
TAKE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
1 6
TAKE
0
IGNORE
0
IGNORE
1 11
T...

result:

ok OK, worst = 0.836394 (500 test cases)

Test #5:

score: 0
Accepted
time: 9ms
memory: 3820kb

input:

200
50
535
529
536
588
558
515
525
599
507
549
561
567
504
557
596
592
503
549
549
536
590
572
589
540
544
524
553
545
555
543
523
571
577
506
594
519
527
521
587
539
561
569
573
552
587
571
515
585
525
589
50
512
572
565
516
527
573
579
564
514
557
518
595
509
518
549
549
541
580
535
531
540
596
51...

output:

0
TAKE
1 1
TAKE
0
IGNORE
0
IGNORE
0
IGNORE
1 2
TAKE
0
IGNORE
0
IGNORE
1 6
TAKE
0
IGNORE
0
IGNORE
0
IGNORE
1 9
TAKE
0
IGNORE
0
IGNORE
0
IGNORE
1 13
TAKE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IG...

result:

ok OK, worst = 0.836394 (200 test cases)

Test #6:

score: 0
Accepted
time: 20ms
memory: 3628kb

input:

100
100
535
529
536
588
558
515
525
599
507
549
561
567
504
557
596
592
503
549
549
536
590
572
589
540
544
524
553
545
555
543
523
571
577
506
594
519
527
521
587
539
561
569
573
552
587
571
515
585
525
589
512
572
565
516
527
573
579
564
514
557
518
595
509
518
549
549
541
580
535
531
540
596
516
...

output:

0
TAKE
1 1
TAKE
0
IGNORE
0
IGNORE
0
IGNORE
1 2
TAKE
0
IGNORE
0
IGNORE
1 6
TAKE
0
IGNORE
0
IGNORE
0
IGNORE
1 9
TAKE
0
IGNORE
0
IGNORE
0
IGNORE
1 13
TAKE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IG...

result:

ok OK, worst = 0.836394 (100 test cases)

Test #7:

score: 0
Accepted
time: 4ms
memory: 3532kb

input:

10
1000
535
529
536
588
558
515
525
599
507
549
561
567
504
557
596
592
503
549
549
536
590
572
589
540
544
524
553
545
555
543
523
571
577
506
594
519
527
521
587
539
561
569
573
552
587
571
515
585
525
589
512
572
565
516
527
573
579
564
514
557
518
595
509
518
549
549
541
580
535
531
540
596
516
...

output:

0
TAKE
1 1
TAKE
0
IGNORE
0
IGNORE
0
IGNORE
1 2
TAKE
0
IGNORE
0
IGNORE
1 6
TAKE
0
IGNORE
0
IGNORE
0
IGNORE
1 9
TAKE
0
IGNORE
0
IGNORE
0
IGNORE
1 13
TAKE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IG...

result:

ok OK, worst = 0.836394 (10 test cases)

Test #8:

score: 0
Accepted
time: 13ms
memory: 3864kb

input:

1
10000
535
529
536
588
558
515
525
599
507
549
561
567
504
557
596
592
503
549
549
536
590
572
589
540
544
524
553
545
555
543
523
571
577
506
594
519
527
521
587
539
561
569
573
552
587
571
515
585
525
589
512
572
565
516
527
573
579
564
514
557
518
595
509
518
549
549
541
580
535
531
540
596
516
...

output:

0
TAKE
1 1
TAKE
0
IGNORE
0
IGNORE
0
IGNORE
1 2
TAKE
0
IGNORE
0
IGNORE
1 6
TAKE
0
IGNORE
0
IGNORE
0
IGNORE
1 9
TAKE
0
IGNORE
0
IGNORE
0
IGNORE
1 13
TAKE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IG...

result:

ok OK, worst = 0.836394 (1 test case)

Test #9:

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

input:

1
2
2
999

output:

0
TAKE
1
 1
TAKE

result:

ok OK, worst = 1.000000 (1 test case)

Test #10:

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

input:

100
3
551
450
550
3
552
449
551
3
553
448
552
3
554
447
553
3
555
446
554
3
556
445
555
3
557
444
556
3
558
443
557
3
559
442
558
3
560
441
559
3
561
440
560
3
562
439
561
3
563
438
562
3
564
437
563
3
565
436
564
3
566
435
565
3
567
434
566
3
568
433
567
3
569
432
568
3
570
431
569
3
571
430
570
3
...

output:

0
TAKE
1 1
TAKE
0
TAKE
0
TAKE
1 1
TAKE
0
TAKE
0
TAKE
1 1
TAKE
0
TAKE
0
TAKE
1 1
TAKE
0
TAKE
0
TAKE
1 1
TAKE
0
TAKE
0
TAKE
1 1
TAKE
0
TAKE
0
TAKE
1 1
TAKE
0
TAKE
0
TAKE
1 1
TAKE
0
TAKE
0
TAKE
1 1
TAKE
0
TAKE
0
TAKE
1 1
TAKE
0
TAKE
0
TAKE
1 1
TAKE
0
TAKE
0
TAKE
1 1
TAKE
0
TAKE
0
TAKE
1 1
TAKE
0
TAKE
0...

result:

ok OK, worst = 0.600000 (100 test cases)

Test #11:

score: 0
Accepted
time: 3ms
memory: 3832kb

input:

41
238
1
0
0
4
1
2
0
5
0
5
1
5
2
3
5
1
1
5
5
2
1
3
4
1
5
0
4
1
5
3
1
4
4
1
1
4
2
2
1
0
4
1
5
1
2
4
3
4
0
2
2
0
3
3
4
2
2
1
2
0
3
5
3
3
1
2
4
3
3
3
0
3
1
1
0
4
5
4
1
3
5
2
0
1
0
2
3
0
5
4
5
5
5
1
5
5
5
2
1
4
0
0
4
3
2
5
0
4
1
1
5
3
5
2
3
1
3
3
0
2
3
1
2
3
5
0
5
2
3
5
3
0
3
4
1
0
1
3
1
2
0
4
5
4
3
0
4...

output:

0
TAKE
0
IGNORE
0
IGNORE
0
TAKE
0
TAKE
0
TAKE
0
IGNORE
0
TAKE
0
IGNORE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
IGNORE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
IGNORE
0
TAKE
0...

result:

ok OK, worst = 0.997000 (41 test cases)

Test #12:

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

input:

2000
5
174
966
564
649
8
5
58
211
929
70
340
5
481
864
73
407
722
5
181
417
607
419
28
5
429
40
935
257
913
5
387
532
505
446
80
5
187
486
713
23
81
5
61
330
611
918
736
5
939
19
164
889
679
5
847
644
540
944
848
5
618
224
362
561
336
5
504
875
211
808
227
5
104
528
433
537
106
5
997
485
442
729
421...

output:

0
TAKE
1
 1
TAKE
0
IGNORE
0
IGNORE
0
IGNORE
0
TAKE
0
TAKE
2
 1 2
TAKE
0
IGNORE
0
IGNORE
0
TAKE
1
 1
TAKE
0
IGNORE
0
IGNORE
0
IGNORE
0
TAKE
0
TAKE
2
 2 1
TAKE
0
IGNORE
0
IGNORE
0
TAKE
0
TAKE
2
 1 2
TAKE
0
IGNORE
0
IGNORE
0
TAKE
0
TAKE
0
IGNORE
0
IGNORE
0
IGNORE
0
TAKE
0
TAKE
0
IGNORE
0
IGNORE
0
IGNOR...

result:

ok OK, worst = 0.601202 (2000 test cases)

Test #13:

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

input:

500
20
257
850
484
19
260
795
649
823
847
785
883
806
760
527
836
398
717
793
505
920
20
602
270
83
569
324
821
160
88
863
241
365
659
169
329
289
544
486
993
18
131
20
91
3
531
209
146
382
603
943
649
951
599
740
700
668
33
953
491
567
431
124
20
413
889
893
880
489
241
977
840
588
76
499
965
550
1...

output:

0
TAKE
1
 1
TAKE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0

TAKE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGN...

result:

ok OK, worst = 0.600000 (500 test cases)

Test #14:

score: 0
Accepted
time: 9ms
memory: 3548kb

input:

200
50
765
60
167
6
14
909
568
956
634
989
680
921
775
440
340
86
164
753
490
330
489
956
469
611
818
727
668
868
265
772
309
785
478
43
246
707
683
54
53
21
785
999
295
142
836
170
855
273
239
199
50
807
203
169
579
61
866
899
885
826
463
315
416
570
960
724
140
203
583
657
209
81
403
278
829
184
9...

output:

0

TAKE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IG...

result:

ok OK, worst = 0.601000 (200 test cases)

Test #15:

score: 0
Accepted
time: 7ms
memory: 3488kb

input:

100
100
371
754
81
983
173
477
417
930
677
688
917
728
614
592
18
443
31
50
450
875
618
78
331
859
489
750
199
690
916
199
544
781
776
852
134
924
504
454
151
403
437
650
74
380
799
149
711
241
363
651
963
407
536
934
332
807
505
169
253
908
397
754
11
366
2
327
664
188
292
129
758
225
405
778
843
8...

output:

0
TAKE
1
 1
TAKE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IG...

result:

ok OK, worst = 0.606000 (100 test cases)

Test #16:

score: 0
Accepted
time: 9ms
memory: 3828kb

input:

10
1000
553
578
500
171
123
425
569
562
982
423
854
460
650
46
602
10
608
92
335
209
527
351
70
878
180
393
853
337
384
129
605
156
616
95
108
571
217
289
720
519
415
908
96
572
829
237
556
692
352
544
681
377
543
576
674
496
857
330
817
757
542
995
399
165
54
319
950
456
56
479
62
427
68
723
838
61...

output:

0
TAKE
0
IGNORE
1 1
TAKE
0
TAKE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNOR...

result:

ok OK, worst = 0.653000 (10 test cases)

Test #17:

score: 0
Accepted
time: 8ms
memory: 3652kb

input:

1
10000
67
998
689
431
382
267
201
867
717
51
275
497
104
321
860
588
341
979
671
119
801
91
90
879
824
47
811
806
314
189
981
688
551
69
756
283
362
858
837
187
983
930
979
292
225
82
6
681
245
262
650
384
184
607
53
848
707
893
665
901
783
72
197
908
357
606
217
220
405
784
263
781
13
717
301
143
...

output:

0
TAKE
1
 1
TAKE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IG...

result:

ok OK, worst = 0.998000 (1 test case)

Test #18:

score: 0
Accepted
time: 4ms
memory: 3612kb

input:

2000
5
697
794
850
796
920
5
476
830
763
703
763
5
815
925
804
645
734
5
927
587
888
668
874
5
904
673
978
979
624
5
1000
459
870
739
806
5
876
523
541
902
820
5
594
957
882
847
808
5
643
899
811
641
884
5
218
904
472
838
677
5
703
797
801
785
679
5
861
891
792
789
546
5
960
944
840
972
240
5
931
61...

output:

0

TAKE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
TAKE
1
 1
TAKE
0
IGNORE
0
IGNORE
0
IGNORE
0

TAKE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0

TAKE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0

TAKE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0

TAKE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0

TAKE
0
IGNORE
0
IGNORE
0
IGNORE
0...

result:

ok OK, worst = 0.604230 (2000 test cases)

Test #19:

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

input:

500
20
914
849
781
666
924
693
916
765
964
602
988
705
506
798
648
887
991
939
450
771
20
939
678
879
990
905
484
910
914
923
812
705
826
486
924
912
437
794
812
607
853
20
952
891
760
823
653
583
989
534
916
242
959
703
470
714
816
834
882
391
993
915
20
606
987
613
371
443
965
558
678
957
823
743
...

output:

0

TAKE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0

TAKE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGN...

result:

ok OK, worst = 0.605000 (500 test cases)

Test #20:

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

input:

200
50
990
836
878
781
799
968
900
499
839
159
901
945
704
867
401
448
939
851
858
253
615
913
906
764
901
752
975
967
737
753
552
323
746
665
376
884
792
967
970
955
890
944
601
929
788
682
888
979
827
867
50
890
948
832
825
868
702
971
943
676
651
239
618
176
948
287
594
973
742
623
628
893
982
53...

output:

0

TAKE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IG...

result:

ok OK, worst = 0.600000 (200 test cases)

Test #21:

score: 0
Accepted
time: 9ms
memory: 3784kb

input:

100
100
904
904
922
898
769
834
860
790
636
948
610
550
647
942
953
863
390
868
774
554
879
694
918
486
699
653
770
617
674
642
643
901
335
783
955
650
678
954
849
846
979
692
668
888
727
894
922
774
841
125
877
627
527
812
789
362
999
1000
982
702
1000
707
772
942
894
253
456
954
953
907
967
400
97...

output:

0

TAKE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IG...

result:

ok OK, worst = 0.607000 (100 test cases)

Test #22:

score: 0
Accepted
time: 25ms
memory: 3508kb

input:

10
1000
917
931
226
879
806
411
745
895
820
596
505
524
907
121
831
924
706
847
816
919
713
996
615
724
643
850
991
906
696
426
818
528
610
800
446
525
590
960
958
973
739
976
930
991
799
667
761
932
679
911
299
730
886
342
854
894
593
862
309
850
578
480
703
899
803
665
760
876
751
720
662
914
983
...

output:

0

TAKE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IG...

result:

ok OK, worst = 0.657000 (10 test cases)

Test #23:

score: 0
Accepted
time: 4ms
memory: 3632kb

input:

1
10000
822
951
962
807
949
883
743
859
982
550
572
782
382
727
860
604
908
879
977
768
955
949
964
754
947
960
903
778
814
627
989
971
827
348
818
706
885
547
943
506
520
452
636
861
939
1000
779
967
649
717
876
488
946
784
668
786
691
574
937
340
504
566
877
641
617
682
118
922
1000
801
877
838
90...

output:

0

TAKE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IG...

result:

ok OK, worst = 0.822000 (1 test case)

Test #24:

score: 0
Accepted
time: 16ms
memory: 3588kb

input:

2000
5
205
339
194
62
717
5
50
569
223
230
160
5
847
250
46
292
277
5
150
640
380
191
335
5
391
85
158
266
256
5
155
368
494
39
140
5
210
77
7
173
0
5
567
112
360
403
228
5
498
101
9
790
71
5
202
245
258
424
179
5
179
191
61
126
111
5
133
168
10
48
167
5
103
304
361
49
107
5
162
25
197
221
9
5
278
4...

output:

0
TAKE
0
TAKE
0
TAKE
0
IGNORE
0
IGNORE
0
TAKE
0
TAKE
0
IGNORE
0
IGNORE
0
IGNORE
0

TAKE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
TAKE
1
 1
TAKE
0
IGNORE
0
IGNORE
0
IGNORE
0
TAKE
0
TAKE
0
TAKE
0
IGNORE
0
IGNORE
0
TAKE
0
TAKE
1 2
TAKE
0
IGNORE
0
IGNORE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
IGNORE
0
TAKE
0
TAKE
0...

result:

ok OK, worst = 0.600000 (2000 test cases)

Test #25:

score: 0
Accepted
time: 9ms
memory: 3616kb

input:

500
20
209
34
10
154
96
258
489
274
152
630
152
423
0
211
244
101
479
77
109
232
20
81
20
406
277
2
380
81
1
673
407
400
125
395
160
360
567
93
413
15
308
20
85
221
403
605
13
282
32
464
629
571
117
282
165
459
283
226
281
40
488
605
20
55
684
127
105
75
473
223
87
37
33
54
255
196
44
44
793
111
505...

output:

0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGN...

result:

ok OK, worst = 0.600000 (500 test cases)

Test #26:

score: 0
Accepted
time: 21ms
memory: 3528kb

input:

200
50
173
34
214
261
564
421
363
198
203
34
573
586
155
448
435
2
301
105
521
355
122
52
299
859
4
25
95
322
54
212
449
1
264
200
169
207
119
195
299
604
641
294
507
135
236
372
478
260
10
368
50
503
376
92
267
172
305
119
241
164
2
206
652
402
258
48
150
291
542
135
303
356
27
299
436
292
240
531
...

output:

0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
...

result:

ok OK, worst = 0.602000 (200 test cases)

Test #27:

score: 0
Accepted
time: 12ms
memory: 3780kb

input:

100
100
86
504
319
112
142
80
533
439
25
588
295
112
272
100
416
111
136
8
22
16
200
76
420
314
353
520
499
483
398
217
346
1
220
364
56
641
126
232
22
19
36
2
574
241
225
376
88
431
62
210
355
80
119
307
86
103
398
616
259
392
168
56
91
22
242
747
480
709
98
643
123
201
66
37
70
62
260
169
307
43
5...

output:

0
TAKE
0
TAKE
0
TAKE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
...

result:

ok OK, worst = 0.604000 (100 test cases)

Test #28:

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

input:

10
1000
506
35
106
125
356
150
178
129
237
153
635
449
159
467
200
372
116
408
479
36
18
73
91
691
15
302
95
558
13
279
614
235
78
71
225
513
400
471
4
404
295
184
86
228
615
144
420
48
265
29
191
628
6
75
465
68
181
35
71
37
139
596
52
246
232
251
81
77
346
66
332
431
603
197
153
540
66
759
28
322
...

output:

0
TAKE
0
TAKE
0
TAKE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
...

result:

ok OK, worst = 0.631000 (10 test cases)

Test #29:

score: 0
Accepted
time: 10ms
memory: 3680kb

input:

1
10000
4
668
256
385
286
192
87
156
142
287
70
190
56
336
45
7
363
97
436
9
70
376
396
41
120
669
271
383
874
109
588
70
362
98
111
264
7
437
91
171
563
432
843
357
43
168
811
177
724
453
354
348
206
199
123
155
144
379
274
216
282
530
446
189
295
292
679
626
305
710
536
227
287
419
428
140
724
314...

output:

0
TAKE
1
 1
TAKE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IG...

result:

ok OK, worst = 0.668000 (1 test case)

Test #30:

score: 0
Accepted
time: 18ms
memory: 3596kb

input:

2000
5
999
798
899
771
623
5
874
989
982
992
961
5
793
832
757
899
940
5
855
921
923
924
912
5
895
823
791
778
953
5
890
779
686
932
801
5
889
984
759
634
861
5
908
804
952
812
960
5
826
514
880
875
953
5
968
857
946
972
907
5
896
525
947
839
653
5
838
957
922
780
877
5
904
994
918
658
861
5
703
653...

output:

0

TAKE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0

TAKE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0

TAKE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0

TAKE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0

TAKE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0

TAKE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0

TAKE
0
IGNORE
0
IGNORE
0
IGNORE
0...

result:

ok OK, worst = 0.604418 (2000 test cases)

Test #31:

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

input:

500
20
987
959
836
988
797
963
858
527
979
665
911
995
984
876
789
997
900
901
918
849
20
780
853
737
849
993
882
735
991
859
905
967
853
875
971
998
927
936
551
620
748
20
740
791
947
999
684
857
888
792
951
995
936
928
868
648
999
991
857
852
843
868
20
911
880
927
983
662
955
900
955
927
919
747
...

output:

0

TAKE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0

TAKE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGN...

result:

ok OK, worst = 0.604418 (500 test cases)

Test #32:

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

input:

200
50
880
899
951
986
732
809
802
790
743
988
939
757
661
875
924
703
859
908
824
885
881
905
975
969
925
670
898
625
719
992
728
845
951
671
823
917
864
578
775
921
822
548
789
704
971
951
966
657
696
540
50
997
911
952
922
627
614
976
985
998
969
768
939
747
931
519
871
825
958
963
867
970
722
90...

output:

0

TAKE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IG...

result:

ok OK, worst = 0.609000 (200 test cases)

Test #33:

score: 0
Accepted
time: 10ms
memory: 3612kb

input:

100
100
572
639
691
859
769
921
967
921
697
886
746
908
815
929
746
726
953
991
664
898
415
930
948
848
614
629
760
607
811
915
825
711
990
771
541
980
930
912
997
956
926
867
895
797
962
766
733
961
961
915
622
888
953
990
947
815
997
869
943
986
993
881
871
884
897
729
973
460
631
572
886
875
876
...

output:

0
TAKE
1
 1
TAKE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IG...

result:

ok OK, worst = 0.618236 (100 test cases)

Test #34:

score: 0
Accepted
time: 9ms
memory: 3552kb

input:

10
1000
521
698
800
600
889
854
940
985
955
432
987
758
939
914
828
971
848
896
921
835
899
881
902
855
803
974
931
947
824
504
904
985
804
985
1000
891
880
984
859
504
749
998
615
989
937
761
939
895
692
919
896
946
915
994
937
727
993
630
777
724
810
600
751
738
936
800
1000
949
776
969
638
860
96...

output:

0
TAKE
1
 1
TAKE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IG...

result:

ok OK, worst = 0.667000 (10 test cases)

Test #35:

score: 0
Accepted
time: 9ms
memory: 3652kb

input:

1
10000
816
962
836
491
995
912
898
901
977
884
994
870
979
678
569
783
980
766
904
873
701
765
952
851
623
958
524
704
818
929
538
919
772
615
961
934
974
870
928
377
663
646
730
602
835
886
763
961
698
984
877
705
577
629
602
953
744
692
796
970
668
928
804
964
784
954
909
921
949
868
937
858
777
...

output:

0

TAKE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IG...

result:

ok OK, worst = 0.816000 (1 test case)

Test #36:

score: 0
Accepted
time: 6ms
memory: 3500kb

input:

2000
5
28
103
304
59
367
5
11
251
61
312
173
5
160
23
167
264
189
5
259
225
218
0
118
5
239
131
37
140
319
5
533
13
81
175
291
5
18
168
183
12
118
5
134
95
193
210
269
5
277
77
75
8
72
5
3
166
76
184
443
5
256
118
56
229
108
5
47
71
7
296
70
5
226
112
111
642
139
5
51
131
103
423
25
5
47
149
37
42
6...

output:

0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
IGNORE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
IGNORE
0
TAKE
0
TAKE
0
TAKE
0
IGNORE
0
IGNORE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
IGNORE
0
IGNORE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
IGNORE
0
TAKE...

result:

ok OK, worst = 0.604000 (2000 test cases)

Test #37:

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

input:

500
20
419
229
119
264
605
32
17
113
3
96
241
19
209
134
27
2
629
155
112
53
20
174
227
138
14
89
54
205
76
205
121
214
334
35
0
132
503
92
34
386
87
20
291
188
219
17
79
68
221
506
52
11
83
579
56
382
561
208
128
231
26
173
20
97
81
320
215
52
40
143
310
164
148
67
265
60
139
40
415
458
5
69
333
20...

output:

0
TAKE
0
TAKE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE...

result:

ok OK, worst = 0.600000 (500 test cases)

Test #38:

score: 0
Accepted
time: 4ms
memory: 3620kb

input:

200
50
174
293
30
223
210
54
1
104
399
234
20
6
94
103
137
78
186
130
9
124
128
142
226
75
23
159
46
283
84
66
10
8
219
71
55
178
136
179
256
477
2
121
58
84
148
566
272
310
352
443
50
266
61
248
42
113
81
234
139
571
244
229
11
240
177
15
480
121
38
96
61
67
76
399
199
179
163
63
17
116
40
47
295
3...

output:

0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
...

result:

ok OK, worst = 0.600000 (200 test cases)

Test #39:

score: 0
Accepted
time: 15ms
memory: 3600kb

input:

100
100
151
158
147
485
233
76
160
149
51
105
229
428
63
148
47
154
42
376
167
15
246
41
47
14
529
182
42
367
3
156
35
192
175
322
460
257
106
168
193
72
243
145
8
9
39
74
188
97
20
132
146
195
35
130
166
14
242
216
197
78
9
207
207
32
194
42
77
357
200
63
546
106
587
82
590
89
112
219
213
523
334
3...

output:

0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
...

result:

ok OK, worst = 0.600000 (100 test cases)

Test #40:

score: 0
Accepted
time: 20ms
memory: 3788kb

input:

10
1000
283
462
202
253
233
102
154
265
176
37
175
52
63
84
268
209
86
58
404
57
38
59
1
306
179
78
12
38
26
30
20
33
49
24
173
68
4
111
305
431
10
34
135
139
187
29
41
207
721
181
560
23
165
429
230
242
26
137
368
351
247
266
328
34
425
1
35
417
255
318
69
268
96
211
204
86
123
91
22
22
182
150
283...

output:

0
TAKE
0
TAKE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNOR...

result:

ok OK, worst = 0.621000 (10 test cases)

Test #41:

score: 0
Accepted
time: 16ms
memory: 3632kb

input:

1
10000
231
94
375
15
279
31
66
243
83
240
35
111
115
261
41
212
99
168
110
350
148
8
35
38
11
349
484
114
387
76
193
391
254
620
98
272
146
159
214
21
15
39
112
291
85
213
17
13
249
99
132
278
20
123
121
113
98
404
290
191
140
26
63
556
17
301
152
117
303
135
369
348
53
18
251
53
542
103
366
17
151...

output:

0
TAKE
0
TAKE
0
TAKE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
0
IGNORE
...

result:

ok OK, worst = 0.700000 (1 test case)

Test #42:

score: 0
Accepted
time: 6ms
memory: 3596kb

input:

124
82
1
3
3
0
5
0
12
2
11
1
5
14
2
14
6
5
15
3
14
14
9
1
15
4
12
13
14
6
7
0
4
6
14
5
15
11
8
13
1
14
2
14
0
0
10
0
5
3
4
15
13
13
9
12
11
8
3
12
4
4
3
7
1
4
11
10
1
13
4
6
4
10
10
14
1
10
10
13
1
0
11
424
81
15
13
0
0
11
6
15
6
12
4
11
6
15
3
7
13
7
2
6
13
9
3
0
11
0
14
2
0
10
14
10
9
8
2
14
8
2
1...

output:

0
TAKE
0
TAKE
0
TAKE
0
IGNORE
0
TAKE
0
IGNORE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
IGNORE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
...

result:

ok OK, worst = 0.989000 (124 test cases)

Test #43:

score: 0
Accepted
time: 12ms
memory: 3756kb

input:

327
32
7
11
19
37
12
8
29
29
21
19
9
8
35
6
22
15
28
20
4
13
33
40
4
39
7
32
20
35
14
7
2
435
30
14
11
4
6
15
24
35
34
33
23
8
28
23
31
2
29
20
40
10
25
16
28
7
23
4
26
21
15
36
434
29
38
30
34
7
35
17
12
22
13
22
7
28
32
7
23
29
29
38
6
9
26
4
28
9
22
27
34
4
363
31
10
27
32
5
33
7
9
20
30
26
16
29...

output:

0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
2 29 30
TAKE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
...

result:

ok OK, worst = 0.962000 (327 test cases)

Test #44:

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

input:

673
18
75
9
41
28
66
21
45
16
76
11
8
39
2
82
24
2
51
462
13
64
22
34
49
33
55
82
9
61
55
30
49
438
16
18
54
76
85
4
52
1
38
45
61
4
3
43
45
1
506
12
52
83
11
84
66
10
38
65
70
57
61
362
17
42
8
81
29
16
11
82
9
15
19
61
18
76
26
60
0
487
18
77
3
53
38
55
29
28
7
21
7
40
3
7
80
78
21
7
397
19
33
75
...

output:

0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
2 15 17
TAKE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
...

result:

ok OK, worst = 0.924000 (673 test cases)

Test #45:

score: 0
Accepted
time: 8ms
memory: 3756kb

input:

1496
7
73
61
162
142
65
72
473
7
53
11
91
89
38
172
575
9
127
68
54
0
20
86
111
86
508
7
45
26
129
118
117
127
570
7
57
56
197
94
14
115
665
11
110
7
46
54
24
20
69
64
35
47
481
8
122
121
114
63
9
59
13
480
6
32
191
59
164
15
519
6
103
63
155
158
106
516
6
73
183
29
145
36
580
7
178
53
25
81
188
56
...

output:

0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
1 6
TAKE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
1 6
TAKE
0
TAKE
0
TAKE
0
TAKE
0
IGNORE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
1 8
TAKE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
2 5 6
TAKE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
0
TAKE
6
 1 2 3 4 5 6
TAKE
0
TAKE
0
TAKE
0
...

result:

ok OK, worst = 0.600000 (1496 test cases)

Extra Test:

score: 0
Extra Test Passed