QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#561896#8674. Riddle of the SphinxStarrykillerWA 1ms3600kbC++231.1kb2024-09-13 12:28:442024-09-13 12:28:44

Judging History

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

  • [2024-09-13 12:28:44]
  • 评测
  • 测评结果:WA
  • 用时:1ms
  • 内存:3600kb
  • [2024-09-13 12:28:44]
  • 提交

answer

#include <bits/stdc++.h>

using namespace std;

int bin[]={1,2,4,5,7};
int ans[5];

signed main() {
    int a, b, c, d, e;
    cout<<"1 1 0"<<endl; cin>>a;
    cout<<"0 1 1"<<endl; cin>>b;
    cout<<"1 0 1"<<endl; cin>>c;
    cout<<"1 1 1"<<endl; cin>>d;
    cout<<"1 1 1"<<endl; cin>>e;
    
    if (d==e) {
        // A
        {
            int A=d-b;
            int B=d-c;
            int C=d-A-B;
            if (A+B!=a && B+C==b && A+C==c) {
                cout<<A<<" "<<B<<' '<<C; return 0;
            }
        }
        // B
        {
            int B=d-c;
            int C=d-a;
            int A=d-B-C;
            
            if (A+B==a && B+C!=b && A+C==c) {
                cout<<A<<" "<<B<<' '<<C; return 0;
            }
        }
        // C
        {
            
            int B=d-c;
            int A=d-B;
            int C=d-A-B;
            
            if (A+B==a && B+C==b && A+C!=c) {
                cout<<A<<" "<<B<<' '<<C; return 0;
            }
        } 
    } 
    
        int f=(a+b+c)/2;
        cout<<f-b<<' '<<f-c<<' '<<f-a;
}

详细

Test #1:

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

input:

3
5
4
6
6

output:

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

result:

ok correct!

Test #2:

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

input:

9999
2
9999
10000
10000

output:

1 1 0
0 1 1
1 0 1
1 1 1
1 1 1
9998 1 1

result:

ok correct!

Test #3:

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

input:

6666
6666
6666
9999
9999

output:

1 1 0
0 1 1
1 0 1
1 1 1
1 1 1
3333 3333 3333

result:

ok correct!

Test #4:

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

input:

1395
1215
1605
2108
2108

output:

1 1 0
0 1 1
1 0 1
1 1 1
1 1 1
893 503 712

result:

ok correct!

Test #5:

score: -100
Wrong Answer
time: 1ms
memory: 3588kb

input:

1235
1312
1815
2182
2182

output:

1 1 0
0 1 1
1 0 1
1 1 1
1 1 1
870 367 945

result:

wrong answer read