QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#561789#8674. Riddle of the SphinxStarrykillerWA 1ms3600kbC++23914b2024-09-13 10:32:472024-09-13 10:32:48

Judging History

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

  • [2024-09-13 10:32:48]
  • 评测
  • 测评结果:WA
  • 用时:1ms
  • 内存:3600kb
  • [2024-09-13 10:32:47]
  • 提交

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;
    // for (int i=0; i<5; ++i) {
    //     if (ans[i]<0)
    // }
    cout<<"1 0 0"<<endl;
    cin>>a;
    
    cout<<"0 1 0"<<endl;
    cin>>b;
    
    cout<<"0 0 1"<<endl;
    cin>>c;

    cout<<"1 0 1"<<endl;

    cin>>d;

    cout<<"1 1 1"<<endl;

    cin>>e;

    map<int,int>A,B,C;

    // 4,5
    A[a]+=2; B[b]+=2; C[c]+=2;
    
    // 1
    A[d-c]++; B[b]++; C[c]++;

    // 2
    A[a]++; B[e-d]++; C[c]++;

    // 3
    A[a]++; B[b]++; C[d-a]++;

    auto answer=[](map<int,int> mp) {
        int cnt=1e9, ans=0;
        for (auto [u,v]: mp) if (v<cnt) cnt=v, ans=u;
        return ans;
    };

    // for (auto [u,v]:C) cerr<<u<<' '<<v<<'\n';

    cout<<answer(A)<<" ";
    cout<<answer(B)<<" ";
    cout<<answer(C)<<" ";

}

詳細信息

Test #1:

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

input:

1
2
3
4
6

output:

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

result:

ok correct!

Test #2:

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

input:

9998
1
1
9999
10000

output:

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

result:

ok correct!

Test #3:

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

input:

3333
3333
3333
6666
9999

output:

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

result:

ok correct!

Test #4:

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

input:

892
503
712
1605
2108

output:

1 0 0
0 1 0
0 0 1
1 0 1
1 1 1
893 503 713 

result:

wrong answer read