Submission #633704

#TimeUsernameProblemLanguageResultExecution timeMemory
633704devvopsAwesome Arrowland Adventure (eJOI19_adventure)C++17
10 / 100
1 ms340 KiB
#include <bits/stdc++.h> using namespace std; #define pb push_back #define F first #define S second #define ll long long #define ull unsigned long long #define all(x) x.begin(), x.end() #define speed ios_base::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL) #define file freopen("palindrome.in", "r", stdin), freopen("palindrome.out", "w", stdout); int main() { speed; int n, m, ans = 0; cin >> n >> m; char a[n + 10][m + 10]; bool f = 0; for(int i = 1; i <= n; i++){ for(int j = 1; j <= m; j++){ cin >> a[i][j]; if(a[i][j] == 'X' && j != m){ f = 1; } } } if(f){ cout << -1; } else{ cout << 0; } // for(int i = 1; i <= n; i++){ // if(a[i][1] == 'X' && i != n){ // cout << -1; // return 0; // } // if(a[i][1] == 'E') ans++; // else if(a[i][1] == 'S') ans = ans; // else if(a[i][1] == 'W') ans += 3; // else if(a[i][1] == 'N') ans += 2; // } // cout << ans; }

Compilation message (stderr)

adventure.cpp: In function 'int main()':
adventure.cpp:14:15: warning: unused variable 'ans' [-Wunused-variable]
   14 |     int n, m, ans = 0;
      |               ^~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...