Submission #920096

# Submission time Handle Problem Language Result Execution time Memory
920096 2024-02-02T04:00:09 Z thienbao1602 Tracks in the Snow (BOI13_tracks) C++17
2.1875 / 100
228 ms 16464 KB
#include    <bits/stdc++.h>
#define SKY
#define ll long long
#define ld long double
#define MASK(x) (1LL << x)
#define sz(x) (int)x.size()
#define ii pair<ll, ll>
#define fi first
#define se second
#define mp make_pair
#define pb push_back
#define pf push_front
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define set0(d) memset(d, 0, sizeof(d))
using namespace std;

const int LOG = 20;
const int base = 311;
const ll inf = 1e18;
const int block = 400;
const ll MOD = 1e9 + 7;
const int mxN = 1e6 + 66;
const int mxN2D = 4e3 + 55;
const int x[] = {0, 1, 0, -1};
const int y[] = {1, 0, -1, 0};

int H, W;
char grid[mxN2D][mxN2D];

bool safe(int x, int y)
{
    return (x >= 0 && x < H && y >= 0 && y < W);
}

void solve()
{
    cin >> H >> W;
    bool is_rabbit = false;
    bool is_fox = false;
    for (int r=0; r<H; r++)
    {
        for(int c=0; c<W; c++)
        {
            cin >> grid[r][c];
            if (grid[r][c] == 'F') is_fox =  true;
            if (grid[r][c] == 'R') is_rabbit = true;
        }
    }
    cout << is_fox + is_rabbit;
}

int main()
{
    ios_base::sync_with_stdio(false);
    #ifdef SKY
//    freopen("test.inp", "r", stdin);
//    freopen("test.out", "w", stdout);
    #endif //SKY
    solve();
    return 0;
}

# Verdict Execution time Memory Grader output
1 Incorrect 5 ms 2648 KB Output isn't correct
2 Incorrect 0 ms 348 KB Output isn't correct
3 Incorrect 1 ms 2852 KB Output isn't correct
4 Incorrect 3 ms 2904 KB Output isn't correct
5 Incorrect 2 ms 2648 KB Output isn't correct
6 Incorrect 1 ms 344 KB Output isn't correct
7 Incorrect 1 ms 2648 KB Output isn't correct
8 Incorrect 1 ms 2652 KB Output isn't correct
9 Incorrect 1 ms 2648 KB Output isn't correct
10 Incorrect 2 ms 2652 KB Output isn't correct
11 Incorrect 1 ms 2648 KB Output isn't correct
12 Incorrect 3 ms 2648 KB Output isn't correct
13 Incorrect 2 ms 2648 KB Output isn't correct
14 Incorrect 2 ms 2648 KB Output isn't correct
15 Incorrect 5 ms 2652 KB Output isn't correct
16 Incorrect 6 ms 2648 KB Output isn't correct
17 Incorrect 5 ms 2648 KB Output isn't correct
18 Incorrect 3 ms 2648 KB Output isn't correct
# Verdict Execution time Memory Grader output
1 Incorrect 3 ms 15448 KB Output isn't correct
2 Incorrect 24 ms 6736 KB Output isn't correct
3 Incorrect 220 ms 16256 KB Output isn't correct
4 Incorrect 49 ms 8784 KB Output isn't correct
5 Incorrect 107 ms 12880 KB Output isn't correct
6 Incorrect 228 ms 16256 KB Output isn't correct
7 Incorrect 4 ms 16216 KB Output isn't correct
8 Incorrect 4 ms 15448 KB Output isn't correct
9 Incorrect 1 ms 344 KB Output isn't correct
10 Incorrect 1 ms 344 KB Output isn't correct
11 Incorrect 4 ms 15960 KB Output isn't correct
12 Incorrect 1 ms 2648 KB Output isn't correct
13 Incorrect 24 ms 6744 KB Output isn't correct
14 Incorrect 15 ms 4700 KB Output isn't correct
15 Incorrect 15 ms 4952 KB Output isn't correct
16 Incorrect 11 ms 2648 KB Output isn't correct
17 Incorrect 60 ms 8784 KB Output isn't correct
18 Incorrect 57 ms 8788 KB Output isn't correct
19 Incorrect 50 ms 8784 KB Output isn't correct
20 Incorrect 50 ms 8784 KB Output isn't correct
21 Incorrect 130 ms 12920 KB Output isn't correct
22 Incorrect 107 ms 12928 KB Output isn't correct
23 Incorrect 117 ms 10832 KB Output isn't correct
24 Incorrect 131 ms 12884 KB Output isn't correct
25 Incorrect 224 ms 16208 KB Output isn't correct
26 Correct 147 ms 14988 KB Output is correct
27 Incorrect 195 ms 16464 KB Output isn't correct
28 Incorrect 226 ms 16248 KB Output isn't correct
29 Incorrect 222 ms 16208 KB Output isn't correct
30 Incorrect 205 ms 15952 KB Output isn't correct
31 Incorrect 195 ms 14928 KB Output isn't correct
32 Incorrect 197 ms 16248 KB Output isn't correct