QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#78314#5419. TrianglesExplodingKonjacAC ✓3ms3452kbC++175.9kb2023-02-17 18:56:302023-02-17 18:56:30

Judging History

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

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2023-02-17 18:56:30]
  • 评测
  • 测评结果:AC
  • 用时:3ms
  • 内存:3452kb
  • [2023-02-17 18:56:30]
  • 提交

answer

#include <bits/stdc++.h>
using namespace std;
//#define OPENIOBUF

namespace FastIO
{

class FastIOBase
{
 protected:
#ifdef OPENIOBUF
	static const int BUFSIZE=1<<22;
	char buf[BUFSIZE+1];
	int buf_p=0;
#endif
	FILE *target;
 public:
#ifdef OPENIOBUF
	virtual void flush()=0;
#endif
	FastIOBase(FILE *f): target(f){}
	~FastIOBase()=default;
};

class FastOutput: public FastIOBase
{
#ifdef OPENIOBUF
 public:
	inline void flush()
		{ fwrite(buf,1,buf_p,target),buf_p=0; }
#endif
 protected:
	inline void __putc(char x)
	{
#ifdef OPENIOBUF
		if(buf[buf_p++]=x,buf_p==BUFSIZE)flush();
#else
		putc(x,target);
#endif
	}
	template<typename T>
	inline void __write(T x)
	{
		static char stk[64],*top;top=stk;
		if(x<0) return __putc('-'),__write(-x);
		do *(top++)=x%10,x/=10; while(x);
		for(;top!=stk;__putc(*(--top)+'0'));
	}
 public:
	FastOutput(FILE *f=stdout): FastIOBase(f){}
#ifdef OPENIOBUF
	inline void setTarget(FILE *f) { this->flush(),target=f; }
	~FastOutput(){ flush(); }
#else
	inline void setTarget(FILE *f) { target=f; }
#endif
	template<typename ...T>
	inline void writesp(const T &...x)
		{ initializer_list<int>{(this->operator<<(x),__putc(' '),0)...}; }
	template<typename ...T>
	inline void writeln(const T &...x)
		{ initializer_list<int>{(this->operator<<(x),__putc('\n'),0)...}; }
	inline FastOutput &operator <<(char x)
		{ return __putc(x),*this; }
	inline FastOutput &operator <<(const char *s)
		{ for(;*s;__putc(*(s++)));return *this; }
	inline FastOutput &operator <<(const string &s)
		{ return (*this)<<s.c_str(); }
	template<typename T,typename=typename enable_if<is_integral<T>::value>::type>
	inline FastOutput &operator <<(const T &x)
		{ return __write(x),*this; }
}qout;

class FastInput: public FastIOBase
{
#ifdef OPENIOBUF
 public:
	inline void flush()
		{ buf[fread(buf,1,BUFSIZE,target)]='\0',buf_p=0; }
#endif
 protected:
	inline char __getc()
	{
#ifdef OPENIOBUF
		if(buf_p==BUFSIZE) flush();
		return buf[buf_p++];
#else
		return getc(target);
#endif
	}
 public:
#ifdef OPENIOBUF
	FastInput(FILE *f=stdin): FastIOBase(f){ buf_p=BUFSIZE; }
	inline void setTarget(FILE *f) { this->flush(),target=f; }
#else
	FastInput(FILE *f=stdin): FastIOBase(f){}
	inline void setTarget(FILE *f) { target=f; }
#endif
	inline char getchar() { return __getc(); }
	template<typename ...T>
	inline void read(T &...x)
		{ initializer_list<int>{(this->operator>>(x),0)...}; }
	inline FastInput &operator >>(char &x)
		{ while(isspace(x=__getc()));return *this; }
	template<typename T,typename=typename enable_if<is_integral<T>::value>::type>
	inline FastInput &operator >>(T &x)
	{
		static char ch,sym;x=sym=0;
		while(isspace(ch=__getc()));
		if(ch=='-') sym=1,ch=__getc();
		for(;isdigit(ch);x=(x<<1)+(x<<3)+(ch^48),ch=__getc());
		return sym?x=-x:x,*this;
	}
	inline FastInput &operator >>(char *s)
	{
		while(isspace(*s=__getc()));
		for(;!isspace(*s) && *s && ~*s;*(++s)=__getc());
		return *s='\0',*this;
	}
	inline FastInput &operator >>(string &s)
	{
		char str_buf[(1<<8)+1],*p=str_buf;
		char *const buf_end=str_buf+(1<<8);
		while(isspace(*p=__getc()));
		for(s.clear(),p++;;p=str_buf)
		{
			for(;p!=buf_end && !isspace(*p=__getc()) && *p && ~*p;p++);
			*p='\0',s.append(str_buf);
			if(p!=buf_end) break;
		}
		return *this;
	}
}qin;

} // namespace FastIO
using namespace FastIO;

