QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#877612 | #3507. Broken Device 2 | De3b0o# | 5 | 11ms | 3968kb | C++20 | 2.2kb | 2025-01-31 23:43:07 | 2025-01-31 23:43:08 |
Judging History
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/3996;
ll y = A%3996;
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*3996 + y;
//cout << ans << " " << x << " " << y << "\n";
return ans;
}
详细
Subtask #1:
score: 5
Accepted
Test #1:
score: 5
Accepted
time: 5ms
memory: 3968kb
input:
1000 4 0101 6 000000 6 000101 8 00000000 8 00000101 10 0000000000 10 0000001001 12 000000000000 12 000000000011 14 00000000000000 14 00000000000011 16 0000000000000000 16 0000000000010001 18 000000000000000000 18 000000000000000011 20 00000000000000000000 20 00000000000000000101 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: 6ms
memory: 3712kb
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: 5
Accepted
time: 11ms
memory: 3840kb
input:
1000 2544 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: 0
Wrong Answer
time: 9ms
memory: 3840kb
input:
1000 3250 00111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...
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:
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