QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#561786 | #8674. Riddle of the Sphinx | Starrykiller | WA | 1ms | 3800kb | C++23 | 751b | 2024-09-13 10:28:19 | 2024-09-13 10:28:20 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
signed main() {
int a, b, c, d, e;
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=0, ans=0;
for (auto [u,v]: mp) if (v>cnt) cnt=v, ans=u;
return ans;
};
cout<<answer(A)<<" ";
cout<<answer(B)<<" ";
cout<<answer(C)<<" ";
}
詳細信息
Test #1:
score: 100
Accepted
time: 0ms
memory: 3560kb
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: 0ms
memory: 3796kb
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: 3772kb
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: 3800kb
input:
892 503 712 1605 2108
output:
1 0 0 0 1 0 0 0 1 1 0 1 1 1 1 892 503 712
result:
wrong answer read