답안 #168679

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
168679 2019-12-15T08:53:33 Z Atashka01 Red-blue table (IZhO19_stones) C++11
0 / 100
2 ms 376 KB
//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";
		
	}
	
}
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 376 KB Output is correct
2 Incorrect 2 ms 256 KB Wrong answer
# 결과 실행 시간 메모리 Grader output
1 Incorrect 2 ms 256 KB Wrong answer
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 376 KB Output is correct
2 Incorrect 2 ms 256 KB Wrong answer
# 결과 실행 시간 메모리 Grader output
1 Incorrect 2 ms 376 KB Wrong answer
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 2 ms 376 KB Wrong answer
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 376 KB Output is correct
2 Incorrect 2 ms 256 KB Wrong answer