Submission #1156238

#TimeUsernameProblemLanguageResultExecution timeMemory
1156238KaleemRazaSyedRed-blue table (IZhO19_stones)C++20
Compilation error
0 ms0 KiB
#include<bits/stdc++.h> using namespace std; void solve() { int n, m; cin >> n >> m; bool ans[n][m]; int sz = 0; if(n + (m + 1) / 2 >= m + (n + 1) / 2) { memset(ans, false, sizeof(ans)); sz = n + (m + 1) / 2 - 1; for(int i = 0; i < n; i ++) for(int j = 0; j < m / 2 + 1; j++) ans[i][j] = 1; } else { memset(ans, true, sizeof(ans)); sz = m + (n + 1) / 2 - 1; for(int i = 0; i < n / 2 + 1; i++) for(int j = 0; j < m; j ++) ans[i][j] = 0;s } cout << sz << endl; for(int i = 0; i < n; i ++) { for(int j = 0; j < m; j ++) cout << (ans[i][j] ? '+' : '-'); cout << endl; } } int main() { int t; cin >> t; while(t--) solve(); return 0; }

Compilation message (stderr)

stones.cpp: In function 'void solve()':
stones.cpp:25:25: error: 's' was not declared in this scope; did you mean 'sz'?
   25 |           ans[i][j] = 0;s
      |                         ^
      |                         sz