QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#407465#6529. Alice, Bob and Circuitstegatxins0#4 76ms12852kbC++172.1kb2024-05-08 19:00:502024-05-08 19:00:51

Judging History

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

  • [2024-05-08 19:00:51]
  • 评测
  • 测评结果:4
  • 用时:76ms
  • 内存:12852kb
  • [2024-05-08 19:00:50]
  • 提交

answer

#include "abc.h"

// you may find the definitions useful
const int OP_ZERO    = 0;  // f(OP_ZERO,    x0, x1) = 0
const int OP_NOR     = 1;  // f(OP_NOR,     x0, x1) = !(x0 || x1)
const int OP_GREATER = 2;  // f(OP_GREATER, x0, x1) = (x0 > x1)
const int OP_NOT_X1  = 3;  // f(OP_NOT_X1,  x0, x1) = !x1
const int OP_LESS    = 4;  // f(OP_LESS,    x0, x1) = (x0 < x1)
const int OP_NOT_X0  = 5;  // f(OP_NOT_X0,  x0, x1) = !x0
const int OP_XOR     = 6;  // f(OP_XOR,     x0, x1) = (x0 ^ x1)
const int OP_NAND    = 7;  // f(OP_NAND,    x0, x1) = !(x0 && x1)
const int OP_AND     = 8;  // f(OP_AND,     x0, x1) = (x0 && x1)
const int OP_EQUAL   = 9;  // f(OP_EQUAL,   x0, x1) = (x0 == x1)
const int OP_X0      = 10; // f(OP_X0,      x0, x1) = x0
const int OP_GEQ     = 11; // f(OP_GEQ,     x0, x1) = (x0 >= x1)
const int OP_X1      = 12; // f(OP_X1,      x0, x1) = x1
const int OP_LEQ     = 13; // f(OP_LEQ,     x0, x1) = (x0 <= x1)
const int OP_OR      = 14; // f(OP_OR,      x0, x1) = (x0 || x1)
const int OP_ONE     = 15; // f(OP_ONE,     x0, x1) = 1


// Alice
int // returns la
alice(
    /*  in */ const int n,
    /*  in */ const char names[][5],
    /*  in */ const unsigned short numbers[],
    /* out */ bool outputs_alice[]
) {
    outputs_alice[0] = 1;
    outputs_alice[1] = 0;
    return 2;
}


// Bob
int // returns lb
bob(
    /*  in */ const int m,
    /*  in */ const char senders[][5],
    /*  in */ const char recipients[][5],
    /* out */ bool outputs_bob[]
) {
    outputs_bob[0] = 1;
    outputs_bob[1] = 1;
    outputs_bob[2] = 0;
    return 3;
}


// Circuit
int // returns l
circuit(
    /*  in */ const int la,
    /*  in */ const int lb,
    /* out */ int operations[],
    /* out */ int operands[][2],
    /* out */ int outputs_circuit[][16]
) {
    operations[5] = 8;
    operations[6] = 14;
    operands[5][0] = 0; operands[5][1] = 4;
    operands[6][0] = 2; operands[6][1] = 5;
    int final_results = 0;
    for(int j = 0; j < 16; ++j)
        outputs_circuit[0][j] = 5 + (final_results >> j & 1);
    return 7;
}

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 4
Accepted

Test #1:

score: 4
Accepted
time: 1ms
memory: 3728kb

Manager to Alice

Hello
1
m 24780
nzy 52939
tm 29958
iuj 64676
umeq 3500
shh 4229
y 12233
bq 63191
jzt 56793
t 48748
a 4365
pf 872
dlr 64046
vq 784
pzsc 44311
aaza 2656
y 55455
nru 19207
ic 59468
ztv 18363
ab 20822
ov 61699
yjyx 33953
yv 47740
zj 34266
wvlb 25668
xc 29514
ad 64127
gsd 13272
g 45279
hhlw 6505
ag 18873...

Alice to Manager

235fc77fd78da210d6b5a61b92603c4f
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10

Manager to Bob

Hello
0




























































Goodbye

Bob to Manager

235fc77fd78da210d6b5a61b92603c4f
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110

Manager to Circuit

