USACO section 2.4 Cow Tours(并查集+最短路)

SPSS_Process—简单&平行&链式中介模型 本篇文章介绍采用SPSS的插件Process对简单中介、链式中介、平行中介模型进行检验的操作方法及结果解读。 阅读详情
Cow Tours

Farmer John has a number of pastures on his farm. Cow paths connect some pastures with certain other pastures, forming a field. But, at the present time, you can find at least two pastures that cannot be connected by any sequence of cow paths, thus partitioning Farmer John's farm into multiple fields.

Farmer John would like add a single a cow path between one pair of pastures using the constraints below.

A field's `diameter' is defined to be the largest distance of all the shortest walks between any pair of pastures in the field. Consider the field below with five pastures, located at the points shown, and cow paths marked by lines:

                15,15   20,15
                  D       E
                  *-------*
                  |     _/|
                  |   _/  |
                  | _/    |
                  |/      |
         *--------*-------*
         A        B       C
         10,10   15,10   20,10

The `diameter' of this field is approximately 12.07106, since the longest of the set of shortest paths between pairs of pastures is the path from A to E (which includes the point set {A,B,E}). No other pair of pastures in this field is farther apart when connected by an optimal sequence of cow paths.

Suppose another field on the same plane is connected by cow paths as follows:

                         *F 30,15
                         / 
                       _/  
                     _/    
                    /      
                   *------ 
                   G      H
                   25,10   30,10

In the scenario of just two fields on his farm, Farmer John would add a cow path between a point in each of these two fields (namely point sets {A,B,C,D,E} and {F,G,H}) so that the joined set of pastures {A,B,C,D,E,F,G,H} has the smallest possible diameter.

Note that cow paths do not connect just because they cross each other; they only connect at listed points.

The input contains the pastures, their locations, and a symmetric "adjacency" matrix that tells whether pastures are connected by cow paths. Pastures are not considered to be connected to themselves. Here's one annotated adjacency list for the pasture {A,B,C,D,E,F,G,H} as shown above:

                A B C D E F G H
              A 0 1 0 0 0 0 0 0
              B 1 0 1 1 1 0 0 0
              C 0 1 0 0 1 0 0 0
              D 0 1 0 0 1 0 0 0
              E 0 1 1 1 0 0 0 0
              F 0 0 0 0 0 0 1 0
              G 0 0 0 0 0 1 0 1
              H 0 0 0 0 0 0 1 0

Other equivalent adjacency lists might permute the rows and columns by using some order other than alphabetical to show the point connections. The input data contains no names for the points.

The input will contain at least two pastures that are not connected by any sequence of cow paths.

Find a way to connect exactly two pastures in the input with a cow path so that the new combined field has the smallest possible diameter of any possible pair of connected pastures. Output that smallest possible diameter.

PROGRAM NAME: cowtour

INPUT FORMAT

 

Line 1:An integer, N (1 <= N <= 150), the number of pastures
Line 2-N+1:Two integers, X and Y (0 <= X ,Y<= 100000), that denote that X,Y grid location of the pastures; all input pastures are unique.
Line N+2-2*N+1:lines, each containing N digits (0 or 1) that represent the adjacency matrix as described above, where the rows' and columns' indices are in order of the points just listed.

SAMPLE INPUT (file cowtour.in)

8
10 10
15 10
20 10
15 15
20 15
30 15
25 10
30 10
01000000
10111000
01001000
01001000
01110000
00000010
00000101
00000010

OUTPUT FORMAT

The output consists of a single line with the diameter of the newly joined pastures. Print the answer to exactly six decimal places. Do not perform any special rounding on your output.

SAMPLE OUTPUT (file cowtour.out)

22.071068

 

思路:先把不同的牧场分开(我使用并查集),依次算出所有点所在牧场与当前点的最大距离(最短路),依次连接两个不同的牧场。答案就是MAX(所有点所在牧场的最大距离值,连接后的牧场的最小距离值);

失误点:在做题之前有考虑过可能单个牧场的最大距离值会大于两个牧场连接后的最小距离值,可是在敲代码的时候给忘了,果断WA了一次,还去调试,真无语,最后实验室关门了,在回去的路上在发现落下了这个条件,今天补上,果断AC了速度还行54MS。

 

下面看代码吧!

 

/*
 ID:nealgav1
 LANG:C++
 PROG:cowtour
*/
#include<fstream>
#include<iomanip>
#include<algorithm>
#include<cmath>
using namespace std;
ifstream cin("cowtour.in");
ofstream cout("cowtour.out");
const int mm=210;
const int oo=1e9;
const double klen=0.00001;//大于0的极小值
char vis[mm][mm];
int root[mm],rank[mm];//并查集区分不同牧场,rank[]在这没用
double len[mm][mm];//任意两个联通点的最短距离
double Mlen[mm];//点与所在牧场离当前点最远点的最小距离
int m;
class node//记录点坐标
{public:
  double x,y;
}d[mm];
double lenth(int a,int b)//两点距离
{
  return sqrt((d[a].x-d[b].x)*(d[a].x-d[b].x)+(d[a].y-d[b].y)*(d[a].y-d[b].y));
}/*并查集*/
void creat(int n)
{
  for(int i=0;i<n;i++)root[i]=i,rank[i]=1;
}
int find(int n)
{
  if(root[n]!=n)root[n]=find(root[n]);
  return root[n];
}
void unio(int x,int y)
{
  if(find(x)!=find(y))
  {
    if(rank[x]>rank[y])rank[x]+=rank[y],root[y]=x;
    else rank[y]+=rank[x],root[x]=y;
  }
}
void get_len(int a,int b)//记录两点距离
{ if(len[a][b]<klen)
  len[a][b]=len[b][a]=lenth(a,b);
}
void get_lenmax()
{ ///计算任意两个联通点的最小距离
  for(int i=0;i<m;i++)
  for(int j=0;j<m;j++)
  { if(i==j)continue;
    for(int k=0;k<m;k++)
    if(len[i][k]>klen&&len[k][j]>klen)///判断len[i][k],len[k][j]联通
    { if(len[i][j]>klen)
      len[i][j]=len[j][i]=min(len[i][j],len[i][k]+len[k][j]);
      else len[i][j]=len[j][i]=len[i][k]+len[k][j];
    }
  }
  ///计算当前点所在牧场的最大距离
  for(int i=0;i<m;i++)
  for(int j=0;j<m;j++)
  if(i!=j)
  Mlen[i]=max(Mlen[i],len[i][j]);
}
double link_min()
{ double m_len=oo;
  double _len;
  ///合并两个牧场,并求最小距离
  for(int i=0;i<m;i++)
  for(int j=0;j<m;j++)
  { if(find(i)!=find(j))
    {
      _len=Mlen[i]+Mlen[j]+lenth(i,j);
      m_len=min(m_len,_len);
    }
  }
  ///原先就是这个没加上,WA了一次
  ///计算合并后的最小距离与单点所在牧场的最大值取最大值即是答案
  for(int i=0;i<m;i++)
  m_len=max(m_len,Mlen[i]);
  cout.setf(ios::fixed);///C++操作小数点后六位
  cout<<setprecision(6)<<m_len<<'\n';
  return m_len;
}
void fen()
{
  for(int i=0;i<m;i++)
  for(int j=0;j<m;j++)
  if(vis[i][j]=='1')unio(find(i),find(j)),get_len(i,j);
  get_lenmax();
}
int main()
{
  cin>>m;
  creat(m);
  for(int i=0;i<m;i++)
  cin>>d[i].x>>d[i].y;
  for(int i=0;i<m;i++)
  cin>>vis[i];
  fen();
  link_min();
}


 

Cow Tours
Russ Cox

We do a fair bit of precomputation before choosing the path to add.

First, we calculate the minimum distance between all connected points. Then, we use a recursive depth first search to identify the different fields. Then we fill in diam[i], which is defined to be the distance to the farthest pasture that pasture i is connected to. Fielddiam[j] is the diameter of field j, which is the maximum of diam[i] for all pastures i in the field j.

Once we have all this, selecting a path is simple. If we add a path joining pastures i and j which are in different fields, the diameter of the new field is the maximum of:

  • dist to point farthest from i + dist from i to j + dist to point farthest from j.
  • old diameter of the field containing pasture i.
  • old diameter of the field containing pasture j.
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include <math.h>

#define INF    (1e40)

typedef struct Point Point;
struct Point {
    int x, y;
};

#define MAXPASTURE 150

int n;
double dist[MAXPASTURE][MAXPASTURE];
double diam[MAXPASTURE];
double fielddiam[MAXPASTURE];
Point pt[MAXPASTURE];
int field[MAXPASTURE];
int nfield;

double
ptdist(Point a, Point b)
{
    return sqrt((double)(b.x-a.x)*(b.x-a.x)+(double)(b.y-a.y)*(b.y-a.y));
}

/* mark the field containing pasture i with number m */
void
mark(int i, int m)
{
    int j;
    if(field[i] != -1) {
        assert(field[i] == m);
        return;
    }

    field[i] = m;
    for(j=0; j<n; j++)
        if(dist[i][j] < INF/2)
            mark(j, m);
}

void
main(void)
{
    FILE *fin, *fout;
    int i, j, k, c;
    double newdiam, d;

    fin = fopen("cowtour.in", "r");
    fout = fopen("cowtour.out", "w");
    assert(fin != NULL && fout != NULL);

    fscanf(fin, "%d\n", &n);
    for(i=0; i<n; i++)
        fscanf(fin, "%d %d\n", &pt[i].x, &pt[i].y);
        
    for(i=0; i<n; i++) {
        for(j=0; j<n; j++) {
            c = getc(fin);
            if(i == j)
                dist[i][j] = 0;
            else if(c == '0')
                dist[i][j] = INF;        /* a lot */
            else
                dist[i][j] = ptdist(pt[i], pt[j]);
        }
        assert(getc(fin) == '\n');
    }

    /* Floyd-Warshall all pairs shortest paths */
    for(k=0; k<n; k++)
    for(i=0; i<n; i++)
    for(j=0; j<n; j++)
        if(dist[i][k]+dist[k][j] < dist[i][j])
            dist[i][j] = dist[i][k]+dist[k][j];

    /* mark fields */
    for(i=0; i<n; i++)
        field[i] = -1;
    for(i=0; i<n; i++)
        if(field[i] == -1)
            mark(i, nfield++);

    /* find worst diameters involving pasture i, and for whole field */
    for(i=0; i<n; i++) {
        for(j=0; j<n; j++)
            if(diam[i] < dist[i][j] && dist[i][j] < INF/2)
                diam[i] = dist[i][j];
        if(diam[i] > fielddiam[field[i]])
            fielddiam[field[i]] = diam[i];
    }

    /* consider a new path between i and j */
    newdiam = INF;
    for(i=0; i<n; i++)
    for(j=0; j<n; j++) {
        if(field[i] == field[j])
            continue;

        d = diam[i]+diam[j]+ptdist(pt[i], pt[j]);
        if(d < fielddiam[field[i]])
            d = fielddiam[field[i]];
        if(d < fielddiam[field[j]])
            d = fielddiam[field[j]];
    
        if(d < newdiam)
            newdiam = d;
    }

    fprintf(fout, "%.6lf\n", newdiam);
    exit(0);
}

 

 

 

TASK: cowtourLANG: C++Compiling...Compile: OKExecuting...   Test 1: TEST OK [0.000 secs, 3752 KB]   Test 2: TEST OK [0.000 secs, 3752 KB]   Test 3: TEST OK [0.000 secs, 3752 KB]   Test 4: TEST OK [0.000 secs, 3752 KB]   Test 5: TEST OK [0.054 secs, 3752 KB]   Test 6: TEST OK [0.032 secs, 3752 KB]   Test 7: TEST OK [0.054 secs, 3752 KB]   Test 8: TEST OK [0.054 secs, 3752 KB]   Test 9: TEST OK [0.043 secs, 3752 KB]All tests OK.

Your program ('cowtour') produced all correct answers!  This is yoursubmission #2 for this problem.  Congratulations!

Here are the test data inputs:

------- test 1 ----
8
10 10
15 10
20 10
15 15
20 15
30 15
25 10
30 10
01000000
10111000
01001000
01001000
01110000
00000010
00000101
00000010
------- test 2 ----
2
0 0
1 0
00
00
------- test 3 ----
4
0 0
1 0
0 20
1 20
0100
1000
0001
0010
------- test 4 ----
30
0 0
1 0
2 0
3 0
4 0
5 0
6 0
7 0
8 0
9 0
10 0
11 0
12 0
13 0
14 0
0 100
1 100
2 100
3 100
4 100
5 100
6 100
7 100
8 100
9 100
10 100
11 100
12 100
13 100
14 100
111111111111111000000000000000
111111111111111000000000000000
111111111111111000000000000000
111111111111111000000000000000
111111111111111000000000000000
111111111111111000000000000000
111111111111111000000000000000
111111111111111000000000000000
111111111111111000000000000000
111111111111111000000000000000
111111111111111000000000000000
111111111111111000000000000000
111111111111111000000000000000
111111111111111000000000000000
111111111111111000000000000000
000000000000000111111111111111
000000000000000111111111111111
000000000000000111111111111111
000000000000000111111111111111
000000000000000111111111111111
000000000000000111111111111111
000000000000000111111111111111
000000000000000111111111111111
000000000000000111111111111111
000000000000000111111111111111
000000000000000111111111111111
000000000000000111111111111111
000000000000000111111111111111
000000000000000111111111111111
000000000000000111111111111111
------- test 5 ----
148
0 0
1 0
2 0
3 0
4 0
5 0
6 0
7 0
8 0
9 0
10 0
11 0
12 0
13 0
14 0
15 0
16 0
17 0
18 0
19 0
20 0
21 0
22 0
23 0
24 0
25 0
26 0
27 0
28 0
29 0
30 0
31 0
32 0
33 0
34 0
35 0
36 0
37 0
38 0
39 0
40 0
41 0
42 0
43 0
44 0
45 0
46 0
47 0
48 0
49 0
50 0
51 0
52 0
53 0
54 0
55 0
56 0
57 0
58 0
59 0
60 0
61 0
62 0
63 0
64 0
65 0
66 0
67 0
68 0
69 0
70 0
71 0
72 0
73 0
0 100
1 100
2 100
3 100
4 100
5 100
6 100
7 100
8 100
9 100
10 100
11 100
12 100
13 100
14 100
15 100
16 100
17 100
18 100
19 100
20 100
21 100
22 100
23 100
24 100
25 100
26 100
27 100
28 100
29 100
30 100
31 100
32 100
33 100
34 100
35 100
36 100
37 100
38 100
39 100
40 100
41 100
42 100
43 100
44 100
45 100
46 100
47 100
48 100
49 100
50 100
51 100
52 100
53 100
54 100
55 100
56 100
57 100
58 100
59 100
60 100
61 100
62 100
63 100
64 100
65 100
66 100
67 100
68 100
69 100
70 100
71 100
72 100
73 100
1111111111111111111111111111111111111111111111111111111111111111111111111100000000000000000000000000000000000000000000000000000000000000000000000000
1111111111111111111111111111111111111111111111111111111111111111111111111100000000000000000000000000000000000000000000000000000000000000000000000000
1111111111111111111111111111111111111111111111111111111111111111111111111100000000000000000000000000000000000000000000000000000000000000000000000000
1111111111111111111111111111111111111111111111111111111111111111111111111100000000000000000000000000000000000000000000000000000000000000000000000000
1111111111111111111111111111111111111111111111111111111111111111111111111100000000000000000000000000000000000000000000000000000000000000000000000000
1111111111111111111111111111111111111111111111111111111111111111111111111100000000000000000000000000000000000000000000000000000000000000000000000000
1111111111111111111111111111111111111111111111111111111111111111111111111100000000000000000000000000000000000000000000000000000000000000000000000000
1111111111111111111111111111111111111111111111111111111111111111111111111100000000000000000000000000000000000000000000000000000000000000000000000000
1111111111111111111111111111111111111111111111111111111111111111111111111100000000000000000000000000000000000000000000000000000000000000000000000000
1111111111111111111111111111111111111111111111111111111111111111111111111100000000000000000000000000000000000000000000000000000000000000000000000000
1111111111111111111111111111111111111111111111111111111111111111111111111100000000000000000000000000000000000000000000000000000000000000000000000000
1111111111111111111111111111111111111111111111111111111111111111111111111100000000000000000000000000000000000000000000000000000000000000000000000000
1111111111111111111111111111111111111111111111111111111111111111111111111100000000000000000000000000000000000000000000000000000000000000000000000000
1111111111111111111111111111111111111111111111111111111111111111111111111100000000000000000000000000000000000000000000000000000000000000000000000000
1111111111111111111111111111111111111111111111111111111111111111111111111100000000000000000000000000000000000000000000000000000000000000000000000000
1111111111111111111111111111111111111111111111111111111111111111111111111100000000000000000000000000000000000000000000000000000000000000000000000000
1111111111111111111111111111111111111111111111111111111111111111111111111100000000000000000000000000000000000000000000000000000000000000000000000000
1111111111111111111111111111111111111111111111111111111111111111111111111100000000000000000000000000000000000000000000000000000000000000000000000000
1111111111111111111111111111111111111111111111111111111111111111111111111100000000000000000000000000000000000000000000000000000000000000000000000000
1111111111111111111111111111111111111111111111111111111111111111111111111100000000000000000000000000000000000000000000000000000000000000000000000000
1111111111111111111111111111111111111111111111111111111111111111111111111100000000000000000000000000000000000000000000000000000000000000000000000000
1111111111111111111111111111111111111111111111111111111111111111111111111100000000000000000000000000000000000000000000000000000000000000000000000000
1111111111111111111111111111111111111111111111111111111111111111111111111100000000000000000000000000000000000000000000000000000000000000000000000000
1111111111111111111111111111111111111111111111111111111111111111111111111100000000000000000000000000000000000000000000000000000000000000000000000000
1111111111111111111111111111111111111111111111111111111111111111111111111100000000000000000000000000000000000000000000000000000000000000000000000000
1111111111111111111111111111111111111111111111111111111111111111111111111100000000000000000000000000000000000000000000000000000000000000000000000000
1111111111111111111111111111111111111111111111111111111111111111111111111100000000000000000000000000000000000000000000000000000000000000000000000000
1111111111111111111111111111111111111111111111111111111111111111111111111100000000000000000000000000000000000000000000000000000000000000000000000000
1111111111111111111111111111111111111111111111111111111111111111111111111100000000000000000000000000000000000000000000000000000000000000000000000000
1111111111111111111111111111111111111111111111111111111111111111111111111100000000000000000000000000000000000000000000000000000000000000000000000000
1111111111111111111111111111111111111111111111111111111111111111111111111100000000000000000000000000000000000000000000000000000000000000000000000000
1111111111111111111111111111111111111111111111111111111111111111111111111100000000000000000000000000000000000000000000000000000000000000000000000000
1111111111111111111111111111111111111111111111111111111111111111111111111100000000000000000000000000000000000000000000000000000000000000000000000000
1111111111111111111111111111111111111111111111111111111111111111111111111100000000000000000000000000000000000000000000000000000000000000000000000000
1111111111111111111111111111111111111111111111111111111111111111111111111100000000000000000000000000000000000000000000000000000000000000000000000000
1111111111111111111111111111111111111111111111111111111111111111111111111100000000000000000000000000000000000000000000000000000000000000000000000000
1111111111111111111111111111111111111111111111111111111111111111111111111100000000000000000000000000000000000000000000000000000000000000000000000000
1111111111111111111111111111111111111111111111111111111111111111111111111100000000000000000000000000000000000000000000000000000000000000000000000000
1111111111111111111111111111111111111111111111111111111111111111111111111100000000000000000000000000000000000000000000000000000000000000000000000000
1111111111111111111111111111111111111111111111111111111111111111111111111100000000000000000000000000000000000000000000000000000000000000000000000000
1111111111111111111111111111111111111111111111111111111111111111111111111100000000000000000000000000000000000000000000000000000000000000000000000000
1111111111111111111111111111111111111111111111111111111111111111111111111100000000000000000000000000000000000000000000000000000000000000000000000000
1111111111111111111111111111111111111111111111111111111111111111111111111100000000000000000000000000000000000000000000000000000000000000000000000000
1111111111111111111111111111111111111111111111111111111111111111111111111100000000000000000000000000000000000000000000000000000000000000000000000000
1111111111111111111111111111111111111111111111111111111111111111111111111100000000000000000000000000000000000000000000000000000000000000000000000000
1111111111111111111111111111111111111111111111111111111111111111111111111100000000000000000000000000000000000000000000000000000000000000000000000000
1111111111111111111111111111111111111111111111111111111111111111111111111100000000000000000000000000000000000000000000000000000000000000000000000000
1111111111111111111111111111111111111111111111111111111111111111111111111100000000000000000000000000000000000000000000000000000000000000000000000000
1111111111111111111111111111111111111111111111111111111111111111111111111100000000000000000000000000000000000000000000000000000000000000000000000000
1111111111111111111111111111111111111111111111111111111111111111111111111100000000000000000000000000000000000000000000000000000000000000000000000000
1111111111111111111111111111111111111111111111111111111111111111111111111100000000000000000000000000000000000000000000000000000000000000000000000000
1111111111111111111111111111111111111111111111111111111111111111111111111100000000000000000000000000000000000000000000000000000000000000000000000000
1111111111111111111111111111111111111111111111111111111111111111111111111100000000000000000000000000000000000000000000000000000000000000000000000000
1111111111111111111111111111111111111111111111111111111111111111111111111100000000000000000000000000000000000000000000000000000000000000000000000000
1111111111111111111111111111111111111111111111111111111111111111111111111100000000000000000000000000000000000000000000000000000000000000000000000000
1111111111111111111111111111111111111111111111111111111111111111111111111100000000000000000000000000000000000000000000000000000000000000000000000000
1111111111111111111111111111111111111111111111111111111111111111111111111100000000000000000000000000000000000000000000000000000000000000000000000000
1111111111111111111111111111111111111111111111111111111111111111111111111100000000000000000000000000000000000000000000000000000000000000000000000000
1111111111111111111111111111111111111111111111111111111111111111111111111100000000000000000000000000000000000000000000000000000000000000000000000000
1111111111111111111111111111111111111111111111111111111111111111111111111100000000000000000000000000000000000000000000000000000000000000000000000000
1111111111111111111111111111111111111111111111111111111111111111111111111100000000000000000000000000000000000000000000000000000000000000000000000000
1111111111111111111111111111111111111111111111111111111111111111111111111100000000000000000000000000000000000000000000000000000000000000000000000000
1111111111111111111111111111111111111111111111111111111111111111111111111100000000000000000000000000000000000000000000000000000000000000000000000000
1111111111111111111111111111111111111111111111111111111111111111111111111100000000000000000000000000000000000000000000000000000000000000000000000000
1111111111111111111111111111111111111111111111111111111111111111111111111100000000000000000000000000000000000000000000000000000000000000000000000000
1111111111111111111111111111111111111111111111111111111111111111111111111100000000000000000000000000000000000000000000000000000000000000000000000000
1111111111111111111111111111111111111111111111111111111111111111111111111100000000000000000000000000000000000000000000000000000000000000000000000000
1111111111111111111111111111111111111111111111111111111111111111111111111100000000000000000000000000000000000000000000000000000000000000000000000000
1111111111111111111111111111111111111111111111111111111111111111111111111100000000000000000000000000000000000000000000000000000000000000000000000000
1111111111111111111111111111111111111111111111111111111111111111111111111100000000000000000000000000000000000000000000000000000000000000000000000000
1111111111111111111111111111111111111111111111111111111111111111111111111100000000000000000000000000000000000000000000000000000000000000000000000000
1111111111111111111111111111111111111111111111111111111111111111111111111100000000000000000000000000000000000000000000000000000000000000000000000000
1111111111111111111111111111111111111111111111111111111111111111111111111100000000000000000000000000000000000000000000000000000000000000000000000000
1111111111111111111111111111111111111111111111111111111111111111111111111100000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000011111111111111111111111111111111111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000000000000000000000000000000000011111111111111111111111111111111111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000000000000000000000000000000000011111111111111111111111111111111111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000000000000000000000000000000000011111111111111111111111111111111111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000000000000000000000000000000000011111111111111111111111111111111111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000000000000000000000000000000000011111111111111111111111111111111111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000000000000000000000000000000000011111111111111111111111111111111111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000000000000000000000000000000000011111111111111111111111111111111111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000000000000000000000000000000000011111111111111111111111111111111111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000000000000000000000000000000000011111111111111111111111111111111111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000000000000000000000000000000000011111111111111111111111111111111111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000000000000000000000000000000000011111111111111111111111111111111111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000000000000000000000000000000000011111111111111111111111111111111111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000000000000000000000000000000000011111111111111111111111111111111111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000000000000000000000000000000000011111111111111111111111111111111111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000000000000000000000000000000000011111111111111111111111111111111111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000000000000000000000000000000000011111111111111111111111111111111111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000000000000000000000000000000000011111111111111111111111111111111111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000000000000000000000000000000000011111111111111111111111111111111111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000000000000000000000000000000000011111111111111111111111111111111111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000000000000000000000000000000000011111111111111111111111111111111111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000000000000000000000000000000000011111111111111111111111111111111111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000000000000000000000000000000000011111111111111111111111111111111111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000000000000000000000000000000000011111111111111111111111111111111111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000000000000000000000000000000000011111111111111111111111111111111111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000000000000000000000000000000000011111111111111111111111111111111111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000000000000000000000000000000000011111111111111111111111111111111111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000000000000000000000000000000000011111111111111111111111111111111111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000000000000000000000000000000000011111111111111111111111111111111111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000000000000000000000000000000000011111111111111111111111111111111111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000000000000000000000000000000000011111111111111111111111111111111111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000000000000000000000000000000000011111111111111111111111111111111111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000000000000000000000000000000000011111111111111111111111111111111111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000000000000000000000000000000000011111111111111111111111111111111111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000000000000000000000000000000000011111111111111111111111111111111111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000000000000000000000000000000000011111111111111111111111111111111111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000000000000000000000000000000000011111111111111111111111111111111111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000000000000000000000000000000000011111111111111111111111111111111111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000000000000000000000000000000000011111111111111111111111111111111111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000000000000000000000000000000000011111111111111111111111111111111111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000000000000000000000000000000000011111111111111111111111111111111111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000000000000000000000000000000000011111111111111111111111111111111111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000000000000000000000000000000000011111111111111111111111111111111111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000000000000000000000000000000000011111111111111111111111111111111111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000000000000000000000000000000000011111111111111111111111111111111111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000000000000000000000000000000000011111111111111111111111111111111111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000000000000000000000000000000000011111111111111111111111111111111111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000000000000000000000000000000000011111111111111111111111111111111111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000000000000000000000000000000000011111111111111111111111111111111111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000000000000000000000000000000000011111111111111111111111111111111111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000000000000000000000000000000000011111111111111111111111111111111111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000000000000000000000000000000000011111111111111111111111111111111111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000000000000000000000000000000000011111111111111111111111111111111111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000000000000000000000000000000000011111111111111111111111111111111111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000000000000000000000000000000000011111111111111111111111111111111111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000000000000000000000000000000000011111111111111111111111111111111111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000000000000000000000000000000000011111111111111111111111111111111111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000000000000000000000000000000000011111111111111111111111111111111111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000000000000000000000000000000000011111111111111111111111111111111111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000000000000000000000000000000000011111111111111111111111111111111111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000000000000000000000000000000000011111111111111111111111111111111111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000000000000000000000000000000000011111111111111111111111111111111111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000000000000000000000000000000000011111111111111111111111111111111111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000000000000000000000000000000000011111111111111111111111111111111111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000000000000000000000000000000000011111111111111111111111111111111111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000000000000000000000000000000000011111111111111111111111111111111111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000000000000000000000000000000000011111111111111111111111111111111111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000000000000000000000000000000000011111111111111111111111111111111111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000000000000000000000000000000000011111111111111111111111111111111111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000000000000000000000000000000000011111111111111111111111111111111111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000000000000000000000000000000000011111111111111111111111111111111111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000000000000000000000000000000000011111111111111111111111111111111111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000000000000000000000000000000000011111111111111111111111111111111111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000000000000000000000000000000000011111111111111111111111111111111111111111111111111111111111111111111111111
------- test 6 ----
150
0 0
10 0
20 0
30 0
40 0
50 0
60 0
70 0
80 0
90 0
100 0
110 0
120 0
130 0
140 0
150 0
160 0
170 0
180 0
190 0
200 0
210 0
220 0
230 0
240 0
250 0
260 0
270 0
280 0
290 0
300 0
310 0
320 0
330 0
340 0
350 0
360 0
370 0
380 0
390 0
400 0
410 0
420 0
430 0
440 0
450 0
460 0
470 0
480 0
490 0
500 0
510 0
520 0
530 0
540 0
550 0
560 0
570 0
580 0
590 0
600 0
610 0
620 0
630 0
640 0
650 0
660 0
670 0
680 0
690 0
700 0
710 0
720 0
730 0
740 0
750 0
760 0
770 0
780 0
790 0
800 0
810 0
820 0
830 0
840 0
850 0
860 0
870 0
880 0
890 0
900 0
910 0
920 0
930 0
940 0
950 0
960 0
970 0
980 0
990 0
1000 0
1010 0
1020 0
1030 0
1040 0
1050 0
1060 0
1070 0
1080 0
1090 0
1100 0
1110 0
1120 0
1130 0
1140 0
1150 0
1160 0
1170 0
1180 0
1190 0
1200 0
1210 0
1220 0
1230 0
1240 0
1250 0
1260 0
1270 0
1280 0
1290 0
1300 0
1310 0
1320 0
1330 0
1340 0
1350 0
1360 0
1370 0
1380 0
1390 0
1400 0
1410 0
1420 0
1430 0
1440 0
1450 0
1460 0
1470 0
1480 0
1481 0
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
------- test 7 ----
150
6766 7898
599 2183
3937 220
4059 620
1767 2342
1028 9358
1370 1754
3261 2336
5 8338
37 1965
9131 8702
7455 2647
7610 2402
1544 5325
7088 301
728 8588
4093 9675
8363 3738
6954 3359
3825 7455
9928 2619
5284 2884
6493 8306
9160 9552
3548 8256
9224 608
8676 1032
143 7191
954 2910
7734 8583
1305 5430
9293 2238
6442 8716
731 211
9904 8964
4681 531
8262 2085
6573 8791
5531 5106
2404 2088
1373 9033
1987 2534
325 2624
2286 5413
4067 5676
1417 1993
3514 5138
1310 6963
606 4515
7295 9435
9611 2452
6445 3648
6040 3756
344 8303
925 4450
7337 9424
1505 5621
365 9702
6712 8925
9028 7048
1068 3858
2410 4523
42 907
4532 1795
1376 7482
9150 266
676 4838
2355 6943
2230 5400
5245 3666
122 7002
6191 5679
1663 9420
1744 2329
2709 9289
633 3705
4702 9834
6497 7239
530 1512
7367 8711
6632 8
593 9815
6546 2737
9700 9032
4425 4001
4196 6459
2186 722
8013 9614
3728 3815
8402 7191
6498 7595
8020 9935
5711 9658
966 1154
5160 2401
575 3255
2254 3700
2960 8987
8445 1135
1960 2098
8216 2992
1621 8208
8421 9170
2509 7396
2043 5868
6892 9319
5113 8858
3391 3859
9001 4140
1840 6615
1895 8014
36 9450
8283 9384
787 9709
910 4007
6663 1270
5051 5019
5143 9770
8980 1506
1733 9834
6808 7396
805 7537
3362 2624
672 4845
868 535
6649 2220
308 3927
6750 424
8919 1563
2882 2166
9020 4769
7528 1851
4379 1947
6660 7488
4558 9722
2862 2376
1759 3896
1399 3390
6595 2340
2304 5828
5607 2547
1655 2057
7753 1317
1300 3947
5288 6725
4020 7565
1167 1365
2325 2714
7038 9321
6802 8731
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000
000010100000000001000000010000000000000000000000000000000000000100000001010010000000000000010000000000000000000000100000000000000000000000000100000000
000000000000000000000000000000100000000000001000010000000000000000000000000000000010000000000000001000100000000000000100000000000000000000000000000000
001001000000000000000000000010010000000000000000000000000000000000000000000000001000100000000000000000000000000000000000000000001000000000000000000000
000010000000000000000010000000000001001001000000000000000100000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000
001000000000000000000100000000000000000000000000000000000000000000100000000000000000100000000000000000010000000000000000000000010000000000000000000000
000000000000000000000000100000000000000000100000000000010000000000000000000000000000000000001000000000000000000000000001000000000000000000000000000000
000000000010000000000000010000000000000000000001000000000101000000000000000000000000000001000000000000000000000000100000000000000000000010000000000000
000000000000000000000000000000000100000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000100000000000000000000
000000001000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000100000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000100000000001000000000000000000000000000000000000000001000000000000000000100000000000000000
000000000000000000000000000000010000000000000000000000000000000000000000000000000100000000000000000000000000000000000110000100000000000000100000000000
000000000000000000000000000000000000000000000000000000000000000010000000000000000010001000000000000000000000000000000000000000000100001000000000000000
000000000000000000000000000000001000000000000000000000010000000000000000000000000000001000000000000000000000000000000000010000000000000000000000000000
000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000101000010000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000
001000000000000100000000000000000000000000000000000000000100000000000000000000000000000000000000000001000010000000000000000000000000000000000000000000
000000000000000000000000000001000000000000000010010000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000001000000
000000000000000000000000000000000000000100100000001001000010000000000100000000000000001000000000000000000000000000000100010000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000
000000100000000000000000000000000000000000000000000000000000001001000100000000000000000000000000000000000010000000000011000000000000000010010000000000
000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000100000000000000000000000000001000
000000000000000000000000000000000000000001000000000000000001000000000000000000000001000000000000000000000000001000000000000000000000000000000000000000
000000010000000000000000000000000000000000010000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000100000100000
001000001000000000000000000001010000010000000000000000000000000000000000000000000001000000000000000001000000000000100000000000000001000010000000000000
000000000000000000000000000010000010000000000000000000000000000000000000000000001000000000000010000000100000000000000000000001000000000000000000000100
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001010000000000000000100000000000000000000001001000000000000000
000010000000000000000000001000100000000000000000000000000000000000001000000000000000000000000000000000100000000000000000000000000000000000001000000001
000000000000000000100000010000000000000000000000000000001000000000000000000000000000000000001000000000000000000000000000000000000001000000000000000000
000100000000000010000000000010000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000
000010000000100000000000010000000010000000000000000000000000000000000000001000010000000000000000001000000000000000000000000000000000001000000000000010
000000000000001010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000
000000000100000000000000000000000000000010000000000000000000000000001000000000000000100001000000000000000000000000000000000000000000000001000000000000
000000000000000000000000001000010000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001
000001000000000000000000000000000000000000000000000000001000000000000000000000000000010100000000000000000000000000000000000000000000000000000010000010
000000000000000000000000000000000000000000000010001000000000000000000001000000000000000000000001000000000000000000000000000000000010000000000000000000
000000000000000010000000010000000000000100000000000000001000000000000000000001000000000000000000000000000000000000000000000000000000000000000000001000
000001000000000000000000000000000000000000000000000000010100000001000000000000000001000000000000000000000000000000000000000000000000000000000000000000
000000000000000000010000000000000000010000100000010001000000100000001000000000000000000100000000000000000000000000000100000000000000100000000000000000
000000000000000000000000000000000100000000000000000000000000010000000000100000000000000000000000000000000000000000000000000000000000000000000000000000
000001000000000000000001000000000000000000000010000000000000010100000000000000000000000000000000000000000000001000000000000100000000000000000010000000
000000010000000000010000000000000000000100000010000000000000000010000000000000000000000000000000000000000100000000000000100000000000000001000000100000
000000000000000000000000100000000000000000000100000000000000000000000010000000000000000000000000000000000000100000000000000000000000000010000000100000
000100000000000000000000000000000000000000000000000001000000000010000000000010010001100000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000100000000000000000100001100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000010000000000000000000000000000000000
000100000000000000100000000000000000000100000000000010000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000010000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000
000000000000000000000000000000000000000000000000000000010000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000010
000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000
000000000000000000010000000000000000000100001000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000001
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000100000000000000100000000
000000010000001000000000000000000000001000000000000100000000000000000000100000000010000001000000000000000001000000000000001000000000000000000000000000
000000000000000000000000000001000001010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010
000001001000000001000000000000000000001000000000000000000000000000000100000000000000000000000000000100000000000001000000001000000000000000000000000000
000000000000000000010000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001100000000000000000000
000000001000000000000001000000000000000000000000000000000000000000000000000000001001000000000000010100000000000000000000000000000000000000000000000010
000000000001000000000000000000000000000100000000000000000000010010000001000000010000000000000000000000000000000000000000000000000000010000000000000100
000000000000000000000000000000000000000011000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000100000
000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000100000001000000000000000000000000000001000000000000000000
001000000000000000000000100000000000000001000000000100000000000000000000000000000000000000000010000100000000000000000000000000000000000000000000000000
000000000000010000000000000000000000000000101000100000000000100000000000000000001000010000000000010000000000000000000000000000000000000000001000000001
000000000000000000000100000000000000001000000000000000000000000000000000000000001000000000000000000000000000000000000000000000010000000000000000000000
000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000001000000000000
000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000
000000000000000000000000000010000100000100000000000000000000000000000000100010000000000000000000000000000000000010000000000000000000000000010000000000
000000000000000000010100000000000000000000000000000000000100000000000000000000000000001000000000000000000000000000000100000000000001000001000000000000
000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000
001000000001000000000000000000000000100000000000000000000000100000000000000000000000000000000000000000000000000000010000000000000011000000010000000000
000000000000000000000000000000000000000010000000000000010000000000001000001000000000001000000000000000000000000000000000000000000000000000000000000010
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000001000000000000000000000
000000000000000000000000000000010000000000000000010001000000000000000000100100000000000000000000010000000000010000000000000000000010000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000001000000000000000000000001000000000000011000000000000000000000000000100000000000000000000001000000000000000
000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000010000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000
000000000000000000000000000000010000000000001000000000000000100000000000000000000000000000000000000000100000000000000000001000000000000000000000000000
000010000000000000000000001000000000000000000000000000000001000011000000000000000000000001000000000000000000000000000000000000100000000000000000000000
000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000010000000000000000
000100000000010000000000000000000000000000000000000000010000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000001010000000000001000001000000000000001000000000000000010000000000000000010000100000000000000000000000000000000001010000000000100
000010100000000000000000000000000100000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000001000000000000000000000000000010000000000000000000000000000000000001000000101000000000000000000010000000000001000000
000000000000011000010000000000000000000000000000000000000000000000000100100000000000000000010000000000000000000000000000000001000000010000000000010000
000000000000000000000000000000000001000100000000000000000000000000000000000000000000000000000000000000000010000000100000000001000000000000000010000000
000000000110000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000001000000000000000000100000100000000000000000000010000000000000000000000001000000000000000000000000000000000010000000000000000000100000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000100000000010000000000000000000000000000000
001000000000000000000000000100000000000000000000000000100000000000000000000000000000001000000000100000000000000000000000000000000000000000000000000000
000000010000000000000000000001100000000000000000000000000000000000000000000000000000000000000000000000000000000100000000100000000000000000000000000000
010000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000100000000
000000000000000000000000001000000000000000000000000000000000000100000000000000000001000000000000000000000100000000000001000100000000000001000000000000
000000000000000000000000000000000000100000000000000000000000000000000000010000000000000000100000000010010000000000000000000000000001000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000001000000100000000000000
000000000000000000000000000000000000000000000000000000000001000010000000001000000000000000000000000000000000000000000000000000000000000000000000010000
000100000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000
000000000010000000000000000000000000000000000000000000000101000100000000000000000001000000000000000000000010000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000001000000000000000000000000000000000000000000100000000000
000000000000000001000000010000000000000000000000000000000000001000000000000000000000010000000000000000000000000000000000000000000001000000000000000000
100100000000000000000010001010000000000000000000000000000000000000000000000000010000000000000000000000010000000000000000000001000000000001000000000000
000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000100000001000000000000010000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000010000000000000000000010000000000000000000000000000000000
000000000000000001000100000000000000000000000000000000000000000000000000000000000000000100000000000100000000000000001000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000110000000
000000000000000000000000000100000000000000010000000000000000000000000000000000000000010000100000000000000000000000000000000000000001000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000010000000000000000000000000000000000000
000000000000000000000001000000000000000001000000000000000000000000000000000000000000010000000000000000010000000000100000000000000100000000000100000000
000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000001000000000000000000000100000000000000000000000010000000000
000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000010000000000000000000000000000000000000000
000000000001000000000000000000000000000000000001000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001001001000000000000000010000000000000000000000000000000000000000000000000000000000000100000000000000000000001100001100000000000010000100000000000000
000000000000000000000000000000000000000000000000100000000000000000000001000000000000000001000000000000000100000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000100000000000001000000100100000000000
000100000000100000010010000000000000000100000000000000000000000000100100000000000000000000000000000000000000000000100000000001000000000000000000000000
000000000000100000000100000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000001000000000000000000000000000000
000000010000000000000100000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000010000000000000000000000000000000
000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000
000000000000001010010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000
000000000000000000000000000000000000000000000000000000010100000000000000000000010000000000000000000000000000000000000000000100001001000000000000000000
000000000000100000000000000000000000000001000000000000000000000000000000000000000000000000000010000000000000000000000000011000000000010000000000000000
000000000000000000001000000000000000000000000000000000000000000000000010000000000000000000000000000000010000000000000000000000000000000000000000000001
000000000000000000000000001000000000000000000000000000000000000000000000000000000000001100000000000000100000000000000100000000100000000000000000100000
000000000000000000000000000000000000000000000000000000100000000000000000000000001000000000000000000000000000000000000000000001000000000000000000000000
000000100000000000000000000000000000000000000000000000000000000001000000000000100100000000000000001000000000000000000000000000000000010000001000000000
000010000000000000000000000000000000000000000000000000000010000000000000010000000000000000000000100000000000000000001000001000000000000000000000000000
000000000100010000000000000000000000000000000000000010000010000000000000000000000000000000000000000000000000001000000000000000000000000000000100000000
000000000000000000000000000000000000100000000000000000000000000000000001001000000000010000000000000000000000000000100000000000000000000000000000000000
000000000000000000000000010101000000000000000000000000000000001000000101000000000000000000000001000001000000100000000000001000000000000000000000000000
000000000001000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000100000000000000000000100001000000000000000000000000000000000000100010000000000000000000000
000000000000010000000000000100010000000000000000000000000000000000000000000010000001000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000100000000000000000101000000000000000000000000000000000
000000001000000000000100010000000000000000010000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000100000000100000000000000000000000100100000000000000000000000010000000100000000000000000000000000000000000000000000000
000000000000100000000000100000000000000000000000000000000000000000000000000000000000000000000000000010000000000000001000000000000000000000000000000000
000000000000000000000100000000001000000000000000000000000000000000001001000001000000000000000000000000000000000100000000000000000000000000000000000000
000000000000000000000000000010000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000010000000000000000000000
001000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000100000000000001001000000000000000000100000000000000000000
000000000000000000000000000000000001000001000000000000000000000000000000000000000000000100000000000000000001000000000000000000000000000000000000000000
000000000000000000100000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000010010
000000000000000000000000100000000000000000110000000000000000010000010000000000000000000000000000000000000000000000000000000001000000000000000000001010
000000000000000000000000000000000000000000000000001000000000000000000000000000000000001000000000010000000000000000000000000000000000000000000001000001
000000000000000000000010000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000
000000000000000000000000001000000000000000000000000000000000100000000000000000000001000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000010001000000000000000100001001000000000000100000000000000000000000000000000000000000000000000000000000000000000001100000
000000000000000000000000000010000010000000000000000001000000000010000000000000000000000000000000000000000000000000000000000010000000000000000000010000
------- test 8 ----
150
9648 1879
7628 869
8189 2324
54 4370
1597 1966
9584 3758
6540 7967
7435 1655
4728 2898
5232 3547
2682 228
8634 5720
9110 414
7443 4164
7494 7344
8626 7134
3602 7695
596 9684
643 8481
2601 9302
4073 3032
4177 6042
9050 5774
648 8609
3357 4976
1950 2378
5383 8125
1851 7589
9364 5424
9282 939
5336 5276
2708 9868
7064 2968
9879 1081
9859 2571
2183 3218
8182 6938
861 4594
6160 9375
4477 8233
2449 3403
9829 4506
4281 2031
580 4038
9950 5719
9832 1993
143 4312
6459 5156
7800 4875
783 602
2006 1962
40 942
6220 3771
4762 6892
3397 9642
356 1271
7868 1292
7324 2851
2681 8129
5484 6308
9342 3704
7147 5798
8193 9450
1584 2078
7003 5232
6611 5776
3681 582
725 130
5602 3795
5170 1330
562 2937
260 4067
7829 6394
1515 2317
8783 9787
7771 5701
1130 4734
8982 8970
7271 1178
7561 1474
2681 494
2060 8884
5759 5077
2101 1271
6098 4683
5533 3818
3423 2177
6710 5797
5670 6638
7483 5952
594 2471
1962 4658
6794 6031
14 8413
3897 2081
2721 8088
730 1757
8753 7581
7847 1426
2576 7683
5362 3211
1761 6718
6484 5773
5537 8469
2613 1823
6163 9860
2092 7130
7584 148
7400 2227
4621 1943
559 1927
3165 1192
4933 5830
778 9810
8288 8323
6639 1056
635 1866
1160 3300
2984 8691
5885 4155
9467 9158
6491 8289
5987 8511
8549 273
9130 2595
1338 3824
4016 9811
1079 1194
8660 321
847 1661
6931 3792
3785 3140
2581 2241
9033 4358
437 1387
7442 6064
4928 3258
8796 7472
9264 9611
3777 435
8826 3815
5629 8609
9765 5854
3654 5799
3165 1317
9673 9509
5128 1347
2358 5753
1448 568
3773 7131
000010000000000101000000010000000000000100001000100001010000010001000000001000000000000000000000000000000000000000000000000000000000000000000000000000
000100000001001001000010000010011000000100000100010001100000001000001000100000000000000000000000000000000000000000000000000000000000000000000000000000
000000000100100000000000000000000010000101000100000000000010110000001000000000000000000000000000000000000000000000000000000000000000000000000000000000
010000000010000100110010110000001000100000000001000100000110010010000100000000000000000000000000000000000000000000000000000000000000000000000000000000
100000000000000010010100001000101010100001100000010000010010000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000
000000101100100100000001100000000001001000000000000100001001000000010001000000000000000000000000000000000000000000000000000000000000000000000000000000
000001001100000100100000000101001100000000000000110010011000000001010001000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000010000001000000000000001000111010000000100010000000000000010110001000000000000000000000000000000000000000000000000000000000000000000000000000
000001100101001000000000000010000101000100011011001000010000000000110011000000000000000000000000000000000000000000000000000000000000000000000000000000
001001101010000000100000000000001001000010000001010000100000100000001000000000000000000000000000000000000000000000000000000000000000000000000000000000
000100010101101001100000000000001001000000000010001010000001000001100010000000000000000000000000000000000000000000000000000000000000000000000000000000
010000001010011000000000000000100001010010000000111000100000000001000000100000000000000000000000000000000000000000000000000000000000000000000000000000
001001000010010000100010000000100000100001000010000000000000100100000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000001100000000100011010001010000000000000010010000001001001000000000000000000000000000000000000000000000000000000000000000000000000000000000000
010000001011000000100001000100010000000000001101000000001110000011100000000000000000000000000000000000000000000000000000000000000000000000000000000000
100101100000000000001100010100010001000000000010000000000000010001100001001000000000000000000000000000000000000000000000000000000000000000000000000000
000010000000000000011000000001010000011001100000000000001100000010000000010000000000000000000000000000000000000000000000000000000000000000000000000000
110000010010000000000000000011011000010000010010001110000000101000100111100000000000000000000000000000000000000000000000000000000000000000000000000000
000100100110101000000000100000110000110001000100000000000001000000100001000000000000000000000000000000000000000000000000000000000000000000000000000000
000110000000000010000101010100000000000010000000010000101000001000000010101000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000110000001100000001000000000001001000001000101000000101000011000000000000000000000000000000000000000000000000000000000000000000000000000
000010000000010100010000000000010000011000001001011000010010100010000100000000000000000000000000000000000000000000000000000000000000000000000000000000
010100000000100000000000000000000001000001100000000000000000100110010010000000000000000000000000000000000000000000000000000000000000000000000000000000
000001000000001000011000100001110000000010010000000101110110000000000000110000000000000000000000000000000000000000000000000000000000000000000000000000
000101000000000000101001000000010000010101010000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000
100100000000010100010000000100000000000100000000100000010101000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000010000000010000000000000000000000000000000010001000001000000100101010100000000000000000000000000000000000000000000000000000000000000000000000000000
000000100000001100010000010000101000000000000001000100010000000110001000010000000000000000000000000000000000000000000000000000000000000000000000000000
010000001000010001000000000001010100000001000100000000000100000101001000100000000000000000000000000000000000000000000000000000000000000000000000000000
000000100000000011000001000010110001000000000000100000000000000000000000110000000000000000000000000000000000000000000000000000000000000000000000000000
000010000001100000100001000101000000000000010000010101000001110001000001000000000000000000000000000000000000000000000000000000000000000000000000000000
010000000000001111100101100011001000000000000000000000100000000010000100100000000000000000000000000000000000000000000000000000000000000000000000000000
010110110110010001001000000100010100000000000010010100000000000000000010110000000000000000000000000000000000000000000000000000000000000000000000000000
000000101000000000000000000010001000000000000010000110000000001010101000000000000000000000000000000000000000000000000000000000000000000000000000000000
001010000000010000000000000000000001100000010000001000010111000011000100000000000000000000000000000000000000000000000000000000000000000000000000000000
000001001111000100000010000001000010000110000111100110100000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000110010000100000100000000000000010000000100001000110001110000001010000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000010001000011100100100000000000000000001101010101000000001001000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000001010000000010000100000000000000000010000000000100000000000000000110010000000000000000000000000000000000000000000000000000000000000000000000000000
111000001000000000000000110000000001000010000000000000000101000101000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000010101000000010001000000000001001100000010000111000100010101100000000000000000000000000000000000000000000000000000000000000000000000000000000000
001010000000100010100010100010000000000000000000010100010000100100000001000000000000000000000000000000000000000000000000000000000000000000000000000000
000010000000000010000010000000000000100000000001000000010011000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000
000000001000000001000001100000100010000000000101000100000001010001000100011000000000000000000000000000000000000000000000000000000000000000000000000000
100000001000001000001100000000000000010000000001000100011001000000000101100000000000000000000000000000000000000000000000000000000000000000000000000000
011000000000001000100000000010000001010000010010010100000100000010010000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000001010100101000000001000001101000010000100000000000000001011000001010000000000000000000000000000000000000000000000000000000000000000000000000000
000100001100001000001100000100000001110000111000011001010011000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
100000110001000000000000010001000001000000000000010000000000011001000000000000000000000000000000000000000000000000000000000000000000000000000000000000
010010100101010000010100000000101000010001000101101011010000001000010000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000001011000001000100001000000010000000000001010000000001010010110000100000000000000000000000000000000000000000000000000000000000000000000000000000
000101000000000001000001000100101101111011011100000010000000000010100000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000110010010001000000000000000101100010000000010100100000000101000101100000000000000000000000000000000000000000000000000000000000000000000000000000
110000000000000000001001000000100000010010000001010000001000100001000000000000000000000000000000000000000000000000000000000000000000000000000000000000
010000000101000000010001000000010001000000000000000010000000000100010000000000000000000000000000000000000000000000000000000000000000000000000000000000
100010101000000000000101010100000010000001101001010000000010000000100001000000000000000000000000000000000000000000000000000000000000000000000000000000
000001100000001010010000001000000000100000001000000001000000100010000110000000000000000000000000000000000000000000000000000000000000000000000000000000
000100000000001010001001010010000010100110000100000000000000000010000000010000000000000000000000000000000000000000000000000000000000000000000000000000
001110000000001000000101000000000010100000100001000000010000000001000001100000000000000000000000000000000000000000000000000000000000000000000000000000
000001000010010000101000010000100010000100111001001000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000100100001000110000000100000000001000000000001001000000110000000000000000000000000000000000000000000000000000000000000000000000000000000000000
101100000000000100000000000000100000000010010000101000000000000110000101001000000000000000000000000000000000000000000000000000000000000000000000000000
010000000000010001010000000000000100010000000010110000000000000011100000001000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000100000000010001110000000000111000000000010100000110010001100100000000000000000000000000000000000000000000000000000000000000000000000000000
000100000000001010000110000100010110000000000110001100001100111100000010010000000000000000000000000000000000000000000000000000000000000000000000000000
100000100011011100000000100010100011110110010010100011000010001000000000011000000000000000000000000000000000000000000000000000000000000000000000000000
000000001010001101101000001000000100000010000000001100010000001000000001110000000000000000000000000000000000000000000000000000000000000000000000000000
000001111000000000000010000000000000100000000100011000100000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000
011000000100000000001000001110000100000000000000000000000001000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000100010000000001000100000000010010001000011000000010001000010100000010101000000000000000000000000000000000000000000000000000000000000000000000000000
000000011010000001010010001000001000001000000000000000001000000010010100000000000000000000000000000000000000000000000000000000000000000000000000000000
000001101000000101100000000000100000000001101010000010010010010000100000010000000000000000000000000000000000000000000000000000000000000000000000000000
010010000001000001010001001011011000000000001000001010000010000100100100000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000010001001000101001000001000010010000000000100000011100001000000000000000000000000000000000000000000000000000000000000000000000000000000
100000010000000100011000000000000000000000010000000000000000011001000100000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000100100100000000001000000100000110010000100000001000000100011001000101
000000000000000000000000000000000000000000000000000000000000000000000000000000000000001010000000010000000000000110010110000000001101000000001000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000100000000100001001001000010110001110100010001000010000000000101000010010
000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000001000000000000000000001000000000000000000000000010000100001
000000000000000000000000000000000000000000000000000000000000000000000000000000000001100000010000000100000000000000000000010101001000000000000001100000
000000000000000000000000000000000000000000000000000000000000000000000000000000000010001000000000000000000010000110100101001000001001000011100000100000
000000000000000000000000000000000000000000000000000000000000000000000000000100000000011001100000001000000100000001000000000000010100010100000000010000
000000000000000000000000000000000000000000000000000000000000000000000000000000001000010010000010000000001011000000011000010000011100000110000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000010000000101010010001001000000101000010000000000000010100
000000000000000000000000000000000000000000000000000000000000000000000000000100010000001000001000001100010000000110001000000000101001001101100000001001
000000000000000000000000000000000000000000000000000000000000000000000000000000000110001111001011000000110110010000000000010000010000000011000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000010001100110000100000000010000000000001110000001000100000100001000010010000
000000000000000000000000000000000000000000000000000000000000000000000000000101000000010001010010000100001000000000001011001100010000000000000001000010
000000000000000000000000000000000000000000000000000000000000000000000000000010000010010000011000000101000001000000000001010000100000001001010000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000100010100000000000000000000100010000100000000100001001000000001001000
000000000000000000000000000000000000000000000000000000000000000000000000000000000100001000000000000000001000110101010000110000000000001100001011001001
000000000000000000000000000000000000000000000000000000000000000000000000000000010000000110000110000010000111001000010000000000101100010001000110010000
000000000000000000000000000000000000000000000000000000000000000000000000000001100000110010000000000000010100000000010000000010000000000000000010000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000100001010010000100000001000000000010000010000100000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000011010100010000000000010000010001010110011100001010000000010000010110
000000000000000000000000000000000000000000000000000000000000000000000000000001000000010000000000000100000100000000000001000000000100000000000001100001
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000100111000100000010010100001100000010100001000000000
000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000110000000010000111000001000000101000000001101000100
000000000000000000000000000000000000000000000000000000000000000000000000000101000100100000000000000000000000000000011000000101000000010000001000000010
000000000000000000000000000000000000000000000000000000000000000000000000000000010000100110000001110000101010000000010011101010100101000100000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000010000010000000000000000110000100100000000110011100110000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000100000000000001000000000100000000000010000000000100000100
000000000000000000000000000000000000000000000000000000000000000000000000000000000001010000000000100100001000000000000000001010100011010010010010010110
000000000000000000000000000000000000000000000000000000000000000000000000000001000000110000001110100000000000010100000000010000100000001000000000010000
000000000000000000000000000000000000000000000000000000000000000000000000000000000011000100100000100100100100000100001001000000100010000000011001110001
000000000000000000000000000000000000000000000000000000000000000000000000000101000100010000011001000000001000000000110001010000101010010000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000001001011010000010100000100000000000000010100010000110100100000000010000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000010000010010000000001000000000001001010001100001010000000010000100010
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001100000100000000000001000000010100000000000100000101000100000
000000000000000000000000000000000000000000000000000000000000000000000000000000000001010000100010010000010000000000000000000010000110010000000000000001
000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000010000000000000000100011000000010011000000001000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000111001000100000100100000000011000000001010001000000000100000000000000000001
000000000000000000000000000000000000000000000000000000000000000000000000000111001000100001000000000000000000001001000100001000000000010000000100000010
000000000000000000000000000000000000000000000000000000000000000000000000000000100101001000100010000000000001001110000000000000010001000110001010010000
000000000000000000000000000000000000000000000000000000000000000000000000000001001000001000000000010010000100000000000000101000101001011110000101100000
000000000000000000000000000000000000000000000000000000000000000000000000000110000010001000111010111110000110000100001010000000000010100100100000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000011100100000000011000001001000000010101000001100000000000100100000000
000000000000000000000000000000000000000000000000000000000000000000000000000010001000000001000010000001000010000010001000000000000000001000001001100100
000000000000000000000000000000000000000000000000000000000000000000000000000011000000000100000010100100000001100000010000010010000000010100001000100000
000000000000000000000000000000000000000000000000000000000000000000000000000000001000000110000101000100001100000100001000000000000000000001100000000000
000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000100000100110000000100000100000000001110000001001100000100100
000000000000000000000000000000000000000000000000000000000000000000000000000000010010010010100010000000010110001000000010000000101101000100100010100010
000000000000000000000000000000000000000000000000000000000000000000000000000001001000001100000010010100100001000010100000000000100000000010010001000100
000000000000000000000000000000000000000000000000000000000000000000000000000000010001000100000010001010000001000000000000000011010000000010000000100000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000100100000011000000010000100000000100000010000000100
000000000000000000000000000000000000000000000000000000000000000000000000000000010001000000000000101000000000001000001000100100000000101001000010000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000101011010000100100111110000000101000111000001000101000101000000101
000000000000000000000000000000000000000000000000000000000000000000000000000001000110010100000000000000000010000001000000100100000000010000000000100001
000000000000000000000000000000000000000000000000000000000000000000000000000110011010100000010010000000000101000000100000010000100001000000000010000000
000000000000000000000000000000000000000000000000000000000000000000000000000010000110000000010001010100000010010100000000010000000010101011100000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000110000001101101010000010000000000000100000001010000100000
000000000000000000000000000000000000000000000000000000000000000000000000000010001000100001000000010100100000000001100000010000001000100000000000000010
000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000010000010100000010000000011100101001000000100000001
000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000010000101010100100010010100010000000010000000010000100000001
000000000000000000000000000000000000000000000000000000000000000000000000000000000000100011100000000000010000001000100100100001100100100000001000000100
000000000000000000000000000000000000000000000000000000000000000000000000000100000110100000100000100100000000000001110010010000000000000000000000000001
000000000000000000000000000000000000000000000000000000000000000000000000000000001010010000000100000010100000000001100000001100000100010000100000100000
000000000000000000000000000000000000000000000000000000000000000000000000000000001000111010010000000010000000000000000001100001000110000000100000000010
000000000000000000000000000000000000000000000000000000000000000000000000000001001000100000000000000010000000100000011001110000100100000011011001000001
000000000000000000000000000000000000000000000000000000000000000000000000000100100000000010000010000000101001000000000000001010000010000000100100000001
000000000000000000000000000000000000000000000000000000000000000000000000000111000000000000100000111000001000100001000110000000100000001000100000010000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010100010011000000000010101000000000000000110000010000000011
000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000111000000010100010000001000000010001001000000000000001000001
000000000000000000000000000000000000000000000000000000000000000000000000000100010000000101100001010000001000000000100100001000000000000000100010101100
000000000000000000000000000000000000000000000000000000000000000000000000000000111000000000000001000000001001100000100110110100010010000010000001000000
000000000000000000000000000000000000000000000000000000000000000000000000000001000101001000010010000000111000000001000000000000000000000000001000000001
000000000000000000000000000000000000000000000000000000000000000000000000000000000000100001100000000000000000000000000000000000000000000000000001000110
000000000000000000000000000000000000000000000000000000000000000000000000000100000001000000000010010001100000000000000100101010100000001000000001001011
000000000000000000000000000000000000000000000000000000000000000000000000000001000000000100000010001000100001000010000000010000000001000001000100001100
000000000000000000000000000000000000000000000000000000000000000000000000000100100000100000100001000000001000010100000000000000110000110100110110010100
------- test 9 ----
150
5773 9285
6321 6833
2573 6585
883 5688
6435 1881
5287 9731
7650 4487
1232 2409
3616 4129
6025 8791
778 4457
2509 2479
3528 1954
1236 9380
5394 7106
3344 4117
8753 9636
2375 8377
9033 8540
8770 362
4982 7649
8486 7236
5623 6181
8226 2047
6535 9688
9530 8714
9314 7438
1266 411
3606 3166
3405 3220
6664 5421
5447 2728
1514 5497
1312 335
2507 3034
5771 3109
8286 1718
1895 585
2014 2419
6925 1860
3345 6194
3722 2393
923 8938
3678 8940
966 9506
6996 2037
702 2643
7923 3207
8850 46
1462 6027
361 3849
2360 2370
7011 6320
4163 9259
4273 8329
9561 5970
4533 5047
450 5577
8781 5539
8312 2443
3885 7816
561 4126
4380 3086
3644 1993
1409 5673
9887 870
509 371
1359 1225
4283 3975
3743 2066
1463 4639
5181 3134
1980 9631
1994 2277
3841 3891
7786 7167
341 2455
8620 3272
649 3893
8906 166
5069 1220
2388 232
6943 9279
3481 1857
5696 2579
9526 3301
7656 4909
6259 9523
7260 9779
3210 7523
4830 3473
2602 2305
2469 5927
7197 7051
7469 7808
1285 1751
4336 278
1805 6040
4197 5621
9021 4931
2697 7548
9135 3820
237 1067
2081 3175
6112 4537
6618 7371
2092 2133
1153 8921
4869 1023
1051 4061
4416 4872
85 4340
6177 4583
1409 1247
7353 1741
6165 7446
1967 747
1 7201
2669 9569
2592 5074
6733 6634
1778 8902
980 5015
5879 5486
766 1449
1983 1161
3307 3491
353 4004
7257 3391
5978 7060
4803 1118
5447 6579
4345 7718
7221 6345
3424 5239
7320 845
8717 6319
4217 220
157 5631
8180 5113
1383 7356
9457 6229
7573 442
1634 3152
8399 2406
7326 8480
8249 7299
5292 1378
367 1527
2931 9647
010000101000000001001000101000000010000000000011000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
101101001100000000000000010000100110000001100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
010001010010011010000000011000000000000110000001100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
010000101100000000100100010010001000111101000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000001000101000000000000100100100000000000001000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
011010111001001010011100001000011000111000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
100101000100100001000000100001000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001001000010000000011100000101101111100010110001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
110101000000000000000010100000000000010000011100100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
010110100011110101001000000000000000000010000010010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000010100000100001001001000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000011000100001000110010000110000000001000100001100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000100100000100100000000000001000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000100000100000000010000000000100000001011000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001001000001000000010000000000001000100000001001100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000110110000000011110000100000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001001000000000000001100000100011110000110000010100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
100000100100000000001011100000100001100001001000110000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000100000001100000000000001100101000000000100100100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000001010001001000000100100001000010000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
100001010110000011000101000000000100000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000101010000000010011010000000100010111000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000001001000101000100000101010000110100011110100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000010000101001000000000010001000001000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
100010101000000101010000000000011000001000100001010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
011100000000010100000000001000000010000100000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
101001000010000000100000010001000010000000100100110000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000010010001000010100010000000000010000100000011000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000100000001000000000000000001000000001001001110100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000110000000000010010001010001000001010100000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
010010010000000101100100000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000001000000000010000011100000000010100100100010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000101010000101010100000100001000000000000100000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
010000010000000010001000000000000000001100100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
110000010000000010010100011100010000101010000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000010000000001000001000000000000000110000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000101010000111001000110000000010010001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000101001000000000000110000000000000000000011000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000101000001000000000100100011000110100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001100100000000010000010010100010101000010100010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000010100000110000000000001000011000100001001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
010100000000000001000001000010100000000000001110000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
010000010001000000110000101001011100000100010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000011000000000000010000000000000010000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000010001000011001000010000010000000010011000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000001000000000100010011010000000000001000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
100100000110010010001010000110010001000101000001100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
101001010001011000000001100100000010000010001010110000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001010001001001011100010001011000000000000000011000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000100000001000000101000001000000000000101000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000010101001010100010000000000000000100000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000001100000000000010000000000010000100000100111000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000100000000000001000001000001101010000000110101100000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000110010100100100000100100010011000000001100000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000011000001100000100000000100011100000001010100000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000001000000001010100000000010110001000000001001000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000100000000111000010100000010000000000110000100000100000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000100000000100000000010011000000000000000000010001000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000001000000101000000000000000010000000000001000100000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000100000000000100000100110000010000010000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000001101110000101000000000100000000100000000100000100000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000001000000101000010100000100000000010000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000011010000100110001000000000100000000100101000100000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000001000000111010000001000000001000001001010011000100000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000001000010000000100000001100000010010000001000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000110000110101000100000000000100100110000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000001001110001001001000000100001010000100000000000001000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000001000001001000100001000000000001000100000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000001010000000000000000010000011000000000000000000100000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000001000000001010000010000000000010010010011001000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000100000100010000001000000001000010100000000000111000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000001000000000001111000000000010000000011000010000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000001000001010010100000000000000010000100000001000100000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000001000000100000000000100000000000010100000001100000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000010000100000000010000000101000000010010001001000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000001001100001100001000000001000000000000000100000010000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000011001000000001001000000000000010000000001010000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000101010001000010010010000001100010000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000010000010000000000000000001000100000000010010000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000001001110010000010100000000001001000100000000000001000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000010100000000100000000000000110010010001000001000100000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000010100000001000000000000000000000000101001010000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000101000001000010000010110001001001000000110000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000011010000000000000000000000000010000010010000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000100000100010010000110000010101010000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000010000000000000000101001011001000100100100001000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000100010001000000000000000000100000011000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000100001000000001000000100000000100110000010010001100000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000001001010000000100001000000001000000000101010000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000100000000110000000000000001100100000000001001000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000001001010000000100000010011000000010000100000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000100000000100000101000000000011100100000100000100000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000001010010000000000000011001000100000000000010000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000111101000101001000000010001000000000010010011010000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000010000100000101000100000000100100000100101100000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000010000001100000100101010001000010011000100011000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000001110000010000000001010000000000000000000000000010100000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000100000000000000000010000111100000001010000101100000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000110000100000000100110000000010000001101000001000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000010001000101100000000100000001000000100110000100000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010001000000100000000010001000000001101100010010
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010100110001101000100101001010000000000000110000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100001000010000010100000000000000000000000100
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011000000101010100000000010100100100101000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010101000001000100100000100000011001010000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001100000000101000000101000111010010100101010100001
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011001010001000000001000000010100010010001
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000101000001001000000001011000000010
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001010000000000001000100010010000000010000000110000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001001010000001000100000000001000100001110100010010
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000110010000000000100001000010000000100000000000100
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001100000011000010101010000000000011000000010010
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000100010000000000110000000010000000110000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001001110010100100000000000001100000000000000000100
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011010000000001010000000000100000110001000010000110
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100010000010100000000000000000010000010000000010
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000100000000001001010100000000000000010001000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001011000000000000000000000000000111110000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000100000001001000100001011110000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001011000000001000001010000000010100000001001000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000100100100000010010000000000010000000010100000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000101000000000000100010001000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100001100001001010000101100000000101000101000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001101000000000000000000000001001000000000001000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010010000100100001001000000000000000010000010001000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000001000000000000000000110000001010000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011100000010101000001001000000000010100000000010
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100101010000000000001000010000000000100100000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011000111010001000010001100000100100001000010000101
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000001000000001000001000110000001000100010
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000100000000000000000000010000000010000100000010
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000100000000100101000000010110
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011000010000100000000000001101000000000011100010
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000110001100000000100000001000000000111
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000011100100100010
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010100001000000011010000000001000000000001000110
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010100110000000000011100010001000001010000111
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010010001010100100000000000001001011000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000110010000000100001000100000001000000000000100
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001001010000010100010000000000000000001000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010001101000000000110001000000100000010010000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000010000000100000000010010001000000001000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000110000000101110100010001000100010000000100000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000011010100000000100100000100011000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000100100010000010101000010100101000000010000100
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011001010110110000010000000000001000000000001000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001001001010000000000000000001000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000001001100000000000001001010110100000100000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000001010100110000000000100111111110000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000110000000000000000000001000010010000000000000

 

气象大模型光伏功率预测中的应用:从短期,超短期,中长期的实现与开源代码详解 本文详细介绍了基于大模型的光伏功率预测方法,涵盖超短期(15分钟-1小时)、短期(1-6小时)和中长期(1天-1周)预测。文章首先讨论了数据准备与预处理,包括历史功率、气象、天文和电站特性数据的收集与特征工程。随后,针对不同预测需求,提出了多种深度学习模型:超短期预测采用1DCNN-LSTM混合模型,短期预测使用Transformer模型,中长期预测则通过多尺度特征提取模型和概率预测方法处理不确定性。文章还提供了模型训练、评估、部署和优化的完整流程,并开源了代码实现。未来研究方向包括结合数值天气预报、开发时 阅读详情

相关推荐

【5G NB-IoT NTN】3GPP R17 NB-IoT NTN介绍_nbiot ntn

在3GPP R17协议中,将NB-IoT集成到了NTN(非陆地网络,即卫星通信)中,并定义了一个系统架构。在这个架构中包括一个可配置再生payload的低轨道(LEO)卫星,这意味着该卫星可以执行传统基站的全部或部分功能。该系统架构还可以适配同步轨道(GEO)卫星,这些卫星与LEO卫星类似,也可以配置再生payload。系统高度范围轨道波束覆盖范围LEO300~1500km绕地球转100~1000kmGEO35786km与地球自转同步200~3500km。

2401_84010302的博客 3568

【USACO2.4.4】回家 最短路

想说:什么破题目描述。 自环!?  从A -> a 距离是100的话,a -> C 距离是50. 那么 那么A->C距离是150 ! 题目需要把A和a看成是2个截然不同的点!然后直接做最短路即可。  这题目描述我看的也是醉了…… Test 1: TEST OK [0.003 secs, 3404 KB] Test 2: TEST OK [0.003 s

ACMer不要报考高校代码为13627的移通学院! 616

FISCO-BCOS配置及使用控制台

如果因为网络问题长时间无法下载,请尝试:curl -#LO https://gitee.com/FISCO-BCOS/console/raw/master-2.0/tools/download_console.sh && bash download_console.sh。为了可以更加方便快捷,所以HelloWorld合约已经被内置了,位于控制台下面的contracts/solidity/HelloWorld.sol。用于获取和设置name的值,合约代码如下。部署成功会返回合约地址。

qq_51562644的博客 831

【USACO 2.4】Cow Tours (最短路)

题意:给你n(最多150)个点的坐标,给出邻接矩阵,并且整个图至少两个联通块,现在让你连接一条边,使得所有可联通的两点的最短距离的最大值最小。 题解:先dfs染色,再用floyd跑出原图的直径O($n^3$),然后枚举新增的边的端点O($n^2$),再分别找出到边端点距离最远的点($n$),那么添加这条边后新图的直径要么是原图直径要么就是两个端点到各自最远点的距离之和加上边的长度。每次...

dingguayi7025的博客 241

Android车载应用开发与分析(11)- 车载Android应用开发入门指南

将时间回退到2017年我大学刚毕业时,彼时移动互联网就已经开始退潮,各大个培训机构也纷纷停止了Android相关的培训,曾经热火朝天的应用开发从那时起,就开始走向下坡路,小程序以及众多跨平台框架也让市场对Android原生开发的需求逐年降低,市场需求的降低也造就了Android开发的面试变得史无前例的“卷”。 终于我在2019年选择离开了互联网,投身当时还不是非常火热的车载Android领域继续从事Android原生开发。而这一年中国首个外商独资的整车制造项目,“...

linkwj的博客 1万+

Windows 10下用Python 3搞定Android源码下载:最新repo工具避坑指南

本文详细介绍了在Windows 10系统上,使用Python 3和官方最新repo工具下载Android源码的完整流程。文章提供了从Git安装、环境配置到repo工具初始化、同步加速及常见错误排查的避坑指南,帮助开发者高效搭建稳定的源码下载环境。

weixin_29266749的博客 436

(单源最短路)[USACO11DEC]RoadBlock S

一、算法分析 首先想朴素的方法,存图,先跑一遍最短路,然后枚举扩大二倍的边,然后再跑最短路。然后优化,易证扩大的边必然是原最短路的边,所以要记录原最短路的边,记录方式是写一个pre数组,这样从后往前扫一遍就行了。但是注意两个难点,一是如何在链式前向星中扩大边权,我采用的方式是,用邻接矩阵来存某两个点a到b的边在前向星数组中的w的编号。二是要注意,只有第一次跑单源最短路的时候,要记录pre数组,之后的都不能改pre数组了,否则可能会发生死循环,我采用的解决方法是给dijkstra函数加一个参数用来标记是否是第

numb_ac的博客 3351

Kriging代理模型理论相关推导

代理模型,Kriging,加点准则

森屹的博客 1万+

SSL·牛的旅行【Floyed】

牛的旅行【Floyed】SSL 1119Description--Input--Output--Sample Input--Sample Output--解题思路--代码-- Description– 农民John的农场里有很多牧区。有的路径连接一些特定的牧区。一片所有连通的牧区称为一个牧场。但是就目前而言,你能看到至少有两个牧区不连通。这样,农民John就有多个牧区了。 John想在农场里添加一...

ヽ(o_ _)o 428

[官方培训]19-物理模拟 Epic 肖月 笔记

物理引擎全局解算精度的设置,帧率越高,子步越多得到的模拟结果就越精确。引擎默认情况下是以变化的帧率运行的,但是对于Chaos物理引擎来说。一般子步越小,帧率越固定,效果就会更好更稳定一些。图示的分步选项就是依据下方的最长子步时长和最大步数对动态变化的帧率,进一步的做拆分来保证物理效果。对于影视项目建议都开启分步选项。红色框内有三个迭代次数的设置,这是Chaos基于位置的约束求解算法专用的一个设置,可以简单理解为迭代次数越高,当前帧一个子步内得到的结果就越精确。

Tcohneyn的博客 1545

华为OD新系统机试真题 - 获取大写字母瓷砖拼出独特图案数量

华为OD机试新系统真题【获取大写字母瓷砖拼出独特图案数量】,提供C语言、Java、C++、Python、Go、JavaScript源码实现,并提供完整思路讲解,以及在线OJ模拟做题。华为OD新系统四月二十九号机试真题【获取大写字母瓷砖拼出独特图案数量】

qq_45776114的博客 1218

2.4.4 Bessie Come Home 回家

Description 现在是晚餐时间,而母牛们在外面分散的牧场中。 农民约翰按响了电铃,所以她们开始向谷仓走去。 你的工作是要指出哪只母牛会最先到达谷仓(在给出的测试数据中,总会有且只有一只速度最快的母牛)。 在挤奶的时候(晚餐前),每只母牛都在她自己的牧场上,一些牧场上可能没有母牛。 每个牧场由一条条道路和一个或多个牧场连接(可能包括自己)。 有时,两个牧场(可能是自我相同的)之间会有超过一...

Akatsuki 789

电化学-NanoStat-开源系统的使用说明

本文主要介绍了NanoStat开源系统的使用方法,从硬件打板、设备组装、软件安装3个层次进行了详细说明。整个流程根据作者提供的视频能够很好的完成,不需要太多的技术,对刚入门的新手是一个不错的练手项目。其次软件还有很大的优化空间,能够进一步提高系统的精度,对之后类似恒电位仪系统的开发也有很大的借鉴意义。

分享技术笔记,希望对大家能够有一定的帮助,同时也通过归纳总结提升自己的个人能力。 2000

USACO Section 2.4 Cow Tours(最短路+并查集)

Cow Tours Farmer John has a number of pastures on his farm. Cow paths connect some pastures with certain other pastures, forming a field. But, at the present time, you can find at least two past...

angtongyou1893的博客 223

Camera2Demo

在Camera2 的基础上进行封装,使得Camera2一堆初始化逻辑与Activity分离,降低耦合度,完成预览拍照并保存的操作

Devexpress16.2.6破解工具

Devexpress16.2.6破解工具Devexpress16.2.6破解工具Devexpress16.2.6破解工具Devexpress16.2.6破解工具

USACO Section 2.4 Cow Tours (Floyd+并查集)

用floyd计算每个点可达的最短距离,然后统计每个点可达距离的最大长度。然后用并查集计算每个点所属的集合,枚举两个不同集合a、b里的两个点i、j,从所有的max {edge[a],edge[b],distance(i,j)+l(i)+l(j)},其中edge[x]表示集合x的直径,distance(x,y)表示x和y点的距离,l(x)表示点x可达距离的最大长度。 #include #incl

一个码农 422

ET2012新版免狗免安装绿色软件

ET2012新版免狗免安祖昂绿色软件。,新界面,新视觉,

USACO-Section 2.4 Cow Tours(最短路[Floyd])

题意开始有点没看到,就看看别人的理解,结果解法一直在大脑挥之不去 由于只用添加(i,j)一条路,所以这两个牧场连成的片区的直径如果大于i和j所在牧场的直径,则其直径为dis[i]+dis[j]+distance(i,j)【其中dis[i]表示在其所在牧场中,与i最远的距离,distance(i,j)表示i,j两点距离,即添加的路的距离】;否则其直径为i和j所在牧场的直径的较大值

idealism_xxm的专栏 559

SIMATIC S7-1200, S7-1500 PID 控制[手册]

SIMATIC S7-1200, S7-1500 PID 控制[手册]

USACO - Chapter2 Section 2.4 - Cow Tours

Cow Tours

zhuo1ang的博客 265

USACO section2.4 Cow Tours题解&代码

把max()和min()用反了过了6组也是挺醉的,USACO数据也会这么水23333 一道写起来有点麻烦的题目,并查集+floyd就可以了…/* ID:rainbow16 LANG:C++ TASK:cowtour */ #include<iostream> #include<stdio.h> #include<math.h> using namespace std; char temp[155]

Rainbow6174's home 700

USACO Section 2.4 Cow Tours - 考虑要全面阿...

这道题最值得注意的是牧场数>=2...也就是说把两个联通图相连后得到的新牧场大小并不一定是最大的..可能还有另外一个没连的直径更长...     其他的..用并查集来判断是否在一个联通图里..用Floyd求两点的最短路径~~     进入第三章了~~ Program: /* ID: zzyzzy12 LANG: C++ TASK: cowtour */ #inc

zzyzzy12 906

usaco-Section 2.4-Cow Tours

Cow Tours Farmer John has a number of pastures on his farm. Cow paths connect some pastures with certain other pastures, forming a field. But, at the present time, you can find at least two pastures ...

weixin_30687811的博客 130

USACO-Section2.4 Cow Tours【Floyd算法】

题目描述: 农民 John的农场里有很多牧区。有的路径连接一些特定的牧区。一片所有连通的牧区称为一个牧场。但是就目前而言,你能看到至少有两个牧区通过任何路径都不连通。这样,Farmer John就有多个牧场了。 John想在农场里添加一条路径(注意,恰好一条)。对这条路径有以下限制: 一个牧场的直径就是牧场中最远的两个牧区的距离(本题中所提到的所有距离指的都是最短的距离)。考虑如下的有5个牧

tjj1998的博客 626

USACO Section 2.4

USACO Section 2.4 The Tamworth Two/* ID: beihai2013 TASK: ttwo LANG: C++ */ /* 刚开始想复杂了,想通过记录数组然后求牛或者人经过此点的时间戳来求周期,然后求一个通项 后面发现这样的讨论不仅复杂,而且容易出现十分多的情况 然后仔细一想,假设是有人和牛周期的话,他们分别得周期不

beihai2013 286

【BZOJ1576】[Usaco2009 Jan]安全路经Travel 最短路+并查集

【BZOJ1576】[Usaco2009 Jan]安全路经Travel Description Input * 第一行: 两个空格分开的数, N和M * 第2..M+1行: 三个空格分开的数a_i, b_i,和t_i Output * 第1..N-1行: 第i行包含一个数:从牛棚_1到牛棚_i+1并且避免从牛棚1到牛棚i+1最短路经上最后一条牛路的最少...

aodanchui1057的博客 180

HDU 1598 并查集

find the most comfortable road Time Limit: 1000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 791Accepted Submission(s): 285Problem Description XX星有许多城市,城市之间通过...

lilisalo 287

最短路+并查集 USACO 安全出行

题意:给你一些点, 他们与节点1的最短路的最后一条边当且仅当对于这个点的最短路不可走, 求每一个点到1的最短距离。

小蒟蒻wddwjlss的博客 310

2018.10.28【USACO2007 nov】次短路径(最短路)(结论)

描述 贝西所在的牧场一共有 N 个地点。 M 条双向通行的道路连接这些地点,其中第 i 条道路连接 Ai 和 Bi,长度为 Li。贝西想从第一个地点走到第 N 个地点,由于路上风景不错,她决定不走最短 路径,而选择次短路径。次短路径的长度严格大于最短路径。如果有两条路径的长度都是最短的,那 么它们都不算次短路径。次短路径允许重复通过一些道路...

anlongyi8087的博客 313
上一篇: USACO section 2.4 Overfencing(dfs+bfs)
下一篇: USACO section 2.4 Bessie Come Home(最短路)
剑不飞
博客等级 码龄15年 86粉丝 505原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值