Submission #3239595
Source Code Expand
#include "bits/stdc++.h"
#include <unordered_set>
#include <unordered_map>
//#include <iostream>//POJ
//#include <vector>
//#include <string>
//#include <iomanip>
//#include <math.h>
//#include <algorithm>
//#include <cstring>
using namespace std;
#define setc cin.tie(0);ios::sync_with_stdio(0)
#define dd(n) cout<<fixed<<setprecision(n)
#define inp(x) (cin>>x,x)
#define ind(x) (cin>>x,--x)
#define repi(i,a,b) for(int i=(a), i##_len=(b); i<i##_len; ++i)
#define rep(i,n) repi(i,0,n)
#define repi_(i,a,b) for(int i=(a), i##_len=(b); i<=i##_len; ++i)
#define rep_(i,n) repi_(i,0,n)
#define repir(i,a,b) for(int i=(a)-1, i##_first=(b); i>=i##_first; --i)
#define repr(i,n) repir(i,n,0)
#define repir_(i,a,b) for(int i=(a), i##_first=(b); i>=i##_first; --i)
#define repr_(i,n) repir_(i,n,0)
#define all(x) (x).begin(),(x).end()
#define vsort(v) sort((v).begin(), (v).end())
#define vcsort(v,c) sort((v).begin(),(v).end(),c)
#define gsort(v) tsort(v); reverse((v).begin(), (v).end())
#define vrev(v) reverse((v).begin(), (v).end())
#define fnd(v,x) ((v).find(x)!=string::npos)
#define mod(a,b) (a<0?a%b+abs(b):a%b)
#define cl(a,b) (a+b-1/b)
//template<typename T> T vpop(vector<T> *v) {
// T res = v->back();
// v->pop_back();
// return res;
//}
//char vpop(string *v) {
// char res = v->back();
// v->pop_back();
// return res;
//}
#define siz(v) ((int)(v).size())
#define ers(v, n) (v).erase((v).begin() + n)
#define cnt(v, n) count(all(v), n)
#define vmin(v) *min_element(v.begin(), v.end())
#define vmax(v) *max_element(v.begin(), v.end())
#define contain(q) !q.empty()
#define cont(q) !q.empty()
//#define qpop(q, a, b) a=q.back().first;b=q.back().second;q.pop()
//#define pqpop(p, a, b) a=q.top().first;b=q.top().second;q.pop()
#define el "\n"
#define sp " "
#define pi 3.14159265358979
#define co(x) cout<<x<<el
#define coc(c, a, b) if(c)co((a));else co((b))
#define cim(x) {cin>>x;--x;}
#define cim2(a,b) {cin>>a>>b;--a;--b;}
#define cosp(x) cout<<(x)<<' '
#define YES(c) coc(c,"YES", "NO")
#define Yes(c) coc(c,"Yes", "No")
#define yes(c) coc(c,"yes", "no")
#define POSSIBLE(c) coc(c, "POSSIBLE", "IMPOSSIBLE")
#define Possible(c) coc(c, "Possible", "Impossible")
#define possible(c) coc(c, "possible", "impossible")
#define inf INT_MAX
#define wildcard(T) numeric_limits<T>::min()
#define noway() {co(-1);gc();return 0;}
#define pb push_back
#define pq priority_queue
#define np next_permutation
#ifdef tqktmp_2
#define gc() getchar(); getchar()
#else
#define gc() 1
#endif
const unsigned int bf0 = (1 << 0);
const unsigned int bf1 = (1 << 1);
const unsigned int bf2 = (1 << 2);
const unsigned int bf3 = (1 << 3);
const unsigned int bf4 = (1 << 4);
const unsigned int bf5 = (1 << 5);
const unsigned int bf6 = (1 << 6);
const unsigned int bf7 = (1 << 7);
const int _10j9p7 = 1000000007;
//#define lint long long
typedef long long lint;
typedef vector<int> IV; typedef vector<string> SV;
typedef vector<lint> LIV;
typedef vector<vector<int>> IVV;
typedef pair<int, int> P; typedef pair<lint, lint> LP;
typedef vector<P> PV; typedef vector<LP> LPV;
const int
dx8[8] ={ 0,1,1,1,0,-1,-1,-1 },
dy8[8] ={ 1,1,0,-1,-1,-1,0,1 },
dx9[9] ={ 0,1,1,1,0,0,-1,-1,-1 },
dy9[9] ={ 1,1,0,-1,0,-1,-1,0,1 },
dx5[5] ={ 0,1,0,0,-1 },
dy5[5] ={ 1,0,0,-1,0 },
dx4[4] ={ 0,1,0,-1 },
dy4[4] ={ 1,0,-1,0 };
//template<class... A> void cim_(A... args) {
// for (A *i : initializer_list<A*>{ args... }) {
// cin>>*i;--*i;
// }
// return;
//}
template<class T>inline bool maxi(T &a, const T &b) { if (a < b) { a = b; return 1; } return 0; }
template<class T>inline bool mini(T &a, const T &b) { if (b < a) { a = b; return 1; } return 0; }
int main(){
setc;
lint a,b;cin>>a>>b;--a;--b;
SV ma;
string s="..................................................##################################################";
rep(i,100)ma.pb(s);
LP cur={0,99};
rep(i, a){
ma[cur.first][cur.second]='.';
cur.first+=2;
if (cur.first>99){
cur.first=0;cur.second-=2;
}
}cur={0,0};
rep(i, b){
ma[cur.first][cur.second]='#';
cur.first+=2;
if (cur.first>99){
cur.first=0; cur.second+=2;
}
}
cout<<100<<sp<<100<<el;
rep(j,100)co(ma[j]);
gc();
}
Submission Info
Submission Time |
|
Task |
D - Grid Components |
User |
Tqk |
Language |
C++14 (GCC 5.4.1) |
Score |
500 |
Code Size |
4285 Byte |
Status |
AC |
Exec Time |
1 ms |
Memory |
256 KB |
Judge Result
Set Name |
Sample |
All |
Score / Max Score |
0 / 0 |
500 / 500 |
Status |
|
|
Set Name |
Test Cases |
Sample |
sample-01.txt, sample-02.txt, sample-03.txt, sample-04.txt |
All |
01.txt, 02.txt, 03.txt, 04.txt, 05.txt, 06.txt, 07.txt, 08.txt, 09.txt, 10.txt, 11.txt, 12.txt, 13.txt, 14.txt, 15.txt, 16.txt, 17.txt, 18.txt, 19.txt, 20.txt, 21.txt, 22.txt, 23.txt, 24.txt, 25.txt, 26.txt, 27.txt, 28.txt, 29.txt, 30.txt, 31.txt, 32.txt, 33.txt, 34.txt, 35.txt, 36.txt, 37.txt, 38.txt, 39.txt, 40.txt, sample-01.txt, sample-02.txt, sample-03.txt, sample-04.txt |
Case Name |
Status |
Exec Time |
Memory |
01.txt |
AC |
1 ms |
256 KB |
02.txt |
AC |
1 ms |
256 KB |
03.txt |
AC |
1 ms |
256 KB |
04.txt |
AC |
1 ms |
256 KB |
05.txt |
AC |
1 ms |
256 KB |
06.txt |
AC |
1 ms |
256 KB |
07.txt |
AC |
1 ms |
256 KB |
08.txt |
AC |
1 ms |
256 KB |
09.txt |
AC |
1 ms |
256 KB |
10.txt |
AC |
1 ms |
256 KB |
11.txt |
AC |
1 ms |
256 KB |
12.txt |
AC |
1 ms |
256 KB |
13.txt |
AC |
1 ms |
256 KB |
14.txt |
AC |
1 ms |
256 KB |
15.txt |
AC |
1 ms |
256 KB |
16.txt |
AC |
1 ms |
256 KB |
17.txt |
AC |
1 ms |
256 KB |
18.txt |
AC |
1 ms |
256 KB |
19.txt |
AC |
1 ms |
256 KB |
20.txt |
AC |
1 ms |
256 KB |
21.txt |
AC |
1 ms |
256 KB |
22.txt |
AC |
1 ms |
256 KB |
23.txt |
AC |
1 ms |
256 KB |
24.txt |
AC |
1 ms |
256 KB |
25.txt |
AC |
1 ms |
256 KB |
26.txt |
AC |
1 ms |
256 KB |
27.txt |
AC |
1 ms |
256 KB |
28.txt |
AC |
1 ms |
256 KB |
29.txt |
AC |
1 ms |
256 KB |
30.txt |
AC |
1 ms |
256 KB |
31.txt |
AC |
1 ms |
256 KB |
32.txt |
AC |
1 ms |
256 KB |
33.txt |
AC |
1 ms |
256 KB |
34.txt |
AC |
1 ms |
256 KB |
35.txt |
AC |
1 ms |
256 KB |
36.txt |
AC |
1 ms |
256 KB |
37.txt |
AC |
1 ms |
256 KB |
38.txt |
AC |
1 ms |
256 KB |
39.txt |
AC |
1 ms |
256 KB |
40.txt |
AC |
1 ms |
256 KB |
sample-01.txt |
AC |
1 ms |
256 KB |
sample-02.txt |
AC |
1 ms |
256 KB |
sample-03.txt |
AC |
1 ms |
256 KB |
sample-04.txt |
AC |
1 ms |
256 KB |