Submission #466073

#TimeUsernameProblemLanguageResultExecution timeMemory
466073TeaTimeRed-blue table (IZhO19_stones)C++17
0 / 100
30 ms1228 KiB
//#pragma GCC optimize("O3") //#pragma GCC target("avx2") #include <iostream> #include <vector> #include <string> #include <algorithm> #include <map> #include <set> #include <queue> #include <unordered_map> #include <cmath> using namespace std; #define fastInp cin.tie(0); cout.tie(0); ios_base::sync_with_stdio(0); typedef long long ll; typedef long double ld; const ll SZ = 1e6 + 100, INF = 1e9, AM = 2, K = 26; const vector<ll> P = { 1774, 177 }; const vector<ll> MOD = { ll(1e9 + 7), ll(1e9 + 9) }; ll n, m; signed main() { fastInp; ll t; cin >> t; while (t--) { cin >> n >> m; if (m >= n) { for (int i = 0; i < n; i++) { for (int j = 0; j < m; j++) { if (i % 2 == 0) { cout << "-"; } else { cout << "+"; } } cout << "\n"; } } else { for (int i = 0; i < n; i++) { for (int j = 0; j < m; j++) { if (j % 2 != 0) { cout << "-"; } else { cout << "+"; } } cout << "\n"; } } } return 0; }
#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...