Submission #771443

#TimeUsernameProblemLanguageResultExecution timeMemory
771443NoLoveTracks in the Snow (BOI13_tracks)C++14
2.19 / 100
164 ms12188 KiB
/**
 *    author : Lăng Trọng Đạt
 *    creater: 2023-07-03
**/
#include <iostream>
#include <algorithm>
using namespace std;

#define int int64_t

const int MAXN = 4e3 + 5;
//int nums[MAXN];
int w, h;
char tmp;
bool f = false, r = false;

int32_t main() {
    cin.tie(0)->sync_with_stdio(0);
    if (fopen("hi.inp", "r")) {
        freopen("hi.inp", "r", stdin);
    }

    cin >> w >> h;
    while (cin >> tmp) {
        f |= tmp == 'F';
        r |= tmp == 'R';
    }
    if (f & r) cout << 2;
    else cout << 1;
}

Compilation message (stderr)

tracks.cpp: In function 'int32_t main()':
tracks.cpp:20:16: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
   20 |         freopen("hi.inp", "r", stdin);
      |         ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...