Submission #848218

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
8482182023-09-11 16:44:15jlassTracks in the Snow (BOI13_tracks)C++17
100 / 100
989 ms46580 KiB
#include <bits/stdc++.h>
typedef long long ll;
typedef long double ld;
using namespace std;
vector<pair<int,int>> dirs = {{0,-1},{0,1},{-1,0},{1,0}};
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
int R, C; cin >> R >> C;
vector<string> v(R);
for(auto &x: v) cin >> x;
vector<vector<bool>> visited(R,vector<bool>(C,false));
int cnts = 0;
queue<pair<int,int>> rabbits;
queue<pair<int,int>> foxes;
if(v[0][0] == 'R') {
rabbits.push({0,0});
} else if(v[0][0] == 'F') {
foxes.push({0,0});
}
while(true) {
// cout << "rabbits: " << rabbits.size() << " foxes: " << foxes.size() << "\n";
if(rabbits.size()) {
while(rabbits.size()) {
pair<int,int> p = rabbits.front();
rabbits.pop();
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...