QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#706098#8071. Ribbon Roadjerry2423AC ✓27ms5432kbC++173.0kb2024-11-03 06:52:462024-11-03 06:52:48

Judging History

你现在查看的是最新测评结果

  • [2024-11-03 06:52:48]
  • 评测
  • 测评结果:AC
  • 用时:27ms
  • 内存:5432kb
  • [2024-11-03 06:52:46]
  • 提交

answer

#include<bits/stdc++.h> 
#define ll long long 
#define LL __int128_t 
#define PB push_back 
#define debug(x) cout<<#x<<" "<<x<<endl 
using namespace std;
const int N(100005);
const double EPS=1e-9;
inline int sgn(double a){ return a < -EPS ? -1 : a > EPS; }
inline int cmp(double a, double b){ return sgn(a-b); }
struct Point;
typedef Point Vector;
struct Point{
    double x,y;
    Point(){}
    Point(double a, double b):x(a),y(b){}
    double len(){return sqrt(x*x+y*y);}
    bool onSegment(Point s, Point e);
    int inPolygon(Point poly[]);
    void read() { cin>>x>>y; }
    void out() {cout<<"x: "<<x<<" y: "<<y<<endl;}
    Point operator+(Vector v) {return {x+v.x,y+v.y};}
    Vector operator-(Point p) {return {x-p.x,y-p.y};}
    double operator^(Vector v) {return x*v.y-y*v.x;}//叉乘
    double operator*(Vector v) {return x*v.x+y*v.y;}//点乘
}poly[N];
bool Point::onSegment(Point s, Point e){
	Vector v1 = s-*this;
	Vector v2 = e-*this;
	return sgn(v1^v2)==0&&sgn(v1*v2)<=0;
}
bool onLine(Point x, Point s, Point e){
	Vector v1 = s-x;
	Vector v2 = e-x;
	return sgn(v1^v2)==0;
}
int n;
int Point::inPolygon(Point poly[])
{//判断点是否在多边形内,若点在多边形内返回1,在多边形外部返回0,在多边形上返回-1
    int wn = 0;
    for(int i = 1; i <= n; ++i){
        if((*this).onSegment(poly[i], poly[i%n+1])) return -1;
        int k = sgn((poly[i%n+1] - poly[i])^(*this - poly[i]));
        int d1 = sgn(poly[i].y - y);
        int d2 = sgn(poly[i%n+1].y - y);
        if(k > 0 && d1 <= 0 && d2 > 0) wn++;
        if(k < 0 && d2 <= 0 && d1 > 0) wn++;
    }
    return wn%2;
}
int L[2], p;
int main() 
{ 
	//freopen("1.in","r",stdin); 
	ios::sync_with_stdio(false); 
	cin.tie(NULL);
	cin >> n;
	for(int i = 1; i <= n; ++i) poly[i].read();
	Point ant, line; ant.read(), line.read();
	for(int i = 1; i <= n; ++i)
		if(ant.onSegment(poly[i], poly[i%n+1]))
		{
			Point cp = ant;
			ant.x = (poly[i].x+poly[i%n+1].x)/2;
			ant.y = (poly[i].y+poly[i%n+1].y)/2;
			if(onLine(line, poly[i], poly[i%n+1])) { cout<<"?"<<endl; return 0; }
			Point dec = poly[i%n+1]-poly[i];
			double adx, ady;
			if(!sgn(dec.y)) adx = 0, ady = 1;
			else adx = dec.y, ady = -dec.x;
			Point bsx(ant.x+adx, ant.y+ady);
			Vector base = bsx-ant;
			if(base*(line-ant) < 0) bsx.x -= adx*2, bsx.y -= ady*2, base = bsx-ant;
			for(int j = 1; j <= n; ++j) if(j != i)
			{
				Vector JGbase = ant-poly[j];
				Vector v1 = bsx-poly[j];
				Vector v2 = poly[j%n+1]-poly[j];
				if(sgn(JGbase^v1) != sgn(JGbase^v2) && sgn(JGbase^v2) != 0 && sgn(JGbase^v1)) continue;
				Vector v3 = poly[j] - ant;
				Vector v4 = poly[j%n+1] - ant;
				int d1 = sgn(base^v3);
				int d2 = sgn(base^v4);
				if(d1 >= 0 && d2 < 0) L[p]++;
				else if(d2 >= 0 && d1 < 0) L[p]++;
			}
			ant = cp;
			p++;
		}
	if(p == 2 && (L[0]%2)^(L[1]%2)) cout<<"?"<<endl;
	else if(L[0]%2) cout<<"inside"<<endl;
	else if(!(L[0]%2)) cout<<"outside"<<endl;
	return 0; 
} 