using LL=long long;
using LD=long double;
using UI=unsigned int;
using ULL=unsigned long long;

#ifndef DADALZY
#define FILEIO(file) freopen(file".in","r",stdin),freopen(file".out","w",stdout)
#else
#define FILEIO(file)
#endif

constexpr int sol1[][3][2]={ // 8 triangles
	{{0,0},{0,100},{45,20}},
	{{0,100},{45,20},{50,100}},
	{{45,20},{55,20},{50,100}},
	{{100,0},{100,100},{55,20}},
	{{100,0},{55,20},{50,0}},
	{{45,20},{55,20},{50,0}},
	{{0,0},{45,20},{50,0}},
	{{100,100},{55,20},{50,100}}
},
sol2[][3][2]={ // 9 triangles
	{{0,0},{0,100},{70,50}},
	{{0,100},{60,100},{49,65}},
	{{75,75},{60,100},{49,65}},
	{{75,75},{70,50},{49,65}},
	{{100,100},{75,75},{60,100}},
	{{100,100},{75,75},{100,60}},
	{{75,75},{70,50},{100,60}},
	{{0,0},{100,0},{70,50}},
	{{100,0},{70,50},{100,60}}
},
sol3[][3][2]={ // 10 triangles
	{{0,0},{0,100},{45,20}},
	{{0,100},{45,20},{50,100}},
	{{0,0},{45,20},{47,0}},
	{{45,20},{55,20},{50,100}},
	{{45,20},{50,20},{47,0}},
	{{50,20},{53,0},{47,0}},
	{{55,20},{50,20},{53,0}},
	{{100,100},{55,20},{50,100}},
	{{100,0},{55,20},{53,0}},
	{{100,0},{100,100},{55,20}}
},
SCALE=1e7;

int n;
deque<array<pair<int,int>,3>> q;
void add(int *a,int *b,int *c)
{
	array<pair<int,int>,3> now;
	now[0]=make_pair(a[0],a[1]);
	now[1]=make_pair(b[0],b[1]);
	now[2]=make_pair(c[0],c[1]);
	q.push_back(now);
}
int main()
{
	qin>>n;
	if(n<8) return qout<<"No",0;
	int a[2],b[2],c[2],na[2],nb[2],nc[2];
	if(n%3==0) for(auto &[A,B,C]: sol2)
	{
		a[0]=A[0]*SCALE,a[1]=A[1]*SCALE;
		b[0]=B[0]*SCALE,b[1]=B[1]*SCALE;
		c[0]=C[0]*SCALE,c[1]=C[1]*SCALE;
		add(a,b,c);
	}
	else if(n%3==1) for(auto &[A,B,C]: sol3)
	{
		a[0]=A[0]*SCALE,a[1]=A[1]*SCALE;
		b[0]=B[0]*SCALE,b[1]=B[1]*SCALE;
		c[0]=C[0]*SCALE,c[1]=C[1]*SCALE;
		add(a,b,c);
	}
	else for(auto &[A,B,C]: sol1)
	{
		a[0]=A[0]*SCALE,a[1]=A[1]*SCALE;
		b[0]=B[0]*SCALE,b[1]=B[1]*SCALE;
		c[0]=C[0]*SCALE,c[1]=C[1]*SCALE;
		add(a,b,c);
	}
	while(q.size()<n)
	{
		tie(a[0],a[1])=q.front()[0];
		tie(b[0],b[1])=q.front()[1];
		tie(c[0],c[1])=q.front()[2];
		q.pop_front();
		na[0]=(a[0]+b[0])/2,na[1]=(a[1]+b[1])/2;
		nb[0]=(b[0]+c[0])/2,nb[1]=(b[1]+c[1])/2;
		nc[0]=(c[0]+a[0])/2,nc[1]=(c[1]+a[1])/2;
		add(a,nc,na),a[0]=na[0],a[1]=na[1];
		add(b,na,nb),b[0]=nb[0],b[1]=nb[1];
		add(c,nb,nc),c[0]=nc[0],c[1]=nc[1];
		add(a,b,c);
	}
	qout<<"Yes\n";
	for(auto &[A,B,C]: q)
	{
		qout<<A.first<<' '<<A.second<<' ';
		qout<<B.first<<' '<<B.second<<' ';
		qout<<C.first<<' '<<C.second<<'\n';
	}
	return 0;
}

