Submission #168679

#TimeUsernameProblemLanguageResultExecution timeMemory
168679Atashka01Red-blue table (IZhO19_stones)C++11
0 / 100
2 ms376 KiB
//Euzubillahimines-seytanir-rajim Bismillahir-rahmanir-rahym /* ID: TASK: LANG: C++ */ #include <iostream> #include <vector> #include <map> #include <stack> #include <string> #include <algorithm> #include <cmath> #include <queue> #define pb push_back #define ll long long #define ff first #define ss second #define mp make_pair #define PII pair<int,int> #define inf 1000000001 using namespace std; int t; int main(){ cin>>t; while(t--){ int n, m; cin>>n>>m; if( n == 1 && m == 1 ) cout<<"1\n+\n"; else if( n == 1 && m == 2 ) cout<<"2\n--\n"; else if( n == 1 && m == 3 ) cout<<"3\n---\n"; else if( n == 1 && m == 4 ) cout<<"4\n----\n"; else if( n == 2 && m == 1 ) cout<<"2\n+\n+\n"; else if( n == 2 && m == 2 ) cout<<"2\n++\n++\n"; else if( n == 2 && m == 3 ) cout<<"3\n---\n---\n"; else if( n == 2 && m == 4 ) cout<<"4\n----\n----"; else if( n == 3 && m == 1 ) cout<<"3\n+\n+\n+\n"; else if( n == 3 && m == 2 ) cout<<"3\n++\n++\n++\n"; else if( n == 3 && m == 3 ) cout<<"4\n++-\n++-\n+++\n"; else if( n == 3 && m == 4 ) cout<<"5\n---+\n----\n+++-\n"; else if( n == 4 && m == 1 ) cout<<"4\n+\n+\n+\n+\n"; else if( n == 4 && m == 2 ) cout<<"4\n++\n++\n++\n++\n"; else if( n == 4 && m == 3 ) cout<<"5\n++-\n++-\n++-\n++-\n"; else if( n == 4 && m == 4 ) cout<<"5\n----\n----\n----\n++++\n"; } }
#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...