#include <bits/stdc++.h>
#pragma GCC optimize ("O3,unroll-loops")
#pragma GCC target("avx2")
#define pb push_back
#define F first
#define S second
#define all(a) a.begin(),a.end()
#define pii pair <int,int>
#define PII pair<pii , pii>
#define int long long
#define sz(v) (int)v.size()
#define rep(i , a , b) for(int i=a;i <= (b);i++)
#define per(i , a , b) for(int i=a;i >= (b);i--)
#define deb(x) cout <<#x << " : " << x << "\n" ;
using namespace std ;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
const int maxn = 2e5 + 10 , maxm = 1e6+10 , lg = 18 , inf= 1e18 , mod = 998244353 ;
signed main(){
ios_base::sync_with_stdio(false);cin.tie(0);
int t ;
cin >> t;
while(t--){
int n , m ;
cin >> n >> m ;
if(n+(m-1)/2 >= m+(n-1)/2){
rep(i , 1, n){
rep(j ,1 , m){
if(j%2==1){
cout << "+" ;
}else{
cout << "-" ;
}
}
cout << "\n";
}
}else{
rep(i , 1 ,n){
rep(j , 1, m){
if(i%2==0){
cout << "+" ;;
}else{
cout << "-" ;
}
}
cout << "\n";
}
}
}
}
/*
*/
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
344 KB |
Expected integer, but "---" found |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
344 KB |
Expected integer, but "---------------------------------------------" found |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
344 KB |
Expected integer, but "---" found |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
28 ms |
1424 KB |
Expected integer, but "+-+-+-+-+-+-+-+-+-+-+" found |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
16 ms |
1368 KB |
Expected integer, but "+-+-+-+-+-+-+-+-+-+-+-+-" found |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
344 KB |
Expected integer, but "---" found |
2 |
Halted |
0 ms |
0 KB |
- |