詳細信息

Test #1:

score: 100
Accepted
time: 2ms
memory: 3376kb

input:

2

output:

No

result:

ok no solution

Test #2:

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

input:

24

output:

Yes
1000000000 1000000000 750000000 750000000 1000000000 600000000
750000000 750000000 700000000 500000000 1000000000 600000000
0 0 1000000000 0 700000000 500000000
1000000000 0 700000000 500000000 1000000000 600000000
0 0 350000000 250000000 0 500000000
0 1000000000 0 500000000 350000000 750000000
...

result:

ok 24 acute triangles

Test #3:

score: 0
Accepted
time: 1ms
memory: 3372kb

input:

1

output:

No

result:

ok no solution

Test #4:

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

input:

3

output:

No

result:

ok no solution

Test #5:

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

input:

4

output:

No

result:

ok no solution

Test #6:

score: 0
Accepted
time: 1ms
memory: 3288kb

input:

5

output:

No

result:

ok no solution

Test #7:

score: 0
Accepted
time: 1ms
memory: 3392kb

input:

6

output:

No

result:

ok no solution

Test #8:

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

input:

7

output:

No

result:

ok no solution

Test #9:

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

input:

8

output:

Yes
0 0 0 1000000000 450000000 200000000
0 1000000000 450000000 200000000 500000000 1000000000
450000000 200000000 550000000 200000000 500000000 1000000000
1000000000 0 1000000000 1000000000 550000000 200000000
1000000000 0 550000000 200000000 500000000 0
450000000 200000000 550000000 200000000 5000...

result:

ok 8 acute triangles

Test #10:

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

input:

9

output:

Yes
0 0 0 1000000000 700000000 500000000
0 1000000000 600000000 1000000000 490000000 650000000
750000000 750000000 600000000 1000000000 490000000 650000000
750000000 750000000 700000000 500000000 490000000 650000000
1000000000 1000000000 750000000 750000000 600000000 1000000000
1000000000 1000000000...

result:

ok 9 acute triangles

Test #11:

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

input:

10

output:

Yes
0 0 0 1000000000 450000000 200000000
0 1000000000 450000000 200000000 500000000 1000000000
0 0 450000000 200000000 470000000 0
450000000 200000000 550000000 200000000 500000000 1000000000
450000000 200000000 500000000 200000000 470000000 0
500000000 200000000 530000000 0 470000000 0
550000000 20...

result:

ok 10 acute triangles

Test #12:

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

input:

11

output:

Yes
0 1000000000 450000000 200000000 500000000 1000000000
450000000 200000000 550000000 200000000 500000000 1000000000
1000000000 0 1000000000 1000000000 550000000 200000000
1000000000 0 550000000 200000000 500000000 0
450000000 200000000 550000000 200000000 500000000 0
0 0 450000000 200000000 50000...

result:

ok 11 acute triangles

Test #13:

score: 0
Accepted
time: 1ms
memory: 3448kb

