QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#877602#3507. Broken Device 2De3b0o#5 3ms3840kbC++202.2kb2025-01-31 23:39:272025-01-31 23:39:27

Judging History

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

  • [2025-01-31 23:39:27]
  • 评测
  • 测评结果:5
  • 用时:3ms
  • 内存:3840kb
  • [2025-01-31 23:39:27]
  • 提交

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/3200;
    ll y = A%3200;
    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*3200 + y;
    //cout << ans << " " << x << " " << y << "\n";
    return ans;
}

详细

Subtask #1:

score: 5
Accepted

Test #1:

score: 5
Accepted
time: 3ms
memory: 3840kb

input:

1000
4
0011
6
000000
6
000011
8
00000000
8
00000011
10
0000000000
10
0000001001
12
000000000000
12
000000000011
14
00000000000000
14
00000000001001
16
0000000000000000
16
0000000000000101
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: 3ms
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: 0
Wrong Answer

Test #3:

score: 0
Wrong Answer
time: 2ms
memory: 3840kb

input:

1000
1752
00111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

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:


result:

wrong output format Unexpected end of file - int32 expected

Subtask #3:

score: 0
Skipped

Subtask #4:

score: 0
Skipped

Subtask #5:

score: 0
Skipped

Subtask #6:

score: 0
Skipped