QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#220757#7178. Bishops123456qweWA 1ms3424kbC++14442b2023-10-20 19:46:292023-10-20 19:46:29

Judging History

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

  • [2023-10-20 19:46:29]
  • 评测
  • 测评结果:WA
  • 用时:1ms
  • 内存:3424kb
  • [2023-10-20 19:46:29]
  • 提交

answer

#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
#define fi first
#define se second
const int N=1e6+10;
void solved()
{
	ll n;cin>>n;
	if (n==1)
	{
		cout<<1<<"\n";cout<<1<<" "<<1<<"\n";
	}
	cout<<n+n-2<<"\n";
	for (int i=1;i<=n;i++) cout<<1<<" "<<i<<"\n";
	for (int j=2;j<=n-1;j++) cout<<n<<" "<<j<<"\n";
}
int main()
{
    ll t;cin>>t;
    while(t--) 
	solved();
    return 0;
}

詳細信息

Test #1:

score: 0
Wrong Answer
time: 1ms
memory: 3424kb

input:

2 5

output:

8
1 1
1 2
1 3
1 4
1 5
5 2
5 3
5 4
8
1 1
1 2
1 3
1 4
1 5
5 2
5 3
5 4

result:

wrong answer Integer parameter [name=q] equals to 8, violates the range [0, 7]