QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#877597#3507. Broken Device 2De3b0o#10 14ms3840kbC++202.2kb2025-01-31 23:37:452025-01-31 23:37:54

Judging History

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

  • [2025-01-31 23:37:54]
  • 评测
  • 测评结果:10
  • 用时:14ms
  • 内存:3840kb
  • [2025-01-31 23:37:45]
  • 提交

Anna

#include "Anna.h"
#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#define ll long long
#define F first
#define S second
#define in insert
#define pb push_back
#define ppb pop_back()
#define d3 ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define cans cout << ans << "\n";
#define yes cout << "Yes" << "\n";
#define no cout << "No" << "\n";
#define pll pair<ll,ll>
#define lin cout << "\n";
#define mid ((l+r)/2)
#define lc (2*x)
#define rc (2*x+1)

using namespace std;

int Declare()
{
  return 2000;
}

std::pair<std::vector<int>, std::vector<int> > Anna(long long A)
{
    ll x = A/3800;
    ll y = A%3800;
    ll mx = max(x,y);
    ll s[mx/2+2] , t[mx/2+2];
    if(x==mx)
        s[0]=t[0]=1;
    else
        s[0]=t[0]=0;
    s[mx/2+1]=t[mx/2+1]=mx%2;
    ll mn = min(x,y);
    for(int i = 1 ; mx/2+1>i ; i++)
    {
        if(mn==0)
            s[i]=0,t[i]=0;
        else if(mn==1)
            s[i]=1,t[i]=0,mn--;
        else
            s[i]=t[i]=1,mn-=2;
    }
    vector<int> v1 , v2;
    for(int i = 0 ; mx/2+2>i ; i++)
        v1.pb(s[i]),v2.pb(t[i]);
    /*for(auto it : v1)
        cout << it << " ";
    lin
    for(auto it : v2)
        cout << it << " ";
    lin*/
    return {v1,v2};
}

Bruno

#include "Bruno.h"
#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#define ll long long
#define F first
#define S second
#define in insert
#define pb push_back
#define ppb pop_back()
#define d3 ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define cans cout << ans << "\n";
#define yes cout << "Yes" << "\n";
#define no cout << "No" << "\n";
#define pll pair<ll,ll>
#define lin cout << "\n";
#define mid ((l+r)/2)
#define lc (2*x)
#define rc (2*x+1)

using namespace std;

long long Bruno(std::vector<int> u)
{
    ll x = 0 , y = 0;
    ll sz = u.size();
    if(u[0])
    {
        x=sz-4+u[sz-1];
        for(auto it : u)
            y+=it;
        y-=2*(u[0]+u[sz-1]);
    }
    else
    {
        y=sz-4+u[sz-1];
        for(auto it : u)
            x+=it;
        x-=2*(u[0]+u[sz-1]);
    }
    ll ans = x*3800 + y;
    //cout << ans << " " << x << " " << y << "\n";
    return ans;
}

详细

Subtask #1:

score: 5
Accepted

Test #1:

score: 5
Accepted
time: 5ms
memory: 3712kb

input:

1000
4
0011
6
000000
6
000101
8
00000000
8
00000101
10
0000000000
10
0000000011
12
000000000000
12
000000000101
14
00000000000000
14
00000000000011
16
0000000000000000
16
0000000000001001
18
000000000000000000
18
000000000000000011
20
00000000000000000000
20
00000000000000000011
22
00000000000000000...

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

input:

1000
1004
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

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

input:

1000
1952
01011111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

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

input:

1000
2802
01011111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

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

input:

1000
2100
01011111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

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

input:

1000
1608
00111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

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: 3712kb

input:

1000
2782
00111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

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: 3840kb

input:

1000
2404
00111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

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

input:

1000
2404
01110111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

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

input:

1000
3578
01011111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

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:


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