Submission #892447

#TimeUsernameProblemLanguageResultExecution timeMemory
892447tnknguyen_Tracks in the Snow (BOI13_tracks)C++14
2.19 / 100
197 ms63472 KiB
#include <bits/stdc++.h> using namespace std; #define endl '\n' /** * IDEA: */ const int sz = 4e3 + 5; int m, n; int a[sz][sz], vi[sz][sz], d[sz][sz]; int dx[4] = {0, 1, 0, -1}; int dy[4] = {1, 0, -1, 0}; bool valid(int x, int y){ return (x >= 1 && x <= m && y >= 1 && y <= n); } int main() { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); // freopen("main.inp","r",stdin); // freopen("main.out","w",stdout); cin>>m>>n; int f1 = 0, f2 = 0; for(int i=1;i<=m;++i){ for(int j=1;j<=n;++j){ char c; cin>>c; if(c == '.'){ a[i][j] = -1; continue; } if(c == 'F'){ a[i][j] = 1; f1 = 1; } else{ a[i][j] = 2; f2 = 1; } } } cout<<f1 + f2; return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...