이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <algorithm>
#include <iostream>
using namespace std;
int main()
{
int n;
cin >> n;
if (n==3)
{
int a, b, c, d, e, f;
cin >> a >> d >> b >> e >> c >> f;
if (a==b and b==c)
{
if (d>e and e>f)
{
cout << "101";
}
else if (d<e and e<f)
{
cout << "101";
}
else if (e>d and d>f)
{
cout << "011";
}
else if (e<d and d<f)
{
cout << "011";
}
else if (d>f and f>e)
{
cout << "110";
}
else if (d<f and f<e)
{
cout << "110";
}
}
else if (d==e and e==f)
{
if (a>b and b>c)
{
cout << "101";
}
else if (a<b and b<c)
{
cout << "101";
}
else if (b>a and a>c)
{
cout << "011";
}
else if (b<a and a<c)
{
cout << "011";
}
else if (a>c and c>b)
{
cout << "110";
}
else if (a<c and c<b)
{
cout << "110";
}
}
else
{
cout << "111";
}
cout << '\n';
}
else if (n==1)
cout << "1\n";
else
cout << "11\n";
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |