#include <bits/stdc++.h>
typedef long long ll;
using namespace std;
void solve(){
int n, m;
cin >> n >> m;
cout << ceil((double)n/2)+ceil((double)m/2) << "\n";
for(int i=0; i<n; i++){
for(int j=0; j<m; j++){
if(i>n/2||((j==m-1||j==0)&&i!=n-1)){
cout << "+";
}
else{
cout << "-";
}
}
cout << "\n";
}
}
int main()
{
ios::sync_with_stdio(0);
cin.tie(0);
int t;
cin >> t;
while(t--){
solve();
}
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
204 KB |
Output is correct |
2 |
Incorrect |
1 ms |
204 KB |
in the table A+B is not equal to 2 |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
332 KB |
in the table A+B is not equal to 25 |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
204 KB |
Output is correct |
2 |
Incorrect |
1 ms |
204 KB |
in the table A+B is not equal to 2 |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
28 ms |
1316 KB |
in the table A+B is not equal to 60 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
26 ms |
1204 KB |
in the table A+B is not equal to 24 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
204 KB |
Output is correct |
2 |
Incorrect |
1 ms |
204 KB |
in the table A+B is not equal to 2 |