QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#524040#8674. Riddle of the Sphinxucup-team052AC ✓1ms3732kbC++23591b2024-08-19 09:14:062024-08-19 09:14:06

Judging History

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

  • [2024-08-19 09:14:06]
  • 评测
  • 测评结果:AC
  • 用时:1ms
  • 内存:3732kb
  • [2024-08-19 09:14:06]
  • 提交

answer

#include <bits/stdc++.h>
using namespace std;

int a, b, c, d, e;

int main() {
	cout << "1 0 0" << endl;
	cin >> a;
	cout << "0 1 0" << endl;
	cin >> b;
	cout << "0 0 1" << endl;
	cin >> c;
	cout << "1 1 1" << endl;
	cin >> d;
	cout << "3 2 1" << endl;
	cin >> e;
	if (a + b + c == d || 3 * a + 2 * b + c == e) {
		cout << a << ' ' << b << ' ' << c << endl;
		return 0;
	}
	if (d * 3 - b - 2 * c == e) {
		cout << d - b - c << ' ' << b << ' ' << c << endl;
		return 0;
	}
	cout << a << ' ' << (e - d - 2 * a) << ' ' << d - a - (e - d - 2 * a) << endl;
	return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 0ms
memory: 3672kb

input:

1
2
3
6
10

output:

1 0 0
0 1 0
0 0 1
1 1 1
3 2 1
1 2 3

result:

ok correct!

Test #2:

score: 0
Accepted
time: 0ms
memory: 3592kb

input:

9998
1
1
10000
29997

output:

1 0 0
0 1 0
0 0 1
1 1 1
3 2 1
9998 1 1

result:

ok correct!

Test #3:

score: 0
Accepted
time: 1ms
memory: 3712kb

input:

3333
3333
3333
9999
19998

output:

1 0 0
0 1 0
0 0 1
1 1 1
3 2 1
3333 3333 3333

result:

ok correct!

Test #4:

score: 0
Accepted
time: 1ms
memory: 3672kb

input:

892
503
712
2108
4397

output:

1 0 0
0 1 0
0 0 1
1 1 1
3 2 1
893 503 712

result:

ok correct!

Test #5:

score: 0
Accepted
time: 1ms
memory: 3592kb

input:

868
365
947
2182
4285

output:

1 0 0
0 1 0
0 0 1
1 1 1
3 2 1
868 367 947

result:

ok correct!

Test #6:

score: 0
Accepted
time: 1ms
memory: 3724kb

input:

684
827
794
2304
4499

output:

1 0 0
0 1 0
0 0 1
1 1 1
3 2 1
684 827 793

result:

ok correct!

Test #7:

score: 0
Accepted
time: 1ms
memory: 3576kb

input:

308
23
440
769
1410

output:

1 0 0
0 1 0
0 0 1
1 1 1
3 2 1
308 23 440

result:

ok correct!

Test #8:

score: 0
Accepted
time: 1ms
memory: 3604kb

input:

705
910
341
1956
4277

output:

1 0 0
0 1 0
0 0 1
1 1 1
3 2 1
705 910 341

result:

ok correct!

Test #9:

score: 0
Accepted
time: 1ms
memory: 3584kb

input:

1482
1285
299
3065
7312

output:

1 0 0
0 1 0
0 0 1
1 1 1
3 2 1
1481 1285 299

result:

ok correct!

Test #10:

score: 0
Accepted
time: 1ms
memory: 3656kb

input:

1516
3576
839
5930
12537

output:

1 0 0
0 1 0
0 0 1
1 1 1
3 2 1
1516 3575 839

result:

ok correct!

Test #11:

score: 0
Accepted
time: 1ms
memory: 3596kb

input:

2254
132
1126
3513
8153

output:

1 0 0
0 1 0
0 0 1
1 1 1
3 2 1
2254 132 1127

result:

ok correct!

Test #12:

score: 0
Accepted
time: 1ms
memory: 3648kb

input:

801
38
56
894
2535

output:

1 0 0
0 1 0
0 0 1
1 1 1
3 2 1
801 38 56

result:

ok correct!

Test #13:

score: 0
Accepted
time: 0ms
memory: 3596kb

input:

1004
1248
3876
6128
9383

output:

1 0 0
0 1 0
0 0 1
1 1 1
3 2 1
1004 1248 3876

result:

ok correct!

Test #14:

score: 0
Accepted
time: 0ms
memory: 3672kb

input:

2011
3884
1618
7515
15425

output:

1 0 0
0 1 0
0 0 1
1 1 1
3 2 1
2013 3884 1618

result:

ok correct!

Test #15:

score: 0
Accepted
time: 1ms
memory: 3700kb

input:

1256
6632
214
8103
17248

output:

1 0 0
0 1 0
0 0 1
1 1 1
3 2 1
1256 6633 214

result:

ok correct!

Test #16:

score: 0
Accepted
time: 1ms
memory: 3652kb

input:

805
4142
694
5640
11392

output:

1 0 0
0 1 0
0 0 1
1 1 1
3 2 1
805 4142 693

result:

ok correct!

Test #17:

score: 0
Accepted
time: 0ms
memory: 3672kb

input:

731
4440
1054
6223
12127

output:

1 0 0
0 1 0
0 0 1
1 1 1
3 2 1
731 4440 1054

result:

ok correct!

Test #18:

score: 0
Accepted
time: 1ms
memory: 3600kb

input:

445
3442
4035
7922
12255

output:

1 0 0
0 1 0
0 0 1
1 1 1
3 2 1
445 3442 4035

result:

ok correct!

Test #19:

score: 0
Accepted
time: 1ms
memory: 3712kb

input:

1750
2
3
6
10

output:

1 0 0
0 1 0
0 0 1
1 1 1
3 2 1
1 2 3

result:

ok correct!

Test #20:

score: 0
Accepted
time: 1ms
memory: 3668kb

input:

1
2
3
6
10

output:

1 0 0
0 1 0
0 0 1
1 1 1
3 2 1
1 2 3

result:

ok correct!

Test #21:

score: 0
Accepted
time: 0ms
memory: 3712kb

input:

1
2
3
6
10

output:

1 0 0
0 1 0
0 0 1
1 1 1
3 2 1
1 2 3

result:

ok correct!

Test #22:

score: 0
Accepted
time: 1ms
memory: 3592kb

input:

1
2
3
8664
10

output:

1 0 0
0 1 0
0 0 1
1 1 1
3 2 1
1 2 3

result:

ok correct!

Test #23:

score: 0
Accepted
time: 1ms
memory: 3596kb

input:

1
2
3
6
9

output:

1 0 0
0 1 0
0 0 1
1 1 1
3 2 1
1 2 3

result:

ok correct!

Test #24:

score: 0
Accepted
time: 1ms
memory: 3640kb

input:

1633
1
1
10000
29997

output:

1 0 0
0 1 0
0 0 1
1 1 1
3 2 1
9998 1 1

result:

ok correct!

Test #25:

score: 0
Accepted
time: 1ms
memory: 3732kb

input:

9998
1
1
10000
29997

output:

1 0 0
0 1 0
0 0 1
1 1 1
3 2 1
9998 1 1

result:

ok correct!

Test #26:

score: 0
Accepted
time: 1ms
memory: 3596kb

input:

9998
1
671
10000
29997

output:

1 0 0
0 1 0
0 0 1
1 1 1
3 2 1
9998 1 1

result:

ok correct!

Test #27:

score: 0
Accepted
time: 0ms
memory: 3676kb

input:

9998
1
1
9999
29997

output:

1 0 0
0 1 0
0 0 1
1 1 1
3 2 1
9998 1 1

result:

ok correct!

Test #28:

score: 0
Accepted
time: 1ms
memory: 3656kb

input:

9998
1
1
10000
11550

output:

1 0 0
0 1 0
0 0 1
1 1 1
3 2 1
9998 1 1

result:

ok correct!

Test #29:

score: 0
Accepted
time: 0ms
memory: 3732kb

input:

3332
3333
3333
9999
19998

output:

1 0 0
0 1 0
0 0 1
1 1 1
3 2 1
3333 3333 3333

result:

ok correct!

Test #30:

score: 0
Accepted
time: 0ms
memory: 3596kb

input:

3333
3332
3333
9999
19998

output:

1 0 0
0 1 0
0 0 1
1 1 1
3 2 1
3333 3333 3333

result:

ok correct!

Test #31:

score: 0
Accepted
time: 1ms
memory: 3600kb

input:

3333
3333
3333
9999
19998

output:

1 0 0
0 1 0
0 0 1
1 1 1
3 2 1
3333 3333 3333

result:

ok correct!

Test #32:

score: 0
Accepted
time: 0ms
memory: 3656kb

input:

3333
3333
3333
10000
19998

output:

1 0 0
0 1 0
0 0 1
1 1 1
3 2 1
3333 3333 3333

result:

ok correct!

Test #33:

score: 0
Accepted
time: 0ms
memory: 3656kb

input:

3333
3333
3333
9999
19999

output:

1 0 0
0 1 0
0 0 1
1 1 1
3 2 1
3333 3333 3333

result:

ok correct!

Test #34:

score: 0
Accepted
time: 1ms
memory: 3652kb

input:

548
588
724
1855
3529

output:

1 0 0
0 1 0
0 0 1
1 1 1
3 2 1
543 588 724

result:

ok correct!

Test #35:

score: 0
Accepted
time: 1ms
memory: 3652kb

input:

780
1559
783
2524
5045

output:

1 0 0
0 1 0
0 0 1
1 1 1
3 2 1
780 961 783

result:

ok correct!

Test #36:

score: 0
Accepted
time: 1ms
memory: 3656kb

input:

690
189
313
1191
2760

output:

1 0 0
0 1 0
0 0 1
1 1 1
3 2 1
690 189 312

result:

ok correct!

Test #37:

score: 0
Accepted
time: 1ms
memory: 3684kb

input:

97
289
971
1358
1840

output:

1 0 0
0 1 0
0 0 1
1 1 1
3 2 1
97 289 971

result:

ok correct!

Test #38:

score: 0
Accepted
time: 1ms
memory: 3672kb

input:

298
118
177
593
9817

output:

1 0 0
0 1 0
0 0 1
1 1 1
3 2 1
298 118 177

result:

ok correct!

Test #39:

score: 0
Accepted
time: 1ms
memory: 3588kb

input:

2974
1358
2553
6885
14191

output:

1 0 0
0 1 0
0 0 1
1 1 1
3 2 1
2974 1358 2553

result:

ok correct!

Test #40:

score: 0
Accepted
time: 0ms
memory: 3592kb

input:

4209
360
3000
9367
19943

output:

1 0 0
0 1 0
0 0 1
1 1 1
3 2 1
4209 2158 3000

result:

ok correct!

Test #41:

score: 0
Accepted
time: 1ms
memory: 3632kb

input:

1199
99
4408
5706
8203

output:

1 0 0
0 1 0
0 0 1
1 1 1
3 2 1
1199 99 4408

result:

ok correct!

Test #42:

score: 0
Accepted
time: 0ms
memory: 3636kb

input:

3601
167
1004
4773
12141

output:

1 0 0
0 1 0
0 0 1
1 1 1
3 2 1
3601 167 1004

result:

ok correct!

Test #43:

score: 0
Accepted
time: 0ms
memory: 3596kb

input:

2721
2111
2489
7321
14873

output:

1 0 0
0 1 0
0 0 1
1 1 1
3 2 1
2721 2111 2489

result:

ok correct!

Test #44:

score: 0
Accepted
time: 1ms
memory: 3680kb

input:

551
203
5220
9120
16717

output:

1 0 0
0 1 0
0 0 1
1 1 1
3 2 1
3697 203 5220

result:

ok correct!

Test #45:

score: 0
Accepted
time: 1ms
memory: 3724kb

input:

1481
1259
1264
4970
10157

output:

1 0 0
0 1 0
0 0 1
1 1 1
3 2 1
1481 2225 1264

result:

ok correct!

Test #46:

score: 0
Accepted
time: 1ms
memory: 3588kb

input:

4769
1552
235
6712
17802

output:

1 0 0
0 1 0
0 0 1
1 1 1
3 2 1
4769 1552 391

result:

ok correct!

Test #47:

score: 0
Accepted
time: 0ms
memory: 3652kb

input:

1620
3589
1642
6852
13680

output:

1 0 0
0 1 0
0 0 1
1 1 1
3 2 1
1620 3589 1642

result:

ok correct!

Test #48:

score: 0
Accepted
time: 0ms
memory: 3644kb

input:

1136
6652
800
8588
17515

output:

1 0 0
0 1 0
0 0 1
1 1 1
3 2 1
1136 6652 800

result:

ok correct!

Extra Test:

score: 0
Extra Test Passed