Submission #1111329

#TimeUsernameProblemLanguageResultExecution timeMemory
1111329vjudge1Tetris (COCI17_tetris)C++17
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> using namespace std; const int N = 505; int n, m; char a[N][N]; int b[5]; int main() { ios::sync_with_stdio(false); cin.tie(0); cin >> n >> m; for (int i = 0; i < n; ++i) { cin >> a[i]; } for (int i = 0; i < n; ++i) { for (int j = 0; j < m; ++j) { if (a[i][j] == '.') { continue; } if (i+1 < n && j+1 < m && a[i+1][j] == a[i][j] && a[i][j+1] == a[i][j] && a[i+1][j+1] == a[i][j]) { ++b[0]; } if (j+3 < m && a[i][j+1] == a[i][j] && a[i][j+2] == a[i][j] && a[i][j+3] == a[i][j]) { ++b[1]; } if (i+3 < n && a[i+1][j] == a[i][j] && a[i+2][j] == a[i][j] && a[i+3][j] == a[i][j]) { ++b[1]; } for (int i = 0; i < 5; ++i) { cout << b[i] << endl; } return 0; }

Compilation message (stderr)

tetris.cpp: In function 'int main()':
tetris.cpp:55:1: error: expected '}' at end of input
   55 | }
      | ^
tetris.cpp:20:31: note: to match this '{'
   20 |   for (int i = 0; i < n; ++i) {
      |                               ^
tetris.cpp:55:1: error: expected '}' at end of input
   55 | }
      | ^
tetris.cpp:9:12: note: to match this '{'
    9 | int main() {
      |            ^