详细

Test #1:

score: 100
Accepted
time: 0ms
memory: 3872kb

input:

4
0 0
2 0
2 2
0 2
1 0 1 1

output:

inside

result:

ok single line: 'inside'

Test #2:

score: 0
Accepted
time: 0ms
memory: 3812kb

input:

4
0 0
0 2
2 2
2 0
1 0 -1 0

output:

?

result:

ok single line: '?'

Test #3:

score: 0
Accepted
time: 0ms
memory: 3808kb

input:

4
0 0
5 0
5 5
0 5
4 0 1 0

output:

?

result:

ok single line: '?'

Test #4:

score: 0
Accepted
time: 0ms
memory: 3916kb

input:

4
0 0
2 0
2 2
0 2
0 0 1 1

output:

inside

result:

ok single line: 'inside'

Test #5:

score: 0
Accepted
time: 0ms
memory: 3864kb

input:

4
0 0
2 0
2 2
0 2
0 0 -1 -1

output:

outside

result:

ok single line: 'outside'

Test #6:

score: 0
Accepted
time: 0ms
memory: 3732kb

input:

4
0 0
1 0
1 1
0 1
0 0 1 -1

output:

?

result:

ok single line: '?'

Test #7:

score: 0
Accepted
time: 0ms
memory: 3924kb

input:

10
0 4
2 4
2 6
6 6
6 4
4 4
4 2
2 2
2 0
0 0
2 4 3 4

output:

?

result:

ok single line: '?'

Test #8:

score: 0
Accepted
time: 0ms
memory: 3744kb

input:

10
0 4
2 4
2 6
6 6
6 4
4 4
4 2
2 2
2 0
0 0
2 4 2 5

output:

?

result:

ok single line: '?'

Test #9:

score: 0
Accepted
time: 0ms
memory: 3860kb

input:

10
0 4
2 4
2 6
6 6
6 4
4 4
4 2
2 2
2 0
0 0
2 4 3 5

output:

?

result:

ok single line: '?'

Test #10:

score: 0
Accepted
time: 0ms
memory: 3868kb

input:

10
0 4
2 4
2 6
6 6
6 4
4 4
4 2
2 2
2 0
0 0
2 4 1 5

output:

outside

result:

ok single line: 'outside'

Test #11:

score: 0
Accepted
time: 0ms
memory: 3884kb

input:

10
0 4
2 4
2 6
6 6
6 4
4 4
4 2
2 2
2 0
0 0
2 4 2 3

output:

?

result:

ok single line: '?'

Test #12:

score: 0
Accepted
time: 0ms
memory: 3816kb

input:

10
0 4
2 4
2 6
6 6
6 4
4 4
4 2
2 2
2 0
0 0
2 4 3 3

output:

inside

result:

ok single line: 'inside'

Test #13:

score: 0
Accepted
time: 0ms
memory: 3928kb

input:

10
0 4
2 4
2 6
6 6
6 4
4 4
4 2
2 2
2 0
0 0
2 4 1 3

output:

?

result:

ok single line: '?'

Test #14:

score: 0
Accepted
time: 0ms
memory: 3820kb

input:

10
0 4
2 4
2 6
6 6
6 4
4 4
4 2
2 2
2 0
0 0
2 4 1 4

output:

?

result:

ok single line: '?'

Test #15:

score: 0
Accepted
time: 0ms
memory: 3740kb

input:

10
0 4
2 4
2 6
6 6
6 4
4 4
4 2
2 2
2 0
0 0
1 4 3 3

output:

inside

result:

ok single line: 'inside'

Test #16:

score: 0
Accepted
time: 0ms
memory: 3920kb

input:

10
0 4
2 4
2 6
6 6
6 4
4 4
4 2
2 2
2 0
0 0
5 4 3 3

output:

outside

result:

ok single line: 'outside'

Test #17:

score: 0
Accepted
time: 0ms
memory: 3804kb

input:

10
0 4
2 4
2 6
6 6
6 4
4 4
4 2
2 2
2 0
0 0
2 5 3 3

output:

inside

result:

ok single line: 'inside'

Test #18:

score: 0
Accepted
time: 0ms
memory: 3868kb

input:

10
0 4
2 4
2 6
6 6
6 4
4 4
4 2
2 2
2 0
0 0
2 1 3 3

output:

outside

result:

ok single line: 'outside'

Test #19:

score: 0
Accepted
time: 0ms
memory: 3744kb

input:

3
-1000000 -1000000
1000000 999999
2 -4
-499999 -500002 999999 999988

output:

inside

result:

ok single line: 'inside'

Test #20:

score: 0
Accepted
time: 0ms
memory: 3860kb

input:

3
-1000000 -1000000
1000000 999999
2 -4
-499999 -500002 999999 999987

output:

outside

result:

ok single line: 'outside'

Test #21:

score: 0
Accepted
time: 0ms
memory: 3856kb

input:

3
-701377 132392
760304 132392
760304 780416
-700168 132928 -1000000 0

output:

?

result:

ok single line: '?'

Test #22:

score: 0
Accepted
time: 0ms
memory: 3892kb

input:

3
0 0
4 4
2 8
3 6 4 4

output:

?

result:

ok single line: '?'

Test #23:

score: 0
Accepted
time: 0ms
memory: 3808kb

input:

3
0 0
4 4
2 8
3 6 2 8

output:

?

result:

ok single line: '?'

Test #24:

score: 0
Accepted
time: 0ms
memory: 3804kb

input:

18
1 0
-1 0
-1 1
0 2
0 3
-1 4
0 5
-1 6
0 7
-1 8
0 9
0 10
1 11
1 12
0 13
1 14
0 15
10 16
0 0 0 8

output:

inside

result:

ok single line: 'inside'

Test #25:

score: 0
Accepted
time: 0ms
memory: 3816kb

input:

19
1 0
-1 0
-1 1
0 2
0 3
-1 4
0 5
-1 6
0 7
-1 8
0 9
0 10
1 11
1 12
0 13
1 14
0 15
0 16
-100 -100
0 0 0 8

output:

outside

result:

ok single line: 'outside'

Test #26:

score: 0
Accepted
time: 0ms
memory: 3812kb

input:

18
0 1
0 -1
1 -1
2 0
3 0
4 -1
5 0
6 -1
7 0
8 -1
9 0
10 0
11 1
12 1
13 0
14 1
15 0
16 10
0 0 8 0

output:

inside

result:

ok single line: 'inside'

Test #27:

score: 0
Accepted
time: 0ms
memory: 3860kb

input:

19
0 1
0 -1
1 -1
2 0
3 0
4 -1
5 0
6 -1
7 0
8 -1
9 0
10 0
11 1
12 1
13 0
14 1
15 0
16 0
-100 -100
0 0 8 0

output:

outside

result:

ok single line: 'outside'

Test #28:

score: 0
Accepted
time: 0ms
memory: 3740kb

input:

16
2 0
0 2
2 2
4 3
3 3
3 4
4 4
4 5
5 5
5 4
6 6
7 6
7 7
8 8
-1 8
-1 0
1 1 9 9

output:

outside

result:

ok single line: 'outside'

Test #29:

score: 0
Accepted
time: 0ms
memory: 3812kb

input:

16
2 0
0 2
2 2
4 3
3 3
3 4
4 4
4 5
5 5
5 4
6 6
7 6
7 7
8 8
9 8
9 0
1 1 9 9

output:

inside

result:

ok single line: 'inside'

Test #30:

score: 0
Accepted
time: 2ms
memory: 4040kb

input:

7802
0 1000000
628 999999
1256 999999
1885 999998
2513 999996
3141 999995
3770 999992
4398 999990
5027 999987
5655 999984
6283 999980
6912 999976
8168 999966
8797 999961
10053 999949
10682 999942
11310 999936
11938 999928
12567 999921
13195 999912
13823 999904
14452 999895
15080 999886
15708 999876
...

output:

inside

result:

ok single line: 'inside'

Test #31:

score: 0
Accepted
time: 2ms
memory: 4048kb

input:

7802
0 1000000
628 999999
1256 999999
1885 999998
2513 999996
3141 999995
3770 999992
4398 999990
5027 999987
5655 999984
6283 999980
6912 999976
8168 999966
8797 999961
10053 999949
10682 999942
11310 999936
11938 999928
12567 999921
13195 999912
13823 999904
14452 999895
15080 999886
15708 999876
...

output:

?

result:

ok single line: '?'

Test #32:

score: 0
Accepted
time: 0ms
memory: 4044kb

input:

7802
0 1000000
628 999999
1256 999999
1885 999998
2513 999996
3141 999995
3770 999992
4398 999990
5027 999987
5655 999984
6283 999980
6912 999976
8168 999966
8797 999961
10053 999949
10682 999942
11310 999936
11938 999928
12567 999921
13195 999912
13823 999904
14452 999895
15080 999886
15708 999876
...

output:

?

result:

ok single line: '?'

Test #33:

score: 0
Accepted
time: 2ms
memory: 3860kb

input:

7802
0 1000000
628 999999
1256 999999
1885 999998
2513 999996
3141 999995
3770 999992
4398 999990
5027 999987
5655 999984
6283 999980
6912 999976
8168 999966
8797 999961
10053 999949
10682 999942
11310 999936
11938 999928
12567 999921
13195 999912
13823 999904
14452 999895
15080 999886
15708 999876
...

output:

?

result:

ok single line: '?'

Test #34:

score: 0
Accepted
time: 2ms
memory: 4052kb

input:

7802
0 1000000
628 999999
1256 999999
1885 999998
2513 999996
3141 999995
3770 999992
4398 999990
5027 999987
5655 999984
6283 999980
6912 999976
8168 999966
8797 999961
10053 999949
10682 999942
11310 999936
11938 999928
12567 999921
13195 999912
13823 999904
14452 999895
15080 999886
15708 999876
...

output:

outside

result:

ok single line: 'outside'

Test #35:

score: 0
Accepted
time: 2ms
memory: 3992kb

input:

7802
0 1000000
628 999999
1256 999999
1885 999998
2513 999996
3141 999995
3770 999992
4398 999990
5027 999987
5655 999984
6283 999980
6912 999976
8168 999966
8797 999961
10053 999949
10682 999942
11310 999936
11938 999928
12567 999921
13195 999912
13823 999904
14452 999895
15080 999886
15708 999876
...

output:

inside

result:

ok single line: 'inside'

Test #36:

score: 0
Accepted
time: 0ms
memory: 3816kb

input:

99
0 1000000
63423 997986
126592 991954
189251 981928
251147 967948
312033 950071
371662 928367
429794 902926
486196 873849
540640 841253
592907 805270
642787 766044
690079 723734
734591 678509
776146 630552
814575 580056
849725 527225
881453 472271
909631 415415
934147 356886
954902 296920
971811 2...

output:

inside

result:

ok single line: 'inside'

Test #37:

score: 0
Accepted
time: 0ms
memory: 3796kb

input:

99
0 1000000
63423 997986
126592 991954
189251 981928
251147 967948
312033 950071
371662 928367
429794 902926
486196 873849
540640 841253
592907 805270
642787 766044
690079 723734
734591 678509
776146 630552
814575 580056
849725 527225
881453 472271
909631 415415
934147 356886
954902 296920
971811 2...

output:

inside

result:

ok single line: 'inside'

Test #38:

score: 0
Accepted
time: 0ms
memory: 3736kb

input:

99
0 1000000
63423 997986
126592 991954
189251 981928
251147 967948
312033 950071
371662 928367
429794 902926
486196 873849
540640 841253
592907 805270
642787 766044
690079 723734
734591 678509
776146 630552
814575 580056
849725 527225
881453 472271
909631 415415
934147 356886
954902 296920
971811 2...

output:

?

result:

ok single line: '?'

Test #39:

score: 0
Accepted
time: 0ms
memory: 3800kb

input:

99
0 1000000
63423 997986
126592 991954
189251 981928
251147 967948
312033 950071
371662 928367
429794 902926
486196 873849
540640 841253
592907 805270
642787 766044
690079 723734
734591 678509
776146 630552
814575 580056
849725 527225
881453 472271
909631 415415
934147 356886
954902 296920
971811 2...

output:

inside

result:

ok single line: 'inside'

Test #40:

score: 0
Accepted
time: 0ms
memory: 3808kb

input:

99
0 1000000
63423 997986
126592 991954
189251 981928
251147 967948
312033 950071
371662 928367
429794 902926
486196 873849
540640 841253
592907 805270
642787 766044
690079 723734
734591 678509
776146 630552
814575 580056
849725 527225
881453 472271
909631 415415
934147 356886
954902 296920
971811 2...

output:

?

result:

ok single line: '?'

Test #41:

score: 0
Accepted
time: 0ms
memory: 3816kb

input:

99
0 1000000
63423 997986
126592 991954
189251 981928
251147 967948
312033 950071
371662 928367
429794 902926
486196 873849
540640 841253
592907 805270
642787 766044
690079 723734
734591 678509
776146 630552
814575 580056
849725 527225
881453 472271
909631 415415
934147 356886
954902 296920
971811 2...

output:

outside

result:

ok single line: 'outside'

Test #42:

score: 0
Accepted
time: 0ms
memory: 3860kb

input:

99
0 1000000
63423 997986
126592 991954
189251 981928
251147 967948
312033 950071
371662 928367
429794 902926
486196 873849
540640 841253
592907 805270
642787 766044
690079 723734
734591 678509
776146 630552
814575 580056
849725 527225
881453 472271
909631 415415
934147 356886
954902 296920
971811 2...

output:

?

result:

ok single line: '?'

Test #43:

score: 0
Accepted
time: 0ms
memory: 3920kb

input:

99
0 1000000
63423 997986
126592 991954
189251 981928
251147 967948
312033 950071
371662 928367
429794 902926
486196 873849
540640 841253
592907 805270
642787 766044
690079 723734
734591 678509
776146 630552
814575 580056
849725 527225
881453 472271
909631 415415
934147 356886
954902 296920
971811 2...

output:

outside

result:

ok single line: 'outside'

Test #44:

score: 0
Accepted
time: 0ms
memory: 3872kb

input:

99
0 1000000
63423 997986
126592 991954
189251 981928
251147 967948
312033 950071
371662 928367
429794 902926
486196 873849
540640 841253
592907 805270
642787 766044
690079 723734
734591 678509
776146 630552
814575 580056
849725 527225
881453 472271
909631 415415
934147 356886
954902 296920
971811 2...

output:

?

result:

ok single line: '?'

Test #45:

score: 0
Accepted
time: 0ms
memory: 3916kb

input:

27
0 9311
0 552
25 34
216 17
1009 5
1481 2
2235 1
8483 1
9403 2
9894 3
9957 42
9993 326
9999 457
9999 7378
9998 7668
9995 9433
9930 9972
9400 9997
8788 9998
6394 9999
1911 9998
1223 9994
238 9981
215 9980
78 9970
16 9863
3 9585
1567 9996 3 9585