Hello
2
3
1
m 24780
nzy 52939
tm 29958
iuj 64676
umeq 3500
shh 4229
y 12233
bq 63191
jzt 56793
t 48748
a 4365
pf 872
dlr 64046
vq 784
pzsc 44311
aaza 2656
y 55455
nru 19207
ic 59468
ztv 18363
ab 20822
ov 61699
yjyx 33953
yv 47740
zj 34266
wvlb 25668
xc 29514
ad 64127
gsd 13272
g 45279
hhlw 6505
ag 1...

Circuit to Manager

Circuit Output Finished.
235fc77fd78da210d6b5a61b92603c4f
Correct!

Manager to Checker

1

result:

ok OK

Subtask #2:

score: 0
Wrong Answer

Test #2:

score: 0
Wrong Answer
time: 1ms
memory: 3928kb

Manager to Alice

Hello
1
aia 19127
n 29030
il 22631
fquf 5479
p 37792
ce 15312
g 63412
dcx 35910
d 27742
qzf 54298
heta 63173
kh 1090
e 43241
qhq 8146
odhu 25059
dsw 15423
xtbx 2259
yz 1711
yk 18847
atv 56007
twqn 28249
hha 59454
u 5985
b 41493
st 38512
o 34385
uzl 43346
bvmo 12586
t 64101
xops 7214
iz 53638
a 25206...

Alice to Manager

235fc77fd78da210d6b5a61b92603c4f
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10

Manager to Bob

Hello
1
aia aia
n n
il il
fquf fquf
p p
ce ce
g g
dcx dcx
d d
qzf qzf
heta heta
kh kh
e e
qhq qhq
odhu odhu
dsw dsw
xtbx xtbx
yz yz
yk yk
atv atv
twqn twqn
hha hha
u u
b b
st st
o o
uzl uzl
bvmo bvmo
t t
xops xops
iz iz
a a
n n
sulk sulk
jwdo jwdo
rz rz
gcdd gcdd
ylle ylle
dqw dqw
ti ti
zatn zatn
tx...

Bob to Manager

235fc77fd78da210d6b5a61b92603c4f
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110

Manager to Circuit

Hello
2
3
1
aia 19127
n 29030
il 22631
fquf 5479
p 37792
ce 15312
g 63412
dcx 35910
d 27742
qzf 54298
heta 63173
kh 1090
e 43241
qhq 8146
odhu 25059
dsw 15423
xtbx 2259
yz 1711
yk 18847
atv 56007
twqn 28249
hha 59454
u 5985
b 41493
st 38512
o 34385
uzl 43346
bvmo 12586
t 64101
xops 7214
iz 53638
a 2...

Circuit to Manager

Circuit Output Finished.
WA Your functions alice(), bob(), circuit() finished successfully, but the final output binary string is incorrect.

Manager to Checker

0

result:

wrong answer WA!

Subtask #3:

score: 0
Skipped

Subtask #4:

score: 0
Wrong Answer

Test #5:

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

Manager to Alice

Hello
26
a 3454 b 58767 c 58056 d 35863 e 10993 f 13428 g 44400 h 14808 i 42152 j 41685 k 4945 l 33302 m 37616 n 51927 o 14597 p 52276 q 30489 r 49388 s 61314 t 3571 u 45422 v 36417 w 14325 x 25271 y 54399 z 2849
a 45858 b 2285 c 25181 d 56233 e 46605 f 16378 g 8603 h 57322 i 27711 j 54646 k 43915 l...

Alice to Manager

235fc77fd78da210d6b5a61b92603c4f
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10

Manager to Bob

Hello
13
r w p c g e v j h q y z m b k x u a i t s l n f d o
d g l z c i e k y o u m j n q a b h w s v r f x t p
f a x j n g w y e c z q d k m o h b s p t u r l v i
d m a g u x e i t l r h c v w s z n b p y k q f o j
e l a c s h y d v q j m w t z f i n o g b p r x u k
r a v c t j y i p g e x s l z h...

Bob to Manager

235fc77fd78da210d6b5a61b92603c4f
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110

Manager to Circuit

Hello
2
3
26
a 3454 b 58767 c 58056 d 35863 e 10993 f 13428 g 44400 h 14808 i 42152 j 41685 k 4945 l 33302 m 37616 n 51927 o 14597 p 52276 q 30489 r 49388 s 61314 t 3571 u 45422 v 36417 w 14325 x 25271 y 54399 z 2849
a 45858 b 2285 c 25181 d 56233 e 46605 f 16378 g 8603 h 57322 i 27711 j 54646 k 439...

Circuit to Manager

