QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#100546 | #5419. Triangles | lgvc# | WA | 2ms | 3604kb | C++23 | 1.9kb | 2023-04-26 17:56:48 | 2023-04-26 17:56:52 |
Judging History
answer
//这回只花了114514min就打完了。
//真好。记得多手造几组。
#include <bits/stdc++.h>
//#define int long long
#define pai 3.141592653589793238462643383279502884197169399375105820
#define MOD 1000000007
#define eps 0.00000001
inline int min(int a,int b) {return a<b?a:b;}
inline int max(int a,int b) {return a>b?a:b;}
#define ULL unsigned long long
#define LL long long
#define INF 0x3f3f3f3f
#define INF_LL 0x3f3f3f3f3f3f3f3f
static char buf[1000000],*paa=buf,*pd=buf;
static char buf2[1000000],*pp=buf2;
#define getchar() paa==pd&&(pd=(paa=buf)+fread(buf,1,1000000,stdin),paa==pd)?EOF:*paa++
inline void pc(char ch){
if(pp-buf2==1000000) fwrite(buf2,1,1000000,stdout),pp=buf2;
*pp++=ch;
}
inline void pcc(){
fwrite(buf2,1,pp-buf2,stdout);
pp=buf2;
}
inline int read(void) {
int w=1;
register int x(0);register char c(getchar());
while(c<'0'||c>'9') {if(c=='-') w=-1;c=getchar();}
while(c>='0'&&c<='9') x=(x<<1)+(x<<3)+(c^48),c=getchar();
return w*x;
}
void write(int x) {
if(x<0) pc('-'),x=-x;
static int sta[20];
int top=0;
do {
sta[top++]=x%10,x/=10;
} while(x);
while(top) pc(sta[--top]+48);
}
void we(int x) {
write(x);
pc('\n');
}
inline bool cmp_xi(int a,int b) {return a<b;}
inline bool cmp_da(int a,int b) {return a>b;}
int N;
signed main(void) {
//freopen("m.in","r",stdin);
//freopen("m.out","w",stdout);
scanf("%d",&N);
if(N<=3) {
printf("No");
return 0;
}
// printf("0 0 0 1000000000 1000000000 0\n");
// printf("1000000000 1000000000 0 1000000000 1000000000 0\n");
printf("Yes\n");
printf("0 0 0 1000000000 1 999999999\n");
printf("0 0 1000000000 0 1 999999999\n");
for(int i=1;i<N-2;i++) {
printf("1000000000 1000000000 %d %d %d %d\n",i-1,1000000000-i+1,i,1000000000-i);
}
printf("1000000000 1000000000 %d %d 1000000000 0\n",N-3,1000000000-(N-3));
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 2ms
memory: 3604kb
input:
2
output:
No
result:
ok no solution
Test #2:
score: -100
Wrong Answer
time: 2ms
memory: 3484kb
input:
24
output:
Yes 0 0 0 1000000000 1 999999999 0 0 1000000000 0 1 999999999 1000000000 1000000000 0 1000000000 1 999999999 1000000000 1000000000 1 999999999 2 999999998 1000000000 1000000000 2 999999998 3 999999997 1000000000 1000000000 3 999999997 4 999999996 1000000000 1000000000 4 999999996 5 999999995 1000000...
result:
wrong answer triangle 1 not acute