Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define _CRT_SECURE_NO_WARNINGS
- #pragma comment(linker, "/stack:64000000")
- #include <string>
- #include <vector>
- #include <map>
- #include <list>
- #include <iterator>
- #include <cassert>
- #include <set>
- #include <queue>
- #include <iostream>
- #include <sstream>
- #include <stack>
- #include <deque>
- #include <cmath>
- #include <memory.h>
- #include <cstdlib>
- #include <cstdio>
- #include <cctype>
- #include <algorithm>
- #include <utility>
- #include <time.h>
- #include <complex>
- using namespace std;
- #define FOR(i, a, b) for(int i=(a);i<(b);i++)
- #define RFOR(i, b, a) for(int i=(b)-1;i>=(a);--i)
- #define FILL(A,value) memset(A,value,sizeof(A))
- #define ALL(V) V.begin(), V.end()
- #define SZ(V) (int)V.size()
- #define PB push_back
- #define MP make_pair
- #define Pi 3.14159265358979
- #define x0 ikjnrmthklmnt
- #define y0 lkrjhkltr
- #define y1 ewrgrg
- typedef long long Int;
- typedef unsigned long long UInt;
- typedef vector<int> VI;
- typedef pair<int, int> PII;
- typedef pair<Int, Int> PLL;
- typedef pair<double, double> PDD;
- typedef complex<double> base;
- const int INF = 1000000000;
- const int BASE = 1000000007;
- const int MAX = 200;
- const int MAXV = 100007;
- const int MAXE = 100000;
- const int ADD = 1000000;
- const int MOD = 1000000007;
- const int CNT = 800;
- int a[MAX][MAX];
- int k , n;
- bool check()
- {
- FOR(x1,0,n)
- FOR(y1,0,n)
- {
- if (!a[x1][y1]) continue;
- FOR(x2,x1 + 1, n)
- {
- if (!a[x2][y1]) continue;
- FOR(y2,y1 + 1 , n)
- {
- if (a[x1][y2] && a[x2][y2]) return 0;
- }
- }
- }
- return 1;
- }
- int main()
- {
- //freopen("in.txt", "r", stdin);
- //freopen("distance.in", "r", stdin);
- //freopen("distance.out", "w", stdout);
- //freopen("out.txt" , "w" , stdout);
- k = 13;
- n = k * k;
- FOR(i,0,k)
- {
- FOR(j,0,k)
- {
- a[i][i * k + j] = 1;
- }
- }
- FOR(t,1,k)
- {
- FOR(i,0,k)
- {
- FOR(j,0,k)
- {
- a[t * k + i][j * k + (i + (t - 1) * j) % k] = 1;
- }
- }
- }
- n = min(n , 150);
- int sum = 0;
- FOR(i,0,n)
- {
- FOR(j,0,n)
- {
- sum += a[i][j];
- }
- }
- //cout << sum << endl;
- cout << n << endl;
- FOR(i,0,n)
- {
- FOR(j,0,n)
- {
- if (a[i][j])
- {
- cout << 'O';
- }
- else
- {
- cout << '.';
- }
- }
- cout << endl;
- }
- //cout << check() << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement