You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
527 B
C++
34 lines
527 B
C++
#include <iostream>
|
|
#include <cstring>
|
|
|
|
int main(int argc, char const *argv[])
|
|
{
|
|
int T;
|
|
std::cin >> T;
|
|
for(int i = 0; i < T; i++) {
|
|
int C;
|
|
std::cin >> C;
|
|
char field[1000][1000];
|
|
memset(field, 1000*1000, 0);
|
|
int xpos = 500;
|
|
int ypos = 500;
|
|
for (int j = 0; j < C; j++) {
|
|
char letter;
|
|
std::cin >> letter;
|
|
int magnitude;
|
|
std::cin >> magnitude;
|
|
switch(letter) {
|
|
case 'x':
|
|
while(magnitude--) {
|
|
field[x++][y] = 1;
|
|
}
|
|
break;
|
|
case 'y':
|
|
|
|
case 'z':
|
|
|
|
}
|
|
}
|
|
}
|
|
return 0;
|
|
} |