제출 #1120568

#제출 시각아이디문제언어결과실행 시간메모리
1120568vjudge1Tracks in the Snow (BOI13_tracks)C++17
2.19 / 100
246 ms16460 KiB
#include <bits/stdc++.h> using namespace std; #define ld double const int INF = 1e18; const int mod = 12345; const int sz = 4e3 + 5; char a[sz][sz]; int main() { ios_base::sync_with_stdio(0);cin.tie(0); int n , m; cin >> n >> m; int cnt1 = 0 , cnt2 = 0; for(int i = 1;i <= n;i++){ for(int j = 1;j <= m;j++){ cin >> a[i][j]; if(a[i][j] == 'R') cnt1++; if(a[i][j] == 'F') cnt2++; } } if(cnt1 == 0 && cnt2) { cout << 1 << endl; } else if(cnt1 && cnt2 == 0) { cout << 1 << endl; } else if(cnt1 == 0 && cnt2 == 0) { cout << 0 << endl; } else{ cout << 2 << endl; } }

컴파일 시 표준 에러 (stderr) 메시지

tracks.cpp:7:17: warning: overflow in conversion from 'double' to 'int' changes value from '1.0e+18' to '2147483647' [-Woverflow]
    7 | const int INF = 1e18;
      |                 ^~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...