| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1367234 | biserailieva | Superpiece (EGOI22_superpiece) | C++20 | 2 ms | 344 KiB |
#include <bits/stdc++.h>
using namespace std;
int main()
{
int q;
cin>>q;
while(q--)
{
string s;
cin>>s;
int a, b, c, d;
cin>>a>>b>>c>>d;
if(s=="P")
{
if(b!=d || a>c)
{
cout<<-1<<endl;
}
else
{
cout<<c-a<<endl;
}
}
else if(s=="B")
{
if(a==c && b==d)
{
cout<<0<<endl;
}
else if((a+b)%2!=(c+d)%2)
{
cout<<-1<<endl;
}
else if(abs(a-c)==abs(b-d))
{
cout<<1<<endl;
}
else
{
cout<<2<<endl;
}
}
}
return 0;
}| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