input:

12

output:

Yes
0 1000000000 600000000 1000000000 490000000 650000000
750000000 750000000 600000000 1000000000 490000000 650000000
750000000 750000000 700000000 500000000 490000000 650000000
1000000000 1000000000 750000000 750000000 600000000 1000000000
1000000000 1000000000 750000000 750000000 1000000000 60000...

result:

ok 12 acute triangles

Test #14:

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

input:

13

output:

Yes
0 1000000000 450000000 200000000 500000000 1000000000
0 0 450000000 200000000 470000000 0
450000000 200000000 550000000 200000000 500000000 1000000000
450000000 200000000 500000000 200000000 470000000 0
500000000 200000000 530000000 0 470000000 0
550000000 200000000 500000000 200000000 530000000...

result:

ok 13 acute triangles

Test #15:

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

input:

14

output:

Yes
450000000 200000000 550000000 200000000 500000000 1000000000
1000000000 0 1000000000 1000000000 550000000 200000000
1000000000 0 550000000 200000000 500000000 0
450000000 200000000 550000000 200000000 500000000 0
0 0 450000000 200000000 500000000 0
1000000000 1000000000 550000000 200000000 50000...

result:

ok 14 acute triangles

Test #16:

score: 0
Accepted
time: 1ms
memory: 3320kb

input:

15

output:

Yes
750000000 750000000 600000000 1000000000 490000000 650000000
750000000 750000000 700000000 500000000 490000000 650000000
1000000000 1000000000 750000000 750000000 600000000 1000000000
1000000000 1000000000 750000000 750000000 1000000000 600000000
750000000 750000000 700000000 500000000 100000000...

result:

ok 15 acute triangles

Test #17:

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

input:

16

output:

Yes
0 0 450000000 200000000 470000000 0
450000000 200000000 550000000 200000000 500000000 1000000000
450000000 200000000 500000000 200000000 470000000 0
500000000 200000000 530000000 0 470000000 0
550000000 200000000 500000000 200000000 530000000 0
1000000000 1000000000 550000000 200000000 500000000...

result:

ok 16 acute triangles

Test #18:

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

input:

17

output:

Yes
1000000000 0 1000000000 1000000000 550000000 200000000
1000000000 0 550000000 200000000 500000000 0
450000000 200000000 550000000 200000000 500000000 0
0 0 450000000 200000000 500000000 0
1000000000 1000000000 550000000 200000000 500000000 1000000000
0 0 225000000 100000000 0 500000000
0 1000000...

result:

ok 17 acute triangles

Test #19:

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

input:

18

output:

Yes
750000000 750000000 700000000 500000000 490000000 650000000
1000000000 1000000000 750000000 750000000 600000000 1000000000
1000000000 1000000000 750000000 750000000 1000000000 600000000
750000000 750000000 700000000 500000000 1000000000 600000000
0 0 1000000000 0 700000000 500000000
1000000000 0...

result:

ok 18 acute triangles

Test #20:

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

input:

19

output:

Yes
450000000 200000000 550000000 200000000 500000000 1000000000
450000000 200000000 500000000 200000000 470000000 0
500000000 200000000 530000000 0 470000000 0
550000000 200000000 500000000 200000000 530000000 0
1000000000 1000000000 550000000 200000000 500000000 1000000000
1000000000 0 550000000 2...

result:

ok 19 acute triangles

Test #21:

score: 0
Accepted
time: 1ms
memory: 3384kb

input:

20

output:

Yes
1000000000 0 550000000 200000000 500000000 0
450000000 200000000 550000000 200000000 500000000 0
0 0 450000000 200000000 500000000 0
1000000000 1000000000 550000000 200000000 500000000 1000000000
0 0 225000000 100000000 0 500000000
0 1000000000 0 500000000 225000000 600000000
450000000 200000000...

result:

ok 20 acute triangles

Test #22:

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

input:

21

output:

Yes
1000000000 1000000000 750000000 750000000 600000000 1000000000
1000000000 1000000000 750000000 750000000 1000000000 600000000
750000000 750000000 700000000 500000000 1000000000 600000000
0 0 1000000000 0 700000000 500000000
1000000000 0 700000000 500000000 1000000000 600000000
0 0 350000000 2500...

result:

ok 21 acute triangles

Test #23:

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

input:

22

output:

Yes
450000000 200000000 500000000 200000000 470000000 0
500000000 200000000 530000000 0 470000000 0
550000000 200000000 500000000 200000000 530000000 0
1000000000 1000000000 550000000 200000000 500000000 1000000000
1000000000 0 550000000 200000000 530000000 0
1000000000 0 1000000000 1000000000 55000...

result:

ok 22 acute triangles

Test #24:

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

input:

23

output:

Yes
450000000 200000000 550000000 200000000 500000000 0
0 0 450000000 200000000 500000000 0
1000000000 1000000000 550000000 200000000 500000000 1000000000
0 0 225000000 100000000 0 500000000
0 1000000000 0 500000000 225000000 600000000
450000000 200000000 225000000 600000000 225000000 100000000
0 50...

result:

ok 23 acute triangles

Test #25:

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

input:

25

output:

Yes
500000000 200000000 530000000 0 470000000 0
550000000 200000000 500000000 200000000 530000000 0
1000000000 1000000000 550000000 200000000 500000000 1000000000
1000000000 0 550000000 200000000 530000000 0
1000000000 0 1000000000 1000000000 550000000 200000000
0 0 225000000 100000000 0 500000000
0...

result:

ok 25 acute triangles

Test #26:

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

input:

26

output:

Yes
0 0 450000000 200000000 500000000 0
1000000000 1000000000 550000000 200000000 500000000 1000000000
0 0 225000000 100000000 0 500000000
0 1000000000 0 500000000 225000000 600000000
450000000 200000000 225000000 600000000 225000000 100000000
0 500000000 225000000 600000000 225000000 100000000
0 10...

result:

ok 26 acute triangles

Test #27:

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

input:

27

output:

Yes
750000000 750000000 700000000 500000000 1000000000 600000000
0 0 1000000000 0 700000000 500000000
1000000000 0 700000000 500000000 1000000000 600000000
0 0 350000000 250000000 0 500000000
0 1000000000 0 500000000 350000000 750000000
700000000 500000000 350000000 750000000 350000000 250000000
0 5...

result:

ok 27 acute triangles

Test #28:

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

input:

28

output:

Yes
550000000 200000000 500000000 200000000 530000000 0
1000000000 1000000000 550000000 200000000 500000000 1000000000
1000000000 0 550000000 200000000 530000000 0
1000000000 0 1000000000 1000000000 550000000 200000000
0 0 225000000 100000000 0 500000000
0 1000000000 0 500000000 225000000 600000000
...

result:

ok 28 acute triangles

Test #29:

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

input:

29

output:

Yes
1000000000 1000000000 550000000 200000000 500000000 1000000000
0 0 225000000 100000000 0 500000000
0 1000000000 0 500000000 225000000 600000000
450000000 200000000 225000000 600000000 225000000 100000000
0 500000000 225000000 600000000 225000000 100000000
0 1000000000 250000000 1000000000 225000...

result:

ok 29 acute triangles

Test #30:

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

input:

30

output:

Yes
0 0 1000000000 0 700000000 500000000
1000000000 0 700000000 500000000 1000000000 600000000
0 0 350000000 250000000 0 500000000
0 1000000000 0 500000000 350000000 750000000
700000000 500000000 350000000 750000000 350000000 250000000
0 500000000 350000000 750000000 350000000 250000000
0 1000000000...

result:

ok 30 acute triangles

Test #31:

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

input:

31

output:

Yes
1000000000 1000000000 550000000 200000000 500000000 1000000000
1000000000 0 550000000 200000000 530000000 0
1000000000 0 1000000000 1000000000 550000000 200000000
0 0 225000000 100000000 0 500000000
0 1000000000 0 500000000 225000000 600000000
450000000 200000000 225000000 600000000 225000000 10...

result:

ok 31 acute triangles