output:

inside

result:

ok single line: 'inside'

Test #46:

score: 0
Accepted
time: 0ms
memory: 3780kb

input:

27
0 9311
0 552
25 34
216 17
1009 5
1481 2
2235 1
8483 1
9403 2
9894 3
9957 42
9993 326
9999 457
9999 7378
9998 7668
9995 9433
9930 9972
9400 9997
8788 9998
6394 9999
1911 9998
1223 9994
238 9981
215 9980
78 9970
16 9863
3 9585
1567 9996 1911 9998

output:

?

result:

ok single line: '?'

Test #47:

score: 0
Accepted
time: 0ms
memory: 3924kb

input:

27
0 9311
0 552
25 34
216 17
1009 5
1481 2
2235 1
8483 1
9403 2
9894 3
9957 42
9993 326
9999 457
9999 7378
9998 7668
9995 9433
9930 9972
9400 9997
8788 9998
6394 9999
1911 9998
1223 9994
238 9981
215 9980
78 9970
16 9863
3 9585
16 9863 215 9980

output:

inside

result:

ok single line: 'inside'

Test #48:

score: 0
Accepted
time: 0ms
memory: 3860kb

input:

10
9721 2669
9845 9166
8645 9559
7259 9656
3655 9444
345 8509
247 5265
2078 522
2648 399
8250 1103
8250 1103 10000 -10000

output:

outside

result:

ok single line: 'outside'

Test #49:

score: 0
Accepted
time: 0ms
memory: 3740kb

input:

14
5824 35
9575 104
9962 885
9964 8012
9538 9882
8343 9933
5020 9947
338 9598
93 6952
75 6050
55 2265
336 1057
519 581
4896 89
4896 89 -1 -1

output:

outside

result:

ok single line: 'outside'

Test #50:

score: 0
Accepted
time: 0ms
memory: 3812kb

input:

27
0 9311
0 552
25 34
216 17
1009 5
1481 2
2235 1
8483 1
9403 2
9894 3
9957 42
9993 326
9999 457
9999 7378
9998 7668
9995 9433
9930 9972
9400 9997
8788 9998
6394 9999
1911 9998
1223 9994
238 9981
215 9980
78 9970
16 9863
3 9585
16 9863 3 9585

output:

?

result:

ok single line: '?'

Test #51:

score: 0
Accepted
time: 0ms
memory: 3924kb

input:

27
0 -9311
0 -552
-25 -34
-216 -17
-1009 -5
-1481 -2
-2235 -1
-8483 -1
-9403 -2
-9894 -3
-9957 -42
-9993 -326
-9999 -457
-9999 -7378
-9998 -7668
-9995 -9433
-9930 -9972
-9400 -9997
-8788 -9998
-6394 -9999
-1911 -9998
-1223 -9994
-238 -9981
-215 -9980
-78 -9970
-16 -9863
-3 -9585
-1567 -9996 -3 -9585

output:

inside

result:

ok single line: 'inside'

Test #52:

score: 0
Accepted
time: 0ms
memory: 3800kb

input:

4
1000000 1000000
1000000 -1000000
-1000000 -1000000
-1000000 1000000
1000000 1000000 -1000000 -1000000

output:

inside

result:

ok single line: 'inside'

Test #53:

score: 0
Accepted
time: 20ms
memory: 5432kb

input:

100000
-999999 -999999
-999999 999999
999999 999999
999999 -999997
-999997 -999997
-999997 999997
999997 999997
999997 -999995
-999995 -999995
-999995 999995
999995 999995
999995 -999993
-999993 -999993
-999993 999993
999993 999993
999993 -999991
-999991 -999991
-999991 999991
999991 999991
999991 -...

output:

inside

result:

ok single line: 'inside'

Test #54:

score: 0
Accepted
time: 25ms
memory: 5380kb

input:

