# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
848218 | jlass | Tracks in the Snow (BOI13_tracks) | C++17 | 989 ms | 46580 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#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();
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |