-
Notifications
You must be signed in to change notification settings - Fork 32
Expand file tree
/
Copy pathcodejam1.cpp
More file actions
58 lines (56 loc) · 1.27 KB
/
codejam1.cpp
File metadata and controls
58 lines (56 loc) · 1.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#include<bits/stdc++.h>
#define fast ios_base::sync_with_stdio(false);cin.tie(NULL)
#include<vector>
#include <algorithm>
#define ll long long
#define lld long double
#define lli long long int
#define sza(x) ((int)x.size())
#define all(a) (a).begin(),(a).end()
#define vll vector<long long int>
using namespace std;
void inpoutp(){
fast;
#ifndef ONLINE_JUDGE
#endif
}
int main()
{
ll k;
cin>>k;
for(ll test=1;test<=k;test++)
{
ll a,b;
cin>>a>>b;
a=(a*2+1);
b=(b*2+1);
vector<vector<char>> hole(a,vector<char>(b));
for(ll i=0;i<a;i++)
{
for(ll j=0;j<b;j++)
{
if(i%2==0 and j%2==0)
hole[i][j]='+';
else if(i%2==0 and j%2!=0)
hole[i][j]='-';
else if(i%2!=0 and j%2==0)
hole[i][j]='|';
else if(i%2!=0 and j%2!=0)
hole[i][j]='.';
}
}
hole[0][0]='.';
hole[0][1]='.';
hole[1][0]='.';
hole[1][1]='.';
cout<<"Case #"<<test<<":"<<endl;
for(ll i=0;i<a;i++)
{
for(ll j=0;j<b;j++)
{
cout<<hole[i][j];
}
cout<<endl;
}
}
}