Test #32:

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

input:

32

output:

Yes
0 0 225000000 100000000 0 500000000
0 1000000000 0 500000000 225000000 600000000
450000000 200000000 225000000 600000000 225000000 100000000
0 500000000 225000000 600000000 225000000 100000000
0 1000000000 250000000 1000000000 225000000 600000000
450000000 200000000 225000000 600000000 475000000...

result:

ok 32 acute triangles

Test #33:

score: 0
Accepted
time: 1ms
memory: 3292kb

input:

33

output:

Yes
1000000000 0 700000000 500000000 1000000000 600000000
0 0 350000000 250000000 0 500000000
0 1000000000 0 500000000 350000000 750000000
700000000 500000000 350000000 750000000 350000000 250000000
0 500000000 350000000 750000000 350000000 250000000
0 1000000000 245000000 825000000 300000000 100000...

result:

ok 33 acute triangles

Test #34:

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

input:

34

output:

Yes
1000000000 0 550000000 200000000 530000000 0
1000000000 0 1000000000 1000000000 550000000 200000000
0 0 225000000 100000000 0 500000000
0 1000000000 0 500000000 225000000 600000000
450000000 200000000 225000000 600000000 225000000 100000000
0 500000000 225000000 600000000 225000000 100000000
0 1...

result:

ok 34 acute triangles

Test #35:

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

input:

35

output:

Yes
0 1000000000 0 500000000 225000000 600000000
450000000 200000000 225000000 600000000 225000000 100000000
0 500000000 225000000 600000000 225000000 100000000
0 1000000000 250000000 1000000000 225000000 600000000
450000000 200000000 225000000 600000000 475000000 600000000
500000000 1000000000 4750...

result:

ok 35 acute triangles

Test #36:

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

input:

36

output:

Yes
0 0 350000000 250000000 0 500000000
0 1000000000 0 500000000 350000000 750000000
700000000 500000000 350000000 750000000 350000000 250000000
0 500000000 350000000 750000000 350000000 250000000
0 1000000000 245000000 825000000 300000000 1000000000
600000000 1000000000 300000000 1000000000 5450000...

result:

ok 36 acute triangles

Test #37:

score: 0
Accepted
time: 1ms
memory: 3292kb

input:

37

output:

Yes
1000000000 0 1000000000 1000000000 550000000 200000000
0 0 225000000 100000000 0 500000000
0 1000000000 0 500000000 225000000 600000000
450000000 200000000 225000000 600000000 225000000 100000000
0 500000000 225000000 600000000 225000000 100000000
0 1000000000 250000000 1000000000 225000000 6000...

result:

ok 37 acute triangles

Test #38:

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

input:

38

output:

Yes
450000000 200000000 225000000 600000000 225000000 100000000
0 500000000 225000000 600000000 225000000 100000000
0 1000000000 250000000 1000000000 225000000 600000000
450000000 200000000 225000000 600000000 475000000 600000000
500000000 1000000000 475000000 600000000 250000000 1000000000
22500000...

result:

ok 38 acute triangles

Test #39:

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

input:

39

output:

Yes
0 1000000000 0 500000000 350000000 750000000
700000000 500000000 350000000 750000000 350000000 250000000
0 500000000 350000000 750000000 350000000 250000000
0 1000000000 245000000 825000000 300000000 1000000000
600000000 1000000000 300000000 1000000000 545000000 825000000
490000000 650000000 545...

result:

ok 39 acute triangles

Test #40:

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

input:

40

output:

Yes
0 0 225000000 100000000 0 500000000
0 1000000000 0 500000000 225000000 600000000
450000000 200000000 225000000 600000000 225000000 100000000
0 500000000 225000000 600000000 225000000 100000000
0 1000000000 250000000 1000000000 225000000 600000000
450000000 200000000 225000000 600000000 475000000...

result:

ok 40 acute triangles

Test #41:

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

input:

41

output:

Yes
0 500000000 225000000 600000000 225000000 100000000
0 1000000000 250000000 1000000000 225000000 600000000
450000000 200000000 225000000 600000000 475000000 600000000
500000000 1000000000 475000000 600000000 250000000 1000000000
225000000 600000000 475000000 600000000 250000000 1000000000
4500000...

result:

ok 41 acute triangles

Test #42:

score: 0
Accepted
time: 1ms
memory: 3316kb

input:

42

output:

Yes
700000000 500000000 350000000 750000000 350000000 250000000
0 500000000 350000000 750000000 350000000 250000000
0 1000000000 245000000 825000000 300000000 1000000000
600000000 1000000000 300000000 1000000000 545000000 825000000
490000000 650000000 545000000 825000000 245000000 825000000
30000000...

result:

ok 42 acute triangles

Test #43:

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

input:

43

output:

Yes
0 1000000000 0 500000000 225000000 600000000
450000000 200000000 225000000 600000000 225000000 100000000
0 500000000 225000000 600000000 225000000 100000000
0 1000000000 250000000 1000000000 225000000 600000000
450000000 200000000 225000000 600000000 475000000 600000000
500000000 1000000000 4750...

result:

ok 43 acute triangles

Test #44:

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

input:

44

output:

Yes
0 1000000000 250000000 1000000000 225000000 600000000
450000000 200000000 225000000 600000000 475000000 600000000
500000000 1000000000 475000000 600000000 250000000 1000000000
225000000 600000000 475000000 600000000 250000000 1000000000
450000000 200000000 475000000 600000000 500000000 200000000...

result:

ok 44 acute triangles

Test #45:

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

input:

45

output:

Yes
0 500000000 350000000 750000000 350000000 250000000
0 1000000000 245000000 825000000 300000000 1000000000
600000000 1000000000 300000000 1000000000 545000000 825000000
490000000 650000000 545000000 825000000 245000000 825000000
300000000 1000000000 545000000 825000000 245000000 825000000
7500000...

result:

ok 45 acute triangles

Test #46:

score: 0
Accepted
time: 3ms
memory: 3440kb

input:

46

output:

Yes
450000000 200000000 225000000 600000000 225000000 100000000
0 500000000 225000000 600000000 225000000 100000000
0 1000000000 250000000 1000000000 225000000 600000000
450000000 200000000 225000000 600000000 475000000 600000000
500000000 1000000000 475000000 600000000 250000000 1000000000
22500000...

result:

ok 46 acute triangles

Test #47:

score: 0
Accepted
time: 1ms
memory: 3304kb

input:

47

output:

Yes
450000000 200000000 225000000 600000000 475000000 600000000
500000000 1000000000 475000000 600000000 250000000 1000000000
225000000 600000000 475000000 600000000 250000000 1000000000
450000000 200000000 475000000 600000000 500000000 200000000
550000000 200000000 500000000 200000000 525000000 600...

result:

ok 47 acute triangles

Test #48:

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

input:

48

output:

Yes
0 1000000000 245000000 825000000 300000000 1000000000
600000000 1000000000 300000000 1000000000 545000000 825000000
490000000 650000000 545000000 825000000 245000000 825000000
300000000 1000000000 545000000 825000000 245000000 825000000
750000000 750000000 620000000 700000000 675000000 875000000...

result:

ok 48 acute triangles

Test #49:

score: 0
Accepted
time: 1ms
memory: 3300kb

input:

49

output:

Yes
0 500000000 225000000 600000000 225000000 100000000
0 1000000000 250000000 1000000000 225000000 600000000
450000000 200000000 225000000 600000000 475000000 600000000
500000000 1000000000 475000000 600000000 250000000 1000000000
225000000 600000000 475000000 600000000 250000000 1000000000
0 0 235...

result:

ok 49 acute triangles

Test #50:

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

input:

50

output:

Yes
500000000 1000000000 475000000 600000000 250000000 1000000000
225000000 600000000 475000000 600000000 250000000 1000000000
450000000 200000000 475000000 600000000 500000000 200000000
550000000 200000000 500000000 200000000 525000000 600000000
500000000 1000000000 525000000 600000000 475000000 60...

result:

ok 50 acute triangles