Submission #988483

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
9884832024-05-24 22:02:48kflippyTracks in the Snow (BOI13_tracks)C++17
100 / 100
1087 ms125020 KiB
#include <bits/stdc++.h>
using namespace std;
int h, w;
char s[4000][4000];
bool chk(pair<int, int> c)
{
return c.first > -1 && c.first < h && c.second < w && c.second > -1 && s[c.first][c.second] != '.';
}
int
main()
{
cin >> h >> w;
deque<pair<int, int>> q;
vector<vector<int>> d(h, vector<int>(w));
d[0][0] = 1;
for(int i = 0; i < h; ++i) {
for(int j = 0; j < w; ++j) {
cin >> s[i][j];
}
}
q.push_front({0, 0});
vector<int> dx = {-1, 0, 1, 0}, dy = {0, 1, 0, -1};
int ans = 0;
while(!q.empty()) {
pair<int, int> x = q.front();
q.pop_front();
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...