QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#464774 | #8041. Life is Hard and Undecidable, but... | lonlyness | WA | 2ms | 3564kb | C++23 | 841b | 2024-07-06 14:48:11 | 2024-07-06 14:48:12 |
Judging History
answer
#include<iostream>
#include<algorithm>
#include<cstring>
#include<queue>
#include<vector>
#include<set>
#include<map>
#include<cmath>
using namespace std;
#define int long long
#define endl "\n"
const int N = 9e5+10;
int n,m,k;
typedef pair<int,int> PII;
vector<int>g[N];
void solve()
{
cin>>n;
n--;
cout<<n*2<<endl;;
int x= 1,y = 1;
for(int i = 0;i < n;i ++)
{
if(i%2==0){
cout<<x<<' '<<y<<endl;
cout<<x+1<<' '<<y<<endl;
x+=2,y++;
}
else {
cout<<x<<' '<<y<<endl;
cout<<x<<' '<<y+1<<endl;
x++,y+=2;
}
}
}
signed main()
{
ios_base::sync_with_stdio(0); cin.tie(0);cout.tie(0);
int t=1;
// cin>>t;
while(t--)
{
solve();
}
return 0;
}
詳細信息
Test #1:
score: 0
Wrong Answer
time: 2ms
memory: 3564kb
input:
1
output:
0
result:
wrong answer no alive vertices