Submission #894317

#TimeUsernameProblemLanguageResultExecution timeMemory
894317GrayRed-blue table (IZhO19_stones)C++17
0 / 100
22 ms1480 KiB
#include<bits/stdc++.h> #define ll long long #define ff first #define ss second #define ln "\n" const ll INF = 2e18; const ll MOD = 1e9+7; using namespace std; void solve(){ ll x, y; cin >> x >> y; if (x>y){ ll fr = y-y/2; cout << x+y-fr << ln; // ll fc = x-x/2; for (ll rc=0; rc<x; rc++){ for (ll i=0; i<fr; i++){ cout << '+'; } for (ll i=fr; i<y; i++){ cout << '-'; } cout << ln; } }else{ ll fc = x-x/2; cout << y+x-fc << ln; for (ll rc=0; rc<fc; rc++){ for (ll i=0; i<y; i++){ cout << '-'; } cout << ln; } for (ll rc=fc; rc<x; rc++){ for (ll i=0; i<y; i++){ cout << '+'; } cout << ln; } } } int main(){ ios_base::sync_with_stdio(false); cin.tie(nullptr); ll t=1; cin >> t; while (t--) solve(); }
#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...