# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
236429 |
2020-06-02T08:20:26 Z |
vO_Ov |
Emacs (COCI20_emacs) |
C++14 |
|
0 ms |
0 KB |
// 失敗するからこそ そこから立ち向かって行く強さがあってそんな強さが本当の強さだと私は思うから
#include <bits/stdc++.h>
using namespace std;
template<typename T> ostream& operator<<(ostream &os, const vector<T> &v) { os << '{'; string sep; for (const auto &x : v) os << sep << x, sep = ", "; return os << '}'; }
template<typename T, size_t size> ostream& operator<<(ostream &os, const array<T, size> &arr) { os << '{'; string sep; for (const auto &x : arr) os << sep << x, sep = ", "; return os << '}'; }
template<typename A, typename B> ostream& operator<<(ostream &os, const pair<A, B> &p) { return os << '(' << p.first << ", " << p.second << ')'; }
#define fi first
#define se second
#define pb push_back
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
typedef long long lint;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
char grid[2500][2500];
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
memset(grid, '.', sizeof grid);
cin >> n >> m;
for(int i = 0; i < n; i++){
for(int j = 0; j < m; j++){
cin >> grid[i][j];
}
}
int ans = 0;
for(int i = 0; i < n; i++){
for(int j = 0; j < m; j++){
if(grid[i][j] == '*' && grid[i][j + 1] == '.' && grid[i + 1][j] == '.'){
ans++;
}
}
}
cout << ans << '\n';
return 0;
}
// Write Here
Compilation message
emacs.cpp: In function 'int main()':
emacs.cpp:24:12: error: 'n' was not declared in this scope
cin >> n >> m;
^
emacs.cpp:24:12: note: suggested alternative: 'yn'
cin >> n >> m;
^
yn
emacs.cpp:24:17: error: 'm' was not declared in this scope
cin >> n >> m;
^
emacs.cpp:24:17: note: suggested alternative: 'tm'
cin >> n >> m;
^
tm