100000
-999999 -999999
-999999 999999
999999 999999
999999 -999997
-999997 -999997
-999997 999997
999997 999997
999997 -999995
-999995 -999995
-999995 999995
999995 999995
999995 -999993
-999993 -999993
-999993 999993
999993 999993
999993 -999991
-999991 -999991
-999991 999991
999991 999991
999991 -...

output:

?

result:

ok single line: '?'

Test #55:

score: 0
Accepted
time: 24ms
memory: 5392kb

input:

100000
-999999 -999999
-999999 999999
999999 999999
999999 -999997
-999997 -999997
-999997 999997
999997 999997
999997 -999995
-999995 -999995
-999995 999995
999995 999995
999995 -999993
-999993 -999993
-999993 999993
999993 999993
999993 -999991
-999991 -999991
-999991 999991
999991 999991
999991 -...

output:

outside

result:

ok single line: 'outside'

Test #56:

score: 0
Accepted
time: 26ms
memory: 5420kb

input:

100000
-1000000 -1000000
-1000000 1000000
1000000 1000000
1000000 -999998
-999998 -999998
-999998 999998
999998 999998
999998 -999996
-999996 -999996
-999996 999996
999996 999996
999996 -999994
-999994 -999994
-999994 999994
999994 999994
999994 -999992
-999992 -999992
-999992 999992
999992 999992
9...

output:

outside

result:

ok single line: 'outside'

Test #57:

score: 0
Accepted
time: 25ms
memory: 5364kb

input:

100000
-999999 -999999
-999999 999999
999999 999999
999999 -999997
-999997 -999997
-999997 999997
999997 999997
999997 -999995
-999995 -999995
-999995 999995
999995 999995
999995 -999993
-999993 -999993
-999993 999993
999993 999993
999993 -999991
-999991 -999991
-999991 999991
999991 999991
999991 -...

output:

inside

result:

ok single line: 'inside'

Test #58:

score: 0
Accepted
time: 25ms
memory: 5432kb

input:

100000
-1000000 -1000000
-1000000 1000000
1000000 1000000
1000000 -999998
-999998 -999998
-999998 999998
999998 999998
999998 -999996
-999996 -999996
-999996 999996
999996 999996
999996 -999994
-999994 -999994
-999994 999994
999994 999994
999994 -999992
-999992 -999992
-999992 999992
999992 999992
9...

output:

outside

result:

ok single line: 'outside'

Test #59:

score: 0
Accepted
time: 20ms
memory: 5432kb

input:

100000
-999999 -999999
-999999 999999
999999 999999
999999 -999997
-999997 -999997
-999997 999997
999997 999997
999997 -999995
-999995 -999995
-999995 999995
999995 999995
999995 -999993
-999993 -999993
-999993 999993
999993 999993
999993 -999991
-999991 -999991
-999991 999991
999991 999991
999991 -...

output:

inside

result:

ok single line: 'inside'

Test #60:

score: 0
Accepted
time: 21ms
memory: 5304kb

input:

100000
-999999 -999999
-999999 999999
999999 999999
999999 -999997
-999997 -999997
-999997 999997
999997 999997
999997 -999995
-999995 -999995
-999995 999995
999995 999995
999995 -999993
-999993 -999993
-999993 999993
999993 999993
999993 -999991
-999991 -999991
-999991 999991
999991 999991
999991 -...

output:

inside

result:

ok single line: 'inside'

Test #61:

score: 0
Accepted
time: 26ms
memory: 5368kb

input:

100000
1000000 -1000000
-1000000 -1000000
-999977 -105765
-999934 -154622
-999925 -996839
-999909 331856
-999887 853773
-999880 768934
-999857 -744605
-999840 61205
-999827 747678
-999801 -132859
-999784 -419173
-999746 541180
-999742 -129506
-999707 -635367
-999691 -443297
-999685 817184
-999679 -1...

output:

outside

result:

ok single line: 'outside'

Test #62:

score: 0
Accepted
time: 27ms
memory: 5424kb

input:

