QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#109230#6529. Alice, Bob and Circuitzhouhuanyi4 30ms3820kbC++112.0kb2023-05-27 23:00:592023-05-27 23:01:04

Judging History

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

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2023-05-27 23:01:04]
  • 评测
  • 测评结果:4
  • 用时:30ms
  • 内存:3820kb
  • [2023-05-27 23:00:59]
  • 提交

answer

#include"abc.h"
#include<iostream>
using namespace std;
// 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[]
) {
    for (int i=0;i<16;++i) outputs_alice[i]=(numbers[0]>>i)&1;
    return 16;
}


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


// 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]
) {
    if (lb)
    {
	for (int i=0;i<la;++i) outputs_circuit[0][i]=i;
	return la;
    }
    else
    {
	for (int i=0;i<la;++i) operations[i+16]=0,operands[i+16][0]=0,operands[i+16][1]=0,outputs_circuit[0][i]=i+16;
	return 32;
    }
}


詳細信息

Subtask #1:

score: 4
Accepted

Test #1:

score: 4
Accepted
time: 2ms
memory: 3696kb

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
0011001100000110
1101001101110011
0110000010101110
0010010100111111
0011010110110000
1010000100001000
1001001111110100
1110101101101111
1001101110111011
0011011001111101
1011000010001000
0001011011000000
0111010001011111
0000100011000000
1110100010110101
000001100101...

Manager to Bob

Hello
0





























































Bob to Manager

235fc77fd78da210d6b5a61b92603c4f





























































Manager to Circuit

Hello
16
0
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 ...

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

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
1110110101010010
0110011010001110
1110011000011010
1110011010101000
0000010111001001
0000101111011100
0010110111101111
0110001000110001
0111101000110110
0101100000101011
1010001101101111
0100001000100000
1001011100010101
0100101111111000
1100011110000110
111111000011...

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
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0

Manager to Circuit

Hello
16
1
Goodbye

Circuit to Manager

WA Too small l (return value of circuit()), less than la + lb

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

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
0111111010110000
0100010011001101
0110000110000100
0101100000010110
0100110101011100
0010110001101000
0111001100111000
0101101000000001
0001000110011011
0111101101110000
0101010100101000
1001110010000110
0011010000100111
0111011111100010
1110011111010011
011001001101...

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
0000000000000
0000000000000
0000000000000
0000000000000
0000000000000
0000000000000
0000000000000
0000000000000
0000000000000
0000000000000
0000000000000
0000000000000
0000000000000
0000000000000
0000000000000
0000000000000
0000000000000
0000000000000
0000000000000
0...

Manager to Circuit

Hello
16
13
Goodbye

Circuit to Manager

WA Too small l (return value of circuit()), less than la + lb

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: 21ms
memory: 3804kb

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
0101101101110000
1001010110010000
0001000010010011
0001101110111101
0111100010010011
1101110101010110
0010110110001011
1100000111110001
1000100100011110
0111001100001001
0101000010000100
0010111101001101
1001001010101110
1111110100011111
0101100100110110
101001110101...

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
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

Manager to Circuit

Hello
16
997
Goodbye

Circuit to Manager

WA Too small l (return value of circuit()), less than la + lb

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: 30ms
memory: 3820kb

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
1010011101000011
1101001100100000
1000101001100101
0010110010101010
1010000100011100
0010100110100100
1000111110011001
1011100010010101
0100101100110000
0000101110011110
1111110000111001
1111011001001111
1001111001111110
1010011001011110
0010101001010011
001010100001...

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
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

Manager to Circuit

Hello
16
999
Goodbye

Circuit to Manager

WA Too small l (return value of circuit()), less than la + lb

Manager to Checker

0

result:

wrong answer WA!