ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1249. Ancient Necropolis

Show all messages Hide all messages

delete iostream and using namespace std.
all cin cout replace on scanf and pritf
write in start of code: #define CRT_SECURE_NO_WARNINGS
and #include<cstdio>
and behind your vectors,pair and queue write std::
do vector WITHOUT ANY INTS, ALL BOOL
DONT USE PUSH_BACK its really slow, just write size of vector
Example:
>std::vector<std::vector<bool>> a(n);
>std::vector<bool> b(m);
and call with a[i][j] or something else;
If you look at other aspects of the task, then EASY BFS