9937 | 2024-03-20 07:17:07 | csdavid | Chess Rush | cpp17 | Wrong answer 0/100 | 1.598s | 5268 KiB |
#include <iostream>
using namespace std;
int kezdoszlop, celoszlop;
int r, c, q, type;
void pawn(){
if(kezdoszlop!=celoszlop){
cout << 0 << ' ' << 0;
}
else{
cout << r-1 << ' ' << 1;
}
return;
}
void rook(){
if(kezdoszlop==celoszlop){
cout << 1 << ' ' << 1;
}
else{
cout << 2 << ' ' << 2;
}
}
void queen(){
if(kezdoszlop==celoszlop||abs(celoszlop-kezdoszlop)==r-1){
cout << 1 << ' ' << 1;
}
else{
int ertek=3;
if(r+kezdoszlop-1<=c){
ertek++;
}
if(kezdoszlop-r+1>0){
ertek++;
}
cout << 2 << ' ' << ertek;
}
}
using namespace std;
int main()
{
cin >> q >> r >> c;
while(q){
cin >> type >> celoszlop;
if(type=='P'){
pawn();
}
else if(type=='R'){
rook();
}
else if(type=='Q'){
queen();
}
q--;
}
return 0;
}
Subtask | Sum | Test | Verdict | Time | Memory | ||
---|---|---|---|---|---|---|---|
subtask1 | 0/0 | ||||||
1 | Wrong answer | 3ms | 1872 KiB | ||||
2 | Wrong answer | 18ms | 2064 KiB | ||||
subtask2 | 0/8 | ||||||
3 | Wrong answer | 3ms | 2288 KiB | ||||
4 | Wrong answer | 18ms | 2508 KiB | ||||
5 | Wrong answer | 3ms | 2740 KiB | ||||
6 | Wrong answer | 3ms | 3000 KiB | ||||
subtask3 | 0/15 | ||||||
7 | Wrong answer | 3ms | 3072 KiB | ||||
8 | Wrong answer | 3ms | 3324 KiB | ||||
9 | Wrong answer | 3ms | 3316 KiB | ||||
10 | Wrong answer | 2ms | 3396 KiB | ||||
subtask4 | 0/22 | ||||||
11 | Wrong answer | 3ms | 3528 KiB | ||||
12 | Wrong answer | 18ms | 3800 KiB | ||||
13 | Wrong answer | 166ms | 4020 KiB | ||||
14 | Time limit exceeded | 1.562s | 4068 KiB | ||||
15 | Time limit exceeded | 1.554s | 3468 KiB | ||||
16 | Time limit exceeded | 1.574s | 4228 KiB | ||||
subtask5 | 0/5 | ||||||
17 | Wrong answer | 3ms | 4388 KiB | ||||
18 | Wrong answer | 3ms | 4404 KiB | ||||
19 | Wrong answer | 3ms | 4292 KiB | ||||
20 | Wrong answer | 3ms | 4428 KiB | ||||
subtask6 | 0/8 | ||||||
21 | Wrong answer | 3ms | 4540 KiB | ||||
22 | Wrong answer | 3ms | 4572 KiB | ||||
23 | Wrong answer | 3ms | 4456 KiB | ||||
24 | Wrong answer | 3ms | 4616 KiB | ||||
subtask7 | 0/15 | ||||||
25 | Wrong answer | 18ms | 4856 KiB | ||||
26 | Time limit exceeded | 1.578s | 4928 KiB | ||||
27 | Time limit exceeded | 1.557s | 5100 KiB | ||||
28 | Time limit exceeded | 1.552s | 4976 KiB | ||||
29 | Time limit exceeded | 1.572s | 4900 KiB | ||||
30 | Time limit exceeded | 1.569s | 4912 KiB | ||||
subtask8 | 0/20 | ||||||
31 | Time limit exceeded | 1.557s | 5036 KiB | ||||
32 | Time limit exceeded | 1.557s | 4956 KiB | ||||
33 | Time limit exceeded | 1.562s | 4116 KiB | ||||
34 | Time limit exceeded | 1.544s | 4944 KiB | ||||
35 | Time limit exceeded | 1.572s | 4980 KiB | ||||
36 | Time limit exceeded | 1.56s | 5000 KiB | ||||
subtask9 | 0/7 | ||||||
37 | Time limit exceeded | 1.565s | 4980 KiB | ||||
38 | Time limit exceeded | 1.552s | 5000 KiB | ||||
39 | Time limit exceeded | 1.557s | 5044 KiB | ||||
40 | Wrong answer | 2ms | 5152 KiB | ||||
41 | Time limit exceeded | 1.598s | 5256 KiB | ||||
42 | Wrong answer | 3ms | 5268 KiB |