Submission #331098

#TimeUsernameProblemLanguageResultExecution timeMemory
331098EnkhmunkhRed-blue table (IZhO19_stones)C++14
0 / 100
35 ms1516 KiB
#include <bits/stdc++.h> using namespace std; void solution () { int n, m; cin >> n >> m; char arr[n][m]; cout << n + n/2 << "\n"; if (n < m) { swap(n, m); } for (int i = 0; i < m; i++) { for (int j = 0, a = n/2+1; j < n; j++) { if (a != 0) { arr[i][j] = '+'; a--; }else { arr[i][j] = '-'; } cout << arr[i][j]; } cout << "\n"; } } int main () { ios::sync_with_stdio(false); cin.tie(NULL); int t; cin >> t; while (t--) solution(); }
#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...
#Verdict Execution timeMemoryGrader output
Fetching results...