100000
1000000 -1000000
-1000000 -1000000
-999976 -467927
-999965 214667
-999956 217928
-999933 -954899
-999893 -845454
-999876 289500
-999836 -465163
-999812 -531298
-999795 937617
-999791 -559648
-999743 -421245
-999728 -187587
-999722 506218
-999713 627831
-999696 631070
-999677 906363
-999664 74...

output:

?

result:

ok single line: '?'

Test #63:

score: 0
Accepted
time: 19ms
memory: 5380kb

input:

100000
999981 -882312
999971 -264460
999950 -376201
999947 -600060
999934 -906201
999922 110923
999909 -870062
999873 104104
999859 -480234
999826 -473848
999781 -943491
999765 -950994
999727 775842
999720 841882
999717 -854453
999706 -936030
999702 -820585
999684 -554624
999667 -405228
999663 -2432...

output:

inside

result:

ok single line: 'inside'

Test #64:

score: 0
Accepted
time: 26ms
memory: 5368kb

input:

100000
1000000 -1000000
-1000000 -1000000
-999994 610157
-999936 -609058
-999898 435353
-999877 -260511
-999871 -953691
-999861 -300474
-999821 -740264
-999794 139855
-999793 999105
-999773 -537635
-999754 753091
-999751 -737813
-999696 666902
-999675 -383992
-999667 -407839
-999650 -828312
-999616 ...

output:

?

result:

ok single line: '?'

Test #65:

score: 0
Accepted
time: 26ms
memory: 5304kb

input:

100000
1000000 -1000000
-1000000 -1000000
-999966 552023
-999959 217104
-999926 811151
-999924 -122827
-999909 -946628
-999872 -391429
-999758 -364295
-999746 -995788
-999715 423860
-999711 242610
-999665 696931
-999655 -35592
-999647 -884343
-999637 623097
-999631 -216298
-999614 -557708
-999519 -7...

output:

outside

result:

ok single line: 'outside'

Test #66:

score: 0
Accepted
time: 25ms
memory: 5384kb

input:

100000
999992 -797508
999984 -867079
999964 354046
999948 -792864
999926 -782199
999909 -829598
999891 294383
999851 738237
999839 -71456
999819 612113
999754 -202039
999700 974451
999681 -138866
999647 587497
999619 -54122
999615 -595536
999606 720829
999584 -842707
999578 203873
999532 -216194
999...

output:

inside

result:

ok single line: 'inside'

Test #67:

score: 0
Accepted
time: 0ms
memory: 3796kb

input:

12
5 0
5 1
1 1
1 2
5 2
5 3
0 3
0 4
5 4
5 5
-1 5
-1 0
0 0 5 5

output:

inside

result:

ok single line: 'inside'

Test #68:

score: 0
Accepted
time: 0ms
memory: 3740kb

input:

12
5 0
5 1
0 1
0 2
5 2
5 3
0 3
0 4
5 4
5 5
-1 5
-1 0
0 0 5 5

output:

inside

result:

ok single line: 'inside'

Test #69:

score: 0
Accepted
time: 0ms
memory: 3796kb

input:

12
5 0
5 1
0 1
0 2
5 2
5 3
0 3
0 4
5 4
5 5
-1 5
-1 0
0 1 2 2

output:

outside

result:

ok single line: 'outside'

Test #70:

score: 0
Accepted
time: 0ms
memory: 3856kb

input:

12
5 0
5 1
0 1
0 2
5 2
5 3
0 3
0 4
5 4
5 5
-1 5
-1 0
5 2 5 3

output:

?

result:

ok single line: '?'

Test #71:

score: 0
Accepted
time: 0ms
memory: 3924kb

input:

12
5 0
5 1
0 1
0 2
5 2
5 3
0 3
0 4
5 4
5 5
-1 5
-1 0
5 1 0 1

output:

?

result:

ok single line: '?'

Test #72:

score: 0
Accepted
time: 0ms
memory: 3736kb

input:

12
5 0
5 1
0 1
0 2
5 2
5 3
0 3
0 4
5 4
5 5
-1 5
-1 0
5 1 0 2

output:

?

result:

ok single line: '?'