Circuit Output Finished.
WA Your functions alice(), bob(), circuit() finished successfully, but the final output binary string is incorrect.

Manager to Checker

0

result:

wrong answer WA!

Subtask #5:

score: 0
Skipped

Subtask #6:

score: 0
Skipped

Subtask #7:

score: 0
Wrong Answer

Test #12:

score: 0
Wrong Answer
time: 57ms
memory: 12668kb

Manager to Alice

Hello
676
aa 3802 ab 7056 ac 59883 ad 34872 ae 7482 af 50954 ag 3033 ah 10947 ai 45175 aj 38968 ak 25809 al 5243 am 51663 an 29607 ao 51746 ap 7026 aq 28678 ar 19365 as 9937 at 50580 au 32268 av 36219 aw 12499 ax 11217 ay 36118 az 42569 ba 27331 bb 61063 bc 46216 bd 42920 be 31324 bf 61604 bg 40272 ...

Alice to Manager

235fc77fd78da210d6b5a61b92603c4f
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10

Manager to Bob

Hello
997
mx jl jv ck gp fv iu hn cj wo uf ek ox ux ln na yo ss ro zg vx al ji zc zt qi lt vf kk pb hj mm mr fz is jo ym vz ju yt dd oj vm ga xd ww ce is wf ej cv ib ad dp qj pr wn zr al yo gr vi dd vv bm lf ky on gb oh zy oe mf xo cb nv ri pb we cy oh qg xo zq ci mg dy wq cv gy sr vx wo mn jg zs qw...

Bob to Manager

235fc77fd78da210d6b5a61b92603c4f
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110

Manager to Circuit

Hello
2
3
676
aa 3802 ab 7056 ac 59883 ad 34872 ae 7482 af 50954 ag 3033 ah 10947 ai 45175 aj 38968 ak 25809 al 5243 am 51663 an 29607 ao 51746 ap 7026 aq 28678 ar 19365 as 9937 at 50580 au 32268 av 36219 aw 12499 ax 11217 ay 36118 az 42569 ba 27331 bb 61063 bc 46216 bd 42920 be 31324 bf 61604 bg 40...

Circuit to Manager

Circuit Output Finished.
WA Your functions alice(), bob(), circuit() finished successfully, but the final output binary string is incorrect.

Manager to Checker

0

result:

wrong answer WA!

Subtask #8:

score: 0
Skipped

Subtask #9:

score: 0
Wrong Answer

Test #16:

score: 0
Wrong Answer
time: 76ms
memory: 12852kb

Manager to Alice

Hello
699
wkm 49893 hus 29682 wba 42773 byj 30204 ikc 65421 agqd 20734 fwy 42563 icr 64301 yl 36787 bz 41537 xlka 6691 iq 37001 wij 10013 dfoq 13371 vdy 10291 wpwc 43193 rz 43253 engz 13755 rou 22700 lq 12011 jkn 21719 jleh 57791 olpm 12289 nbqf 57325 vyx 18438 ldgz 10230 ts 50054 odgx 30982 jfst 42...

Alice to Manager

235fc77fd78da210d6b5a61b92603c4f
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10

Manager to Bob

Hello
999
jrym hpu td ej llf hqoa hlay ej amz ej qr vzvu erf ej mh ej fwj qi dd ej ay ej dbvr lsgs sag ja hop ej vdcc ej wpwc cag la cugy mfbg ern pgj twc qjs byj u ej wwa ej mv ej utwd no swl mvnr pjar agel vnq ipe fp mwh atl lmnb dr ej nufb eqf wsxj wonu hqoa ej rbhe ej l vme ihwn weks kaz il se k...

Bob to Manager

235fc77fd78da210d6b5a61b92603c4f
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110
110

Manager to Circuit

Hello
2
3
699
wkm 49893 hus 29682 wba 42773 byj 30204 ikc 65421 agqd 20734 fwy 42563 icr 64301 yl 36787 bz 41537 xlka 6691 iq 37001 wij 10013 dfoq 13371 vdy 10291 wpwc 43193 rz 43253 engz 13755 rou 22700 lq 12011 jkn 21719 jleh 57791 olpm 12289 nbqf 57325 vyx 18438 ldgz 10230 ts 50054 odgx 30982 jfs...

Circuit to Manager

Circuit Output Finished.
WA Your functions alice(), bob(), circuit() finished successfully, but the final output binary string is incorrect.

Manager to Checker

0

result:

wrong answer WA!