QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#561789 | #8674. Riddle of the Sphinx | Starrykiller | WA | 1ms | 3600kb | C++23 | 914b | 2024-09-13 10:32:47 | 2024-09-13 10:32:48 |
Judging History
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)<<" ";
}
Details
Tip: Click on the bar to expand more detailed information
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