https://dinamizartj.com/s4awhever45 이런 스타일의 문제에 약하다 생각 했는데 역시 힘들다.. 풀긴 했으나 시간 제한에 자꾸 걸린다 그것도 턱없이..
Tramadol 50Mg To Buy 시험 몇일 남지도 않았는데 왠지 이런 스타일의 문제가 나올꺼 같아 불안 하다..
어쨋든 아직 미완..
https://brufaganya.cat/2020/sks6v2m5kvt
#include
Cheap Tramadol Overnight stack;
// int fieldSize;
//public:
// FieldOld(int size):fieldSize(size){}
//
// int get(int x, int y){
// if(x<0 || x > (fieldSize-1) || y < 0 || y > (fieldSize - 1))
// return -1;
// POS pos(x,y);
// std::vector
::iterator it;
// for(it = stack.begin(); it!= stack.end(); ++it){
// if((*it) == pos)
// return 1;
// }
// return 0;
// }
// void push(int x, int y){
// POS pos(x,y);
// stack.push_back(pos);
// }
// void pop(){
// if(!stack.empty())
// stack.pop_back();
// }
//
// int size(){
// return fieldSize;
// }
//
// int stackSize(){
// return stack.size();
// }
//
//
//};
class Field{
typedef std::pair
https://fundacionfdi.org/2023/09/20/lee5xh90k3 stack;
//std::vector< std::vector
::iterator it;
//for(it = stack.begin(); it!= stack.end(); ++it){
// if((*it) == pos)
// return 1;
//}
if(field[x][y] == 1)
return 1;
return 0;
}
void push(int x, int y){
POS pos(x,y);
stack.push_back(pos);
field[x][y]=1;
// attack(x,y,-1);
}
void pop(){
if(!stack.empty()){
/*POS pos(*(stack.end()));*/
//field[pos.first][pos.second] = 0;
POS pos = *(stack.rbegin());
field[pos.first][pos.second] = 0;
// attack(pos.first,pos.second,1);
stack.pop_back();
}
}
int size(){
return fieldSize;
}
int stackSize(){
return stack.size();
}
//void attackField(int x, int y, int damage){
// field[x][y]+=damage;
//}
//int attackDirection(int x, int y, int xx, int yy, int damage) {
// int value = get(x + xx, y + yy);
// if (value == -1)
// return 0;
// if (value == 0 || value == -2){
// attackField(x+xx, y+yy, damage);
// return attackDirection(x + xx, y + yy, xx, yy, damage);
// }
// return 1;
//}
//void attack(int x, int y, int damage){
// attackDirection(x,y,1,1,damage);
// attackDirection(x,y,1,-1,damage);
// attackDirection(x,y,-1,1,damage);
// attackDirection(x,y,-1,-1,damage);
//}
};
class LittleBishops{
int numberOfBishops;
unsigned long long counter;
Field field;
int checkDirection(int x, int y, int xx, int yy) {
int value = field.get(x + xx, y + yy);
if (value == -1)
return 0;
if (value == 0 ) {
return checkDirection(x + xx, y + yy, xx, yy);
}
return 1;
}
bool isAttack(int x, int y){
//for (int i = -1; i <= 0; i++) {
// for (int j = -1; j <= 1; j++) {
// if (i != 0 && j != 0)
// if (checkDirection(x, y, i, j) == 1)
// return true;
// }
//}
if (checkDirection(x, y, -1, 1) == 1)
return true;
if (checkDirection(x, y, -1, -1) == 1)
return true;
return false;
}
void print(){
for(int x = 0; x < field.size(); ++x){
for( int y = 0; y < field.size(); ++y){
std::cout<