QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#394020 | #7756. Omniscia Spares None | Xun_xiaoyao | WA | 0ms | 3856kb | C++14 | 2.0kb | 2024-04-19 20:56:31 | 2024-04-19 20:56:31 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
int n;
int main()
{
cin>>n;
if(n<=4)
{
printf("Yes\n");
for(int i=1;i<=n;i++)
printf("%d 0",i);
printf("0\n");
return 0;
}
if(n==6||n%2==1) return printf("No\n"),0;
if(n%4==0)
{
for(int i=1;i<=n;i+=4)
{
if(i+4>n)
{
printf("0 %d\n",i);
printf("0 -%d\n",i);
printf("1000000000 1000\n");
printf("-1000000000 1000\n");
}
else
{
printf("0 %d\n",i);
printf("0 -%d\n",i);
printf("%d 0\n",i);
printf("-%d 0\n",i);
}
}
printf("%d\n",3*n-6);
printf("1 2\n");
printf("%d %d\n",n-1,n);
for(int i=5;i<=n;i++) printf("%d %d\n",i,i-4);
for(int i=1;i<=n;i+=4)
{
printf("%d %d\n", i ,i+2);
printf("%d %d\n", i ,i+3);
printf("%d %d\n",i+1,i+2);
printf("%d %d\n",i+1,i+3);
if(i!=1)
{
printf("%d %d\n",i-3,i+2);
printf("%d %d\n",i-3,i+3);
printf("%d %d\n",i-4,i+2);
printf("%d %d\n",i-4,i+3);
}
}
}
else
{
n-=2;
for(int i=1;i<=n;i+=4)
{
if(i+4>n)
{
printf("1000 1000000000\n");
printf("1000 -1000000000\n");
printf("%d 0\n",i);
printf("-%d 0\n",i);
}
else
{
printf("0 %d\n",i);
printf("0 -%d\n",i);
printf("%d 0\n",i);
printf("-%d 0\n",i);
}
}
printf("%d 0\n",n+1);
printf("-%d 0\n",n+1);
printf("%d\n",3*n);
printf("1 2\n");
printf("%d %d\n",n-3,n-2);
for(int i=5;i<=n;i++) printf("%d %d\n",i,i-4);
for(int i=1;i<=n;i+=4)
{
printf("%d %d\n", i ,i+2);
printf("%d %d\n", i ,i+3);
printf("%d %d\n",i+1,i+2);
printf("%d %d\n",i+1,i+3);
if(i!=1)
{
printf("%d %d\n",i-3,i+2);
printf("%d %d\n",i-3,i+3);
printf("%d %d\n",i-4,i+2);
printf("%d %d\n",i-4,i+3);
}
}
printf("%d %d\n",n-3,n+1);
printf("%d %d\n",n-3,n+2);
printf("%d %d\n",n-2,n+1);
printf("%d %d\n",n-2,n+2);
printf("%d %d\n",n-1,n+1);
printf("%d %d\n", n ,n+2);
}
return 0;
}
详细
Test #1:
score: 0
Wrong Answer
time: 0ms
memory: 3856kb
input:
3
output:
Yes 1 02 03 00
result:
wrong output format Expected integer, but "02" found