QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#560375 | #8674. Riddle of the Sphinx | PhantomThreshold# | AC ✓ | 1ms | 3672kb | C++20 | 963b | 2024-09-12 15:23:09 | 2024-09-12 15:23:17 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main(){
ll r1,r2,r3,r4,r5;
cout << "1 0 0" << endl;
cin >> r1;
cout << "0 1 0" << endl;
cin >> r2;
cout << "0 0 1" << endl;
cin >> r3;
cout << "1 2 3" << endl;
cin >> r4;
cout << "3 5 4" << endl;
cin >> r5;
if (1*r1+2*r2+3*r3==r4){
cout << r1 << " " << r2 << " " << r3 << endl;
return 0;
}
if (3*r1+5*r2+4*r3==r5){
cout << r1 << " " << r2 << " " << r3 << endl;
return 0;
}
ll r7=r4*3-r5;//0 1 5
ll r6=r4-2*r7;//1 0 -7
if (r1-7*r3==r6){
r2=r7-5*r3;
cout << r1 << " " << r2 << " " << r3 << endl;
return 0;
}
if (r2+5*r3==r7){
r1=r6+7*r3;
cout << r1 << " " << r2 << " " << r3 << endl;
return 0;
}
r3=(r7-r2)/5;
cout << r1 << " " << r2 << " " << r3 << endl;
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 1ms
memory: 3656kb
input:
1 2 3 14 25
output:
1 0 0 0 1 0 0 0 1 1 2 3 3 5 4 1 2 3
result:
ok correct!
Test #2:
score: 0
Accepted
time: 0ms
memory: 3656kb
input:
9998 1 1 10003 30003
output:
1 0 0 0 1 0 0 0 1 1 2 3 3 5 4 9998 1 1
result:
ok correct!
Test #3:
score: 0
Accepted
time: 0ms
memory: 3656kb
input:
3333 3333 3333 19998 39996
output:
1 0 0 0 1 0 0 0 1 1 2 3 3 5 4 3333 3333 3333
result:
ok correct!
Test #4:
score: 0
Accepted
time: 0ms
memory: 3548kb
input:
892 503 712 4035 8042
output:
1 0 0 0 1 0 0 0 1 1 2 3 3 5 4 893 503 712
result:
ok correct!
Test #5:
score: 0
Accepted
time: 0ms
memory: 3580kb
input:
868 365 947 4443 8227
output:
1 0 0 0 1 0 0 0 1 1 2 3 3 5 4 868 367 947
result:
ok correct!
Test #6:
score: 0
Accepted
time: 1ms
memory: 3580kb
input:
684 827 794 4717 9359
output:
1 0 0 0 1 0 0 0 1 1 2 3 3 5 4 684 827 793
result:
ok correct!
Test #7:
score: 0
Accepted
time: 0ms
memory: 3612kb
input:
308 23 440 1672 2799
output:
1 0 0 0 1 0 0 0 1 1 2 3 3 5 4 308 23 440
result:
ok correct!
Test #8:
score: 0
Accepted
time: 0ms
memory: 3548kb
input:
705 910 341 3548 8030
output:
1 0 0 0 1 0 0 0 1 1 2 3 3 5 4 705 910 341
result:
ok correct!
Test #9:
score: 0
Accepted
time: 0ms
memory: 3660kb
input:
1482 1285 299 4948 12064
output:
1 0 0 0 1 0 0 0 1 1 2 3 3 5 4 1481 1285 299
result:
ok correct!
Test #10:
score: 0
Accepted
time: 0ms
memory: 3548kb
input:
1516 3576 839 11183 25779
output:
1 0 0 0 1 0 0 0 1 1 2 3 3 5 4 1516 3575 839
result:
ok correct!
Test #11:
score: 0
Accepted
time: 1ms
memory: 3560kb
input:
2254 132 1126 5899 11930
output:
1 0 0 0 1 0 0 0 1 1 2 3 3 5 4 2254 132 1127
result:
ok correct!
Test #12:
score: 0
Accepted
time: 1ms
memory: 3560kb
input:
801 38 56 1044 2817
output:
1 0 0 0 1 0 0 0 1 1 2 3 3 5 4 801 38 56
result:
ok correct!
Test #13:
score: 0
Accepted
time: 1ms
memory: 3528kb
input:
1004 1248 3876 15128 24755
output:
1 0 0 0 1 0 0 0 1 1 2 3 3 5 4 1004 1248 3876
result:
ok correct!
Test #14:
score: 0
Accepted
time: 1ms
memory: 3612kb
input:
2011 3884 1618 14635 31931
output:
1 0 0 0 1 0 0 0 1 1 2 3 3 5 4 2013 3884 1618
result:
ok correct!
Test #15:
score: 0
Accepted
time: 1ms
memory: 3564kb
input:
1256 6632 214 15164 37789
output:
1 0 0 0 1 0 0 0 1 1 2 3 3 5 4 1256 6633 214
result:
ok correct!
Test #16:
score: 0
Accepted
time: 1ms
memory: 3528kb
input:
805 4142 694 11168 25897
output:
1 0 0 0 1 0 0 0 1 1 2 3 3 5 4 805 4142 693
result:
ok correct!
Test #17:
score: 0
Accepted
time: 1ms
memory: 3584kb
input:
731 4440 1054 12771 28609
output:
1 0 0 0 1 0 0 0 1 1 2 3 3 5 4 731 4440 1054
result:
ok correct!
Test #18:
score: 0
Accepted
time: 0ms
memory: 3592kb
input:
445 3442 4035 19434 34686
output:
1 0 0 0 1 0 0 0 1 1 2 3 3 5 4 445 3442 4035
result:
ok correct!
Test #19:
score: 0
Accepted
time: 0ms
memory: 3532kb
input:
1750 2 3 14 25
output:
1 0 0 0 1 0 0 0 1 1 2 3 3 5 4 1 2 3
result:
ok correct!
Test #20:
score: 0
Accepted
time: 1ms
memory: 3664kb
input:
1 2 3 14 25
output:
1 0 0 0 1 0 0 0 1 1 2 3 3 5 4 1 2 3
result:
ok correct!
Test #21:
score: 0
Accepted
time: 0ms
memory: 3580kb
input:
1 2 3 14 25
output:
1 0 0 0 1 0 0 0 1 1 2 3 3 5 4 1 2 3
result:
ok correct!
Test #22:
score: 0
Accepted
time: 0ms
memory: 3552kb
input:
1 2 3 16775 25
output:
1 0 0 0 1 0 0 0 1 1 2 3 3 5 4 1 2 3
result:
ok correct!
Test #23:
score: 0
Accepted
time: 1ms
memory: 3612kb
input:
1 2 3 14 21
output:
1 0 0 0 1 0 0 0 1 1 2 3 3 5 4 1 2 3
result:
ok correct!
Test #24:
score: 0
Accepted
time: 0ms
memory: 3464kb
input:
1633 1 1 10003 30003
output:
1 0 0 0 1 0 0 0 1 1 2 3 3 5 4 9998 1 1
result:
ok correct!
Test #25:
score: 0
Accepted
time: 1ms
memory: 3652kb
input:
9998 1 1 10003 30003
output:
1 0 0 0 1 0 0 0 1 1 2 3 3 5 4 9998 1 1
result:
ok correct!
Test #26:
score: 0
Accepted
time: 0ms
memory: 3580kb
input:
9998 1 671 10003 30003
output:
1 0 0 0 1 0 0 0 1 1 2 3 3 5 4 9998 1 1
result:
ok correct!
Test #27:
score: 0
Accepted
time: 0ms
memory: 3540kb
input:
9998 1 1 10002 30003
output:
1 0 0 0 1 0 0 0 1 1 2 3 3 5 4 9998 1 1
result:
ok correct!
Test #28:
score: 0
Accepted
time: 1ms
memory: 3564kb
input:
9998 1 1 10003 26895
output:
1 0 0 0 1 0 0 0 1 1 2 3 3 5 4 9998 1 1
result:
ok correct!
Test #29:
score: 0
Accepted
time: 1ms
memory: 3540kb
input:
3332 3333 3333 19998 39996
output:
1 0 0 0 1 0 0 0 1 1 2 3 3 5 4 3333 3333 3333
result:
ok correct!
Test #30:
score: 0
Accepted
time: 1ms
memory: 3460kb
input:
3333 3332 3333 19998 39996
output:
1 0 0 0 1 0 0 0 1 1 2 3 3 5 4 3333 3333 3333
result:
ok correct!
Test #31:
score: 0
Accepted
time: 0ms
memory: 3656kb
input:
3333 3333 3333 19998 39996
output:
1 0 0 0 1 0 0 0 1 1 2 3 3 5 4 3333 3333 3333
result:
ok correct!
Test #32:
score: 0
Accepted
time: 0ms
memory: 3540kb
input:
3333 3333 3333 20000 39996
output:
1 0 0 0 1 0 0 0 1 1 2 3 3 5 4 3333 3333 3333
result:
ok correct!
Test #33:
score: 0
Accepted
time: 0ms
memory: 3448kb
input:
3333 3333 3333 19998 40000
output:
1 0 0 0 1 0 0 0 1 1 2 3 3 5 4 3333 3333 3333
result:
ok correct!
Test #34:
score: 0
Accepted
time: 1ms
memory: 3652kb
input:
548 588 724 3891 7465
output:
1 0 0 0 1 0 0 0 1 1 2 3 3 5 4 543 588 724
result:
ok correct!
Test #35:
score: 0
Accepted
time: 1ms
memory: 3668kb
input:
780 1559 783 5051 10277
output:
1 0 0 0 1 0 0 0 1 1 2 3 3 5 4 780 961 783
result:
ok correct!
Test #36:
score: 0
Accepted
time: 1ms
memory: 3512kb
input:
690 189 313 2004 4263
output:
1 0 0 0 1 0 0 0 1 1 2 3 3 5 4 690 189 312
result:
ok correct!
Test #37:
score: 0
Accepted
time: 0ms
memory: 3608kb
input:
97 289 971 3591 5620
output:
1 0 0 0 1 0 0 0 1 1 2 3 3 5 4 97 289 971
result:
ok correct!
Test #38:
score: 0
Accepted
time: 1ms
memory: 3528kb
input:
298 118 177 1065 17665
output:
1 0 0 0 1 0 0 0 1 1 2 3 3 5 4 298 118 177
result:
ok correct!
Test #39:
score: 0
Accepted
time: 1ms
memory: 3560kb
input:
2974 1358 2553 13349 25924
output:
1 0 0 0 1 0 0 0 1 1 2 3 3 5 4 2974 1358 2553
result:
ok correct!
Test #40:
score: 0
Accepted
time: 1ms
memory: 3596kb
input:
4209 360 3000 17525 35417
output:
1 0 0 0 1 0 0 0 1 1 2 3 3 5 4 4209 2158 3000
result:
ok correct!
Test #41:
score: 0
Accepted
time: 1ms
memory: 3552kb
input:
1199 99 4408 14621 21724
output:
1 0 0 0 1 0 0 0 1 1 2 3 3 5 4 1199 99 4408
result:
ok correct!
Test #42:
score: 0
Accepted
time: 1ms
memory: 3536kb
input:
3601 167 1004 6948 15654
output:
1 0 0 0 1 0 0 0 1 1 2 3 3 5 4 3601 167 1004
result:
ok correct!
Test #43:
score: 0
Accepted
time: 1ms
memory: 3452kb
input:
2721 2111 2489 14410 28670
output:
1 0 0 0 1 0 0 0 1 1 2 3 3 5 4 2721 2111 2489
result:
ok correct!
Test #44:
score: 0
Accepted
time: 0ms
memory: 3544kb
input:
551 203 5220 19763 32986
output:
1 0 0 0 1 0 0 0 1 1 2 3 3 5 4 3697 203 5220
result:
ok correct!
Test #45:
score: 0
Accepted
time: 0ms
memory: 3660kb
input:
1481 1259 1264 9723 20624
output:
1 0 0 0 1 0 0 0 1 1 2 3 3 5 4 1481 2225 1264
result:
ok correct!
Test #46:
score: 0
Accepted
time: 0ms
memory: 3660kb
input:
4769 1552 235 9046 23631
output:
1 0 0 0 1 0 0 0 1 1 2 3 3 5 4 4769 1552 391
result:
ok correct!
Test #47:
score: 0
Accepted
time: 1ms
memory: 3540kb
input:
1620 3589 1642 13727 29373
output:
1 0 0 0 1 0 0 0 1 1 2 3 3 5 4 1620 3589 1642
result:
ok correct!
Test #48:
score: 0
Accepted
time: 1ms
memory: 3672kb
input:
1136 6652 800 16840 39871
output:
1 0 0 0 1 0 0 0 1 1 2 3 3 5 4 1136 6652 800
result:
ok correct!
Extra Test:
score: 0
Extra Test Passed