QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#383475 | #8564. Three Vectors | bulijiojiodibuliduo# | AC ✓ | 19ms | 6264kb | C++17 | 1.5kb | 2024-04-09 14:42:37 | 2024-04-09 14:42:38 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
#define rep(i,a,n) for (int i=a;i<n;i++)
#define per(i,a,n) for (int i=n-1;i>=a;i--)
#define pb push_back
#define eb emplace_back
#define mp make_pair
#define all(x) (x).begin(),(x).end()
#define fi first
#define se second
#define SZ(x) ((int)(x).size())
typedef vector<int> VI;
typedef basic_string<int> BI;
typedef long long ll;
typedef pair<int,int> PII;
typedef double db;
mt19937 mrand(random_device{}());
const ll mod=1000000007;
int rnd(int x) { return mrand() % x;}
ll powmod(ll a,ll b) {ll res=1;a%=mod; assert(b>=0); for(;b;b>>=1){if(b&1)res=res*a%mod;a=a*a%mod;}return res;}
ll gcd(ll a,ll b) { return b?gcd(b,a%b):a;}
// head
const int N=101000;
char s[N];
int n;
int b[N],v[N];
map<int,int> hs;
vector<PII> ret;
void add(int x,int y) {
// x->y
ret.pb(mp(-x,y));
}
int main() {
scanf("%d",&n);
rep(i,0,3) {
scanf("%s",s);
rep(j,1,n+1) b[j]=b[j]*2+(s[j-1]-'0');
}
rep(i,1,n+1) {
v[i]=i;
if (b[i]>=4) v[i]=-i,b[i]=7-b[i];;
if (b[i]==0) add(v[i],-v[i]);
else if (hs.count(b[i])) {
add(hs[b[i]],v[i]);
add(-hs[b[i]],-v[i]);
} else {
hs[b[i]]=v[i];
}
}
assert(SZ(hs)>=2&&SZ(hs)<=3);
int p001=hs[1],p010=hs[2],p011=hs[3];
if (p011==0) {
add(p001,-p010);
} else if (p001==0) {
add(p010,p011);
} else if (p010==0) {
add(p001,p011);
} else {
add(p001,-p010);
add(p001,p011);
add(p010,p011);
//fprintf(stderr,"4\n");
}
printf("%d\n",SZ(ret));
for (auto [x,y]:ret) printf("%d %d\n",x,y);
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 0ms
memory: 3784kb
input:
5 00101 10011 11011
output:
6 -1 -3 1 3 -1 4 1 -4 5 5 -2 1
result:
ok seems working
Test #2:
score: 0
Accepted
time: 0ms
memory: 3788kb
input:
3 100 010 001
output:
3 -3 -2 -3 -1 -2 -1
result:
ok seems working
Test #3:
score: 0
Accepted
time: 0ms
memory: 3816kb
input:
2 00 10 01
output:
1 -2 -1
result:
ok seems working
Test #4:
score: 0
Accepted
time: 0ms
memory: 3784kb
input:
2 11 10 01
output:
1 1 2
result:
ok seems working
Test #5:
score: 0
Accepted
time: 11ms
memory: 5068kb
input:
100000 00100110101100111101101011100010001010101100101000100000011100011010111111100001101100110111111100100000011001000101111111000000100011100100100101010101011110011100100101010111010111111001010011010010111101001100000110101110111110101101010100110111000010010000011000111110111010001100101101001...
output:
99999 -1 -1 -2 -2 3 3 -4 -4 -5 -5 6 6 7 7 -8 -8 9 9 -10 -10 11 11 12 12 -13 -13 -14 -14 15 15 16 16 17 17 18 18 -19 -19 20 20 21 21 -22 -22 23 23 -24 -24 25 25 26 26 27 27 -28 -28 -29 -29 -30 -30 31 31 -32 -32 -33 -33 -34 -34 35 35 -36 -36 37 37 -38 -38 39 39 -40 -40 41 41 42 42 -43 -43 -44 -44 45 4...
result:
ok seems working
Test #6:
score: 0
Accepted
time: 7ms
memory: 5024kb
input:
100000 00100101110111001111001100001110000110100001010101100011000010101101000110100010001111011100010110011010011100101010110000111010100011010011010011110100100000110101010111000001000001000110101000111100001001111101111100000100100000100110101000001110001000010000000111010111101010001111101010100...
output:
100000 -1 -1 -2 -2 3 3 -4 -4 -5 -5 6 6 -7 -7 8 8 9 9 10 10 -11 -11 12 12 13 13 14 14 -15 -15 -16 -16 17 17 18 18 19 19 20 20 -21 -21 -22 -22 23 23 24 24 -25 -25 -26 -26 -27 -27 -28 -28 29 29 30 30 31 31 -32 -32 -33 -33 -34 -34 -35 -35 36 36 37 37 -38 -38 39 39 -40 -40 -41 -41 -42 -42 -43 -43 44 44 -...
result:
ok seems working
Test #7:
score: 0
Accepted
time: 11ms
memory: 5144kb
input:
100000 00100101101101111000000100110000111011111001100110000011011011010110011000001010101100101010011010000101110111011001101101101101000111101100101011001100111000010100001111010011000011100011000001101001110100011101111001010110010010110100111101101100110001010111001001000100100100111000000000110...
output:
107392 -2 -2 3 3 -4 -4 -5 -5 6 6 -7 -7 8 8 9 9 -10 -10 11 11 12 12 -13 -13 14 14 15 15 16 16 17 17 -18 -18 -19 -19 -20 -20 -21 -21 -22 -22 -23 -23 24 24 -25 -25 -26 -26 27 27 28 28 -29 -29 -30 -30 -31 -31 -32 -32 33 33 34 34 35 35 -36 -36 37 37 38 38 39 39 40 40 41 41 -42 -42 -43 -43 44 44 45 45 -1 ...
result:
ok seems working
Test #8:
score: 0
Accepted
time: 9ms
memory: 4852kb
input:
50000 110110001100100000100010010100011011111110101110001001000010111110001101000000101111100011111000000110110110010000010100110100111000001110001001011100000101101000110111010110100000000111100100101011011101011011010100100111110010000001101010010000110001110110111001100011011110110100001000100111...
output:
99997 1 -2 -1 2 1 3 -1 -3 1 -4 -1 4 1 -5 -1 5 1 6 -1 -6 1 7 -1 -7 1 8 -1 -8 1 -9 -1 9 1 -10 -1 10 1 11 -1 -11 1 12 -1 -12 1 -13 -1 13 1 14 -1 -14 1 15 -1 -15 1 16 -1 -16 1 17 -1 -17 1 18 -1 -18 1 -19 -1 19 1 20 -1 -20 1 21 -1 -21 1 22 -1 -22 1 -23 -1 23 1 24 -1 -24 1 25 -1 -25 1 -26 -1 26 1 27 -1 -2...
result:
ok seems working
Test #9:
score: 0
Accepted
time: 14ms
memory: 6260kb
input:
100000 10101111001011101000111110001010000000000010011100111111011011011111000000100101010101010001101001001110011100100011110111011010101001110101000100111101110010010100000101000111001011101001111100000110011010001001111000100000110100111111101110001000011110101010111111011000010101001001001110010...
output:
199997 1 2 -1 -2 1 -3 -1 3 1 4 -1 -4 1 -5 -1 5 1 -6 -1 6 1 -7 -1 7 1 -8 -1 8 1 9 -1 -9 1 10 -1 -10 1 -11 -1 11 1 12 -1 -12 1 -13 -1 13 1 -14 -1 14 1 -15 -1 15 1 16 -1 -16 1 -17 -1 17 1 18 -1 -18 1 19 -1 -19 1 20 -1 -20 1 -21 -1 21 1 -22 -1 22 1 -23 -1 23 1 -24 -1 24 1 -25 -1 25 1 26 -1 -26 1 27 -1 -...
result:
ok seems working
Test #10:
score: 0
Accepted
time: 6ms
memory: 4952kb
input:
50000 000000000101011011111011001000001110001100100110001000101000001111110010001010111000001110101100010010011111001000111001000011101010001011110110110011111100110100011010001011100011001100010100010010101110110001110010111101000001100010000011111010000011010111001001011000000101100011111110110111...
output:
99995 -1 2 1 -2 -1 3 1 -3 -4 5 4 -5 -4 6 4 -6 -1 8 1 -8 -4 9 4 -9 -1 -10 1 10 -1 11 1 -11 -1 -12 1 12 -4 13 4 -13 -7 -14 7 14 -1 -15 1 15 -7 16 7 -16 -1 -17 1 17 -1 -18 1 18 -7 -19 7 19 -1 -20 1 20 -4 -21 4 21 -7 22 7 -22 -7 -23 7 23 -4 -24 4 24 -7 25 7 -25 -1 26 1 -26 -4 -27 4 27 -7 28 7 -28 -1 29 ...
result:
ok seems working
Test #11:
score: 0
Accepted
time: 15ms
memory: 6172kb
input:
100000 11010100010001011000000010101111101011110111111101101101100101101011011000010001001010110001100011010001110110000111100101100100100110100000111000100110010011001011110111001011000110010101000100010101110001100110110011100000101111110001000010000111111101010110000011100011111000000011011101111...
output:
199996 2 3 -2 -3 1 -4 -1 4 1 5 -1 -5 2 -6 -2 6 2 7 -2 -7 1 8 -1 -8 1 -10 -1 10 -9 11 9 -11 1 12 -1 -12 2 13 -2 -13 1 -14 -1 14 -9 15 9 -15 1 -16 -1 16 2 -17 -2 17 -9 18 9 -18 -9 19 9 -19 1 20 -1 -20 1 21 -1 -21 1 22 -1 -22 -9 23 9 -23 2 24 -2 -24 -9 -25 9 25 -9 26 9 -26 -9 -27 9 27 -9 28 9 -28 -9 -2...
result:
ok seems working
Test #12:
score: 0
Accepted
time: 5ms
memory: 4096kb
input:
22358 110100001010010001000001000010001101011001010000011100100101011100001111111011000001011010100101001111001101000100100100101011110100001110101111010100110000000011111111111001101111101001010010100010011001001010111110110110101000011010111110110110011111110000100111000000001001111110110000100010...
output:
43367 1 1 -3 -4 3 4 2 5 -2 -5 -3 6 3 -6 -3 7 3 -7 -3 8 3 -8 -3 -9 3 9 -3 10 3 -10 -3 -11 3 11 -3 13 3 -13 -3 -14 3 14 -3 15 3 -15 -16 -16 2 17 -2 -17 18 18 -19 -19 -3 20 3 -20 -12 21 12 -21 2 22 -2 -22 -12 23 12 -23 -3 -24 3 24 -3 25 3 -25 2 26 -2 -26 2 27 -2 -27 -3 28 3 -28 -3 -29 3 29 -3 30 3 -30 ...
result:
ok seems working
Test #13:
score: 0
Accepted
time: 15ms
memory: 6264kb
input:
100000 11011110010100101000111100110111000010011000111010110100101010000110010101011010010110101001100011101100100011100011010101000010011010101011111100100011000111111101100110111010100100100111111000000010100001011110000011111000011010101000101111011110011011011000100010011110001101011000100011000...
output:
139125 1 1 2 2 -3 -3 5 -6 -5 6 4 -7 -4 7 -8 -8 -9 -9 10 10 -11 -11 12 12 -13 -13 4 14 -4 -14 5 -15 -5 15 17 17 -16 18 16 -18 -19 -19 4 20 -4 -20 21 21 22 22 4 -23 -4 23 5 -24 -5 24 5 25 -5 -25 4 26 -4 -26 5 -27 -5 27 28 28 -29 -29 30 30 31 31 32 32 -33 -33 -34 -34 -35 -35 -36 -36 37 37 4 38 -4 -38 -...
result:
ok seems working
Test #14:
score: 0
Accepted
time: 14ms
memory: 6108kb
input:
100000 10000100100100110000010111101010100111100110001010011001011001010001001000110001010000110011011110110000010001010110100000010111000000000100000110001010111011110111011100010000010011011010111100111010000011100000110001100110100110001000011110000010100111001100010001101000000010011010110111111...
output:
189392 -2 3 2 -3 -2 5 2 -5 -2 -6 2 6 -4 7 4 -7 -8 -8 -4 -9 4 9 -2 10 2 -10 -4 11 4 -11 -2 -12 2 12 -2 13 2 -13 -4 14 4 -14 -2 -15 2 15 -2 -16 2 16 -17 -17 -2 18 2 -18 -4 19 4 -19 -20 -20 -4 21 4 -21 -2 -22 2 22 -23 -23 -4 -24 4 24 -2 -25 2 25 -2 -26 2 26 -4 -27 4 27 -4 28 4 -28 -2 -29 2 29 -4 30 4 -...
result:
ok seems working
Test #15:
score: 0
Accepted
time: 19ms
memory: 6192kb
input:
100000 10111111001100101110000100001011100100000001011001100111011110010101100111110100010100110100011101110111000110011111111110111000111001111001001100111001011111111001001010011000100001001000100010101111010001010010011001110100100111110001000111000100000011010110110011100110111111010010111110001...
output:
196062 1 2 -1 -2 4 -5 -4 5 4 -6 -4 6 4 -7 -4 7 3 -8 -3 8 4 9 -4 -9 4 10 -4 -10 1 -11 -1 11 1 -12 -1 12 3 13 -3 -13 4 14 -4 -14 1 -15 -1 15 4 16 -4 -16 4 -17 -4 17 1 -18 -1 18 4 -19 -4 19 1 20 -1 -20 1 21 -1 -21 1 22 -1 -22 4 23 -4 -23 1 -24 -1 24 4 25 -4 -25 4 26 -4 -26 1 27 -1 -27 4 28 -4 -28 4 -29...
result:
ok seems working
Test #16:
score: 0
Accepted
time: 7ms
memory: 5132kb
input:
100000 11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...
output:
100000 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 18 19 19 20 20 21 21 22 22 23 23 24 24 25 25 26 26 27 27 28 28 29 29 30 30 31 31 32 32 33 33 34 34 35 35 36 36 37 37 38 38 39 39 40 40 41 41 42 42 43 43 44 44 45 45 46 46 47 47 48 48 49 49 50 50 51 51 52 52...
result:
ok seems working
Test #17:
score: 0
Accepted
time: 10ms
memory: 5160kb
input:
100000 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...
output:
100000 -1 -1 -2 -2 -3 -3 -4 -4 -5 -5 -6 -6 -7 -7 -8 -8 -9 -9 -10 -10 -11 -11 -12 -12 -13 -13 -14 -14 -15 -15 -16 -16 -17 -17 -18 -18 -19 -19 -20 -20 -21 -21 -22 -22 -23 -23 -24 -24 -25 -25 -26 -26 -27 -27 -28 -28 -29 -29 -30 -30 -31 -31 -32 -32 -33 -33 -34 -34 -35 -35 -36 -36 -37 -37 -38 -38 -39 -39...
result:
ok seems working
Test #18:
score: 0
Accepted
time: 10ms
memory: 5040kb
input:
50000 110011011011101000111011011011011100111000100101100100100000100000101101010000011001111000011110001001110101111111100111001011101011110000000101100110100100110110011010110000000010101000101100001011100101011110000111011011000110111001010101100010000010010100010010010010000111011011110111000010...
output:
99997 1 -2 -1 2 1 3 -1 -3 1 4 -1 -4 5 -6 -5 6 1 7 -1 -7 8 -9 -8 9 1 10 -1 -10 5 -11 -5 11 1 -12 -1 12 1 -13 -1 13 8 14 -8 -14 5 -15 -5 15 8 16 -8 -16 5 17 -5 -17 1 18 -1 -18 5 -19 -5 19 1 -20 -1 20 8 -21 -8 21 8 22 -8 -22 8 -23 -8 23 1 -24 -1 24 1 25 -1 -25 5 -26 -5 26 1 -27 -1 27 8 28 -8 -28 8 -29 ...
result:
ok seems working
Test #19:
score: 0
Accepted
time: 10ms
memory: 4828kb
input:
50000 011010100010111011011111001111011111100101010101110101101000110111001111001111001010001111010011100100000011000010100110001100001111101101000001110101110101100100101011000110100100110011011010111011001011011111000101110111111001101111000100010000001111111010010010111001011111110010100111010001...
output:
99997 -1 -2 1 2 -1 -3 1 3 -1 -5 1 5 -1 6 1 -6 7 8 -7 -8 -1 9 1 -9 -1 10 1 -10 7 -11 -7 11 7 12 -7 -12 7 -13 -7 13 -1 -14 1 14 7 -15 -7 15 7 16 -7 -16 -1 -17 1 17 -4 -18 4 18 7 19 -7 -19 -4 -20 4 20 7 -21 -7 21 -1 -22 1 22 -1 -23 1 23 -1 -24 1 24 -1 25 1 -25 -4 26 4 -26 7 -27 -7 27 -1 -28 1 28 -4 -29...
result:
ok seems working
Test #20:
score: 0
Accepted
time: 17ms
memory: 6084kb
input:
97860 011011000101100001111011100101000011001010110111011010100011101111010101000011000100000001111011011001010000001110101111101110010110100110010001000011000000100000000101101110101101101011100100111110111000000110010000001110100111011100011010001000100110011100001110001011110111110000111010111000...
output:
173771 -1 -3 1 3 2 4 -2 -4 -1 -5 1 5 -1 -6 1 6 -1 7 1 -7 2 8 -2 -8 -9 -9 2 -10 -2 10 -1 11 1 -11 -1 -12 1 12 -1 -13 1 13 -1 14 1 -14 -15 -15 -1 16 1 -16 2 17 -2 -17 19 19 -1 -20 1 20 2 -21 -2 21 2 22 -2 -22 23 23 -1 -24 1 24 18 -25 -18 25 2 26 -2 -26 -27 -27 2 -28 -2 28 -1 29 1 -29 30 30 18 31 -18 -...
result:
ok seems working
Test #21:
score: 0
Accepted
time: 7ms
memory: 4884kb
input:
36234 101111110101000010100011011010100101110010100101110010000110111011000011110101001101111011001001010010101100100111101110111111000100011110011110011101011100100110110111010001010100010111001001000111110110111111011011001100111001101010011000000000010000001100001001101110101110011101000110000110...
output:
70888 1 2 -1 -2 1 -4 -1 4 1 -5 -1 5 1 -6 -1 6 3 -7 -3 7 1 -8 -1 8 1 9 -1 -9 1 -10 -1 10 1 11 -1 -11 1 -12 -1 12 1 13 -1 -13 1 14 -1 -14 1 15 -1 -15 1 16 -1 -16 1 -17 -1 17 1 18 -1 -18 1 -19 -1 19 1 20 -1 -20 1 22 -1 -22 1 -23 -1 23 1 -24 -1 24 -25 -25 1 -26 -1 26 1 -27 -1 27 1 28 -1 -28 1 -29 -1 29 ...
result:
ok seems working
Test #22:
score: 0
Accepted
time: 6ms
memory: 4248kb
input:
29183 010001101101000101101101000010010100111000101011110111100001001011010111110100110000111011011000111001000101010101110000001100010001100101111110110110100000010000001111011100001110110001111001101011010111000101011111111110101011111110010010101111100111111111001000101001101110110001110110101001...
output:
56283 -1 -1 2 4 -2 -4 2 5 -2 -5 2 -6 -2 6 2 -7 -2 7 2 8 -2 -8 2 -9 -2 9 -3 -10 3 10 -3 11 3 -11 2 -12 -2 12 2 13 -2 -13 2 14 -2 -14 2 15 -2 -15 2 -16 -2 16 -3 17 3 -17 2 -18 -2 18 2 -19 -2 19 2 20 -2 -20 2 -21 -2 21 2 -22 -2 22 2 23 -2 -23 2 -24 -2 24 -25 26 25 -26 2 27 -2 -27 -25 28 25 -28 2 -29 -2...
result:
ok seems working
Test #23:
score: 0
Accepted
time: 3ms
memory: 4128kb
input:
13881 001001000100001001010010110101110010110111100100100001011011000001111001000111101000111111011101100000001100100001000001001110101100101100100100111010100111100101100111101001011011001101100010110010110110010100011100110000011101011101011001000100000011111101110101001100000011101101110001011011...
output:
27646 -1 2 1 -2 -1 -3 1 3 -1 4 1 -4 -1 -6 1 6 -1 8 1 -8 -1 9 1 -9 -1 -10 1 10 -1 11 1 -11 -1 12 1 -12 -1 13 1 -13 -1 14 1 -14 -1 -15 1 15 -1 16 1 -16 -1 17 1 -17 -1 -18 1 18 -1 19 1 -19 -1 -20 1 20 -1 21 1 -21 -1 22 1 -22 -1 -23 1 23 -1 24 1 -24 -1 -25 1 25 -1 -26 1 26 -1 27 1 -27 -1 -28 1 28 -1 29 ...
result:
ok seems working
Test #24:
score: 0
Accepted
time: 18ms
memory: 6060kb
input:
100000 11000001011001111110101001011111100011010110110111110100110110001001010001001101101011001101001110101110100100010011110101111101101001100011011100111111010011010011011010111011101011100001011100101000101001101101100111100110010010011011000000101010100101100110010011110010111110011101000101101...
output:
199997 1 -2 -1 2 1 3 -1 -3 1 4 -1 -4 1 5 -1 -5 1 6 -1 -6 1 7 -1 -7 1 -8 -1 8 1 9 -1 -9 1 -10 -1 10 1 -11 -1 11 1 12 -1 -12 1 13 -1 -13 1 -14 -1 14 1 -15 -1 15 1 -16 -1 16 1 -17 -1 17 1 -18 -1 18 1 -19 -1 19 1 20 -1 -20 1 -21 -1 21 1 22 -1 -22 1 -23 -1 23 1 24 -1 -24 1 25 -1 -25 1 -26 -1 26 1 27 -1 -...
result:
ok seems working
Test #25:
score: 0
Accepted
time: 18ms
memory: 6180kb
input:
100000 01101111100100100011110100011111110101111001100010111110011011100110001001010011001010111110110100110100010010010010101011101110001010101011111101111001000011001010111101110100101111110111011000110001000000110100000011101100111110000011010101110011010011010011001110001010001010100011010001101...
output:
199997 -1 -2 1 2 -1 -3 1 3 -1 4 1 -4 -1 -5 1 5 -1 -6 1 6 -1 -7 1 7 -1 -8 1 8 -1 -9 1 9 -1 10 1 -10 -1 11 1 -11 -1 -12 1 12 -1 13 1 -13 -1 14 1 -14 -1 -15 1 15 -1 16 1 -16 -1 17 1 -17 -1 18 1 -18 -1 -19 1 19 -1 -20 1 20 -1 -21 1 21 -1 -22 1 22 -1 23 1 -23 -1 -24 1 24 -1 25 1 -25 -1 26 1 -26 -1 27 1 -...
result:
ok seems working
Test #26:
score: 0
Accepted
time: 1ms
memory: 3920kb
input:
2904 1001001111100100001111110111001100100011101111000001010000010110010010110111011110111010100010111011100000000001000101001010110111110010001010011111101011101010110011100101001001111000100011110011001110111010110001000101010101010010101110111101000011011111100000101100011001110100001001100111100...
output:
5447 1 2 -1 -2 1 3 -1 -3 1 -4 -1 4 1 5 -1 -5 -6 -6 1 -7 -1 7 1 -8 -1 8 1 -9 -1 9 1 -10 -1 10 1 -11 -1 11 1 12 -1 -12 1 13 -1 -13 1 -14 -1 14 1 15 -1 -15 1 16 -1 -16 1 17 -1 -17 1 18 -1 -18 1 -19 -1 19 20 20 1 -21 -1 21 1 -22 -1 22 1 -23 -1 23 1 -24 -1 24 1 25 -1 -25 1 -26 -1 26 1 -27 -1 27 1 -28 -1 ...
result:
ok seems working
Test #27:
score: 0
Accepted
time: 0ms
memory: 3872kb
input:
45 000110110001000100100101101101000110101100010 010001110010011110101010110010111000001111000 000110110001100100100101101100000110101000010
output:
71 -1 -1 -3 -3 -2 -4 2 4 -2 -5 2 5 -2 6 2 -6 7 7 8 8 -9 -9 -10 -10 -2 11 2 -11 -2 -12 2 12 -2 14 2 -14 -2 15 2 -15 16 16 -2 17 2 -17 -18 -18 19 19 -20 -20 -2 21 2 -21 -2 -22 2 22 -2 23 2 -23 -2 -24 2 24 25 25 -2 26 2 -26 -2 -27 2 27 -2 -28 2 28 -2 29 2 -29 -2 31 2 -31 -2 32 2 -32 -2 33 2 -33 -2 -34 ...
result:
ok seems working
Test #28:
score: 0
Accepted
time: 0ms
memory: 3784kb
input:
66 011101011011110001100010110001101100000100100101101100011110111010 011001011001101111001010110011111100001000000000101100001101001011 100100101010110000100111111101001001010111110111001011110010110100
output:
114 -1 -2 1 2 -1 -3 1 3 -5 -5 -1 -6 1 6 -1 7 1 -7 -1 -8 1 8 9 9 -10 -10 4 -11 -4 11 -1 -12 1 12 13 13 4 -14 -4 14 4 15 -4 -15 4 16 -4 -16 4 17 -4 -17 -1 -18 1 18 4 -19 -4 19 -20 -20 4 21 -4 -21 -1 22 1 -22 23 23 -1 24 1 -24 25 25 26 26 -1 27 1 -27 -1 28 1 -28 4 29 -4 -29 30 30 -1 -31 1 31 4 32 -4 -3...
result:
ok seems working
Test #29:
score: 0
Accepted
time: 0ms
memory: 3812kb
input:
3 010 100 011
output:
3 -1 -2 1 2 -3 -1
result:
ok seems working
Test #30:
score: 0
Accepted
time: 0ms
memory: 4056kb
input:
4 0111 1000 1100
output:
5 -1 -3 1 3 -1 -4 1 4 2 1
result:
ok seems working
Test #31:
score: 0
Accepted
time: 0ms
memory: 4072kb
input:
8 10101101 01001110 01000110
output:
11 1 2 -1 -2 1 -3 -1 3 -4 -4 6 6 1 7 -1 -7 1 -8 -1 8 5 -1
result:
ok seems working
Test #32:
score: 0
Accepted
time: 0ms
memory: 3776kb
input:
4 1011 0000 1100
output:
5 3 -4 -3 4 -2 1 -2 -3 1 -3
result:
ok seems working
Test #33:
score: 0
Accepted
time: 0ms
memory: 3812kb
input:
4 0101 1010 1110
output:
5 -1 3 1 -3 -1 -4 1 4 2 1
result:
ok seems working
Test #34:
score: 0
Accepted
time: 0ms
memory: 4076kb
input:
2 01 10 11
output:
1 2 1
result:
ok seems working
Test #35:
score: 0
Accepted
time: 1ms
memory: 4032kb
input:
4498 0001001011111111100010011110100111000001010110011101111110011001000010010101010111111000101010111011000101011110010000001101011101001001110111000001111010000010001111101000111110111011100010111001010010011011010000001000100100101000000111110101000100111001001000111011111000110100000000100101111...
output:
8078 -2 -2 -1 3 1 -3 -5 -5 -1 6 1 -6 7 7 -1 8 1 -8 -1 -9 1 9 10 10 -1 -11 1 11 4 -12 -4 12 -1 -13 1 13 -1 -14 1 14 15 15 4 -16 -4 16 -1 -17 1 17 -18 -18 -1 19 1 -19 4 20 -4 -20 -1 -21 1 21 -22 -22 -1 23 1 -23 4 -24 -4 24 -1 -25 1 25 -1 -26 1 26 27 27 -1 28 1 -28 4 -29 -4 29 -1 30 1 -30 -31 -31 4 -32...
result:
ok seems working
Test #36:
score: 0
Accepted
time: 4ms
memory: 4108kb
input:
19795 001110000111101000111111011111000110000011101011000110010111111001001100011000010101010011111111010101011010100010110100110001111001011010011100001111100001010001111010010001010000110110110111001001101111000001111000101110100011011000001011011101110001110110111100101111000010010000000100101100...
output:
39586 -1 2 1 -2 -1 -3 1 3 -1 -4 1 4 -1 -5 1 5 -1 6 1 -6 -1 7 1 -7 -1 8 1 -8 -1 -10 1 10 -1 -11 1 11 -1 -12 1 12 -1 -13 1 13 -9 14 9 -14 -1 -15 1 15 -9 16 9 -16 -9 17 9 -17 -9 18 9 -18 -1 -19 1 19 -1 -20 1 20 -1 -21 1 21 -1 -22 1 22 -9 -23 9 23 -9 -24 9 24 -9 25 9 -25 -1 -26 1 26 -1 -27 1 27 -1 -28 1...
result:
ok seems working
Test #37:
score: 0
Accepted
time: 13ms
memory: 4964kb
input:
65012 110100100101000010100001100100111001000100110001011110101101011100101111111111111011110100001010011110010001010001001110101000011100111100100011011010101000100101010100101111001100100010001101001110000001100001001110000100010100110100111111101010010000110100000010100010100001100110011010100010...
output:
128828 1 -2 -1 2 -3 -4 3 4 1 5 -1 -5 -3 6 3 -6 1 -7 -1 7 -3 8 3 -8 -3 9 3 -9 -3 -10 3 10 -3 11 3 -11 -3 -12 3 12 -3 13 3 -13 -3 14 3 -14 -3 15 3 -15 -3 16 3 -16 -3 -17 3 17 -3 -19 3 19 -18 20 18 -20 -3 21 3 -21 -3 22 3 -22 -3 23 3 -23 -3 -24 3 24 1 -25 -1 25 -26 -26 -3 27 3 -27 -18 -28 18 28 -3 29 3...
result:
ok seems working
Test #38:
score: 0
Accepted
time: 3ms
memory: 4008kb
input:
12684 010011100110100000110001011101101111010111101100000110101001110111101000001011110110100001011001101101011111001011000000111000010011010001110000110100101101111011010111000000000100100010000001110000011001010110010101000000101101101111011111000111000111001000001010100010110101000100100011011110...
output:
25166 2 3 -2 -3 -1 4 1 -4 -1 -5 1 5 -1 -6 1 6 -1 -7 1 7 2 8 -2 -8 2 9 -2 -9 -1 -10 1 10 -1 -11 1 11 -1 12 1 -12 2 -13 -2 13 2 14 -2 -14 2 15 -2 -15 -1 16 1 -16 2 18 -2 -18 2 -19 -2 19 -1 -20 1 20 2 21 -2 -21 2 22 -2 -22 2 23 -2 -23 24 24 -1 25 1 -25 -1 -26 1 26 -17 -27 17 27 2 -28 -2 28 -1 29 1 -29 ...
result:
ok seems working
Test #39:
score: 0
Accepted
time: 4ms
memory: 4128kb
input:
22037 100111101010000011001110110110110100111000001000111111001010110001011110110011100110110011101001100100010000000001100111000000110101101010100011000011000110111110100001101101010010000100010111010010110111000010111110110111000101111100110011001011000001001100100100100100101111001001101110111110...
output:
43879 1 2 -1 -2 1 3 -1 -3 1 -5 -1 5 1 -6 -1 6 4 -7 -4 7 4 8 -4 -8 1 -9 -1 9 4 10 -4 -10 4 -11 -4 11 1 12 -1 -12 4 13 -4 -13 4 14 -4 -14 1 15 -1 -15 4 16 -4 -16 4 -17 -4 17 1 -18 -1 18 4 19 -4 -19 1 20 -1 -20 1 -21 -1 21 4 -22 -4 22 4 -23 -4 23 4 24 -4 -24 4 -25 -4 25 1 -26 -1 26 4 27 -4 -27 1 -28 -1...
result:
ok seems working