QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#133301#3269. 末日魔法少女计划zhouhuanyi0 2ms3924kbC++23925b2023-08-01 22:30:122023-08-01 22:30:13

Judging History

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

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2023-08-01 22:30:13]
  • 评测
  • 测评结果:0
  • 用时:2ms
  • 内存:3924kb
  • [2023-08-01 22:30:12]
  • 提交

answer

#include<iostream>
#include<cstdio>
#include<vector>
#include<cmath>
#define N 100000
using namespace std;
int read()
{
	char c=0;
	int sum=0;
	while (c<'0'||c>'9') c=getchar();
	while ('0'<=c&&c<='9') sum=sum*10+c-'0',c=getchar();
	return sum;
}
struct reads
{
	int x,y;
};
reads tong[N+1];
int n,k,length,st[N+1],leng;
void adder(int x,int y)
{
	tong[++length]=(reads){x,y};
	return;
}
int main()
{
	int d;
	n=read(),k=read(),d=sqrt(n);
	for (int i=1;i<=n;++i)
		if (i%d==0)
			st[++leng]=i;
	for (int i=1;i<=leng;++i)
		for (int j=i+1;j<=leng;++j)
			adder(st[i],st[j]);
	for (int i=1;i<=st[1]-2;++i) adder(i,st[1]);
	for (int i=1;i<=leng-1;++i)
		for (int j=st[i]+2;j<=st[i+1]-2;++j)
			adder(st[i],j),adder(j,st[i+1]);
	for (int i=st[leng]+2;i<=n;++i) adder(st[leng],i);
	printf("%d\n",length);
	for (int i=1;i<=length;++i) printf("%d %d\n",tong[i].x,tong[i].y);
	return 0;
}

详细

Subtask #1:

score: 0
Wrong Answer

Test #1:

score: 0
Wrong Answer
time: 2ms
memory: 3644kb

input:

2000 2

output:

4659
44 88
44 132
44 176
44 220
44 264
44 308
44 352
44 396
44 440
44 484
44 528
44 572
44 616
44 660
44 704
44 748
44 792
44 836
44 880
44 924
44 968
44 1012
44 1056
44 1100
44 1144
44 1188
44 1232
44 1276
44 1320
44 1364
44 1408
44 1452
44 1496
44 1540
44 1584
44 1628
44 1672
44 1716
44 1760
44 18...

result:

wrong answer Not correct

Subtask #2:

score: 0
Wrong Answer

Test #6:

score: 0
Wrong Answer
time: 0ms
memory: 3600kb

input:

1936 3

output:

4514
44 88
44 132
44 176
44 220
44 264
44 308
44 352
44 396
44 440
44 484
44 528
44 572
44 616
44 660
44 704
44 748
44 792
44 836
44 880
44 924
44 968
44 1012
44 1056
44 1100
44 1144
44 1188
44 1232
44 1276
44 1320
44 1364
44 1408
44 1452
44 1496
44 1540
44 1584
44 1628
44 1672
44 1716
44 1760
44 18...

result:

wrong answer Not correct

Subtask #3:

score: 0
Wrong Answer

Test #11:

score: 0
Wrong Answer
time: 2ms
memory: 3924kb

input:

2000 4

output:

4659
44 88
44 132
44 176
44 220
44 264
44 308
44 352
44 396
44 440
44 484
44 528
44 572
44 616
44 660
44 704
44 748
44 792
44 836
44 880
44 924
44 968
44 1012
44 1056
44 1100
44 1144
44 1188
44 1232
44 1276
44 1320
44 1364
44 1408
44 1452
44 1496
44 1540
44 1584
44 1628
44 1672
44 1716
44 1760
44 18...

result:

wrong answer Not correct

Subtask #4:

score: 0
Wrong Answer

Test #16:

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

input:

2000 5

output:

4659
44 88
44 132
44 176
44 220
44 264
44 308
44 352
44 396
44 440
44 484
44 528
44 572
44 616
44 660
44 704
44 748
44 792
44 836
44 880
44 924
44 968
44 1012
44 1056
44 1100
44 1144
44 1188
44 1232
44 1276
44 1320
44 1364
44 1408
44 1452
44 1496
44 1540
44 1584
44 1628
44 1672
44 1716
44 1760
44 18...

result:

wrong answer Not correct

Subtask #5:

score: 0
Wrong Answer

Test #21:

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

input:

2000 6

output:

4659
44 88
44 132
44 176
44 220
44 264
44 308
44 352
44 396
44 440
44 484
44 528
44 572
44 616
44 660
44 704
44 748
44 792
44 836
44 880
44 924
44 968
44 1012
44 1056
44 1100
44 1144
44 1188
44 1232
44 1276
44 1320
44 1364
44 1408
44 1452
44 1496
44 1540
44 1584
44 1628
44 1672
44 1716
44 1760
44 18...

result:

wrong answer Not correct

Subtask #6:

score: 0
Wrong Answer

Test #26:

score: 0
Wrong Answer
time: 0ms
memory: 3684kb

input:

1999 7

output:

4658
44 88
44 132
44 176
44 220
44 264
44 308
44 352
44 396
44 440
44 484
44 528
44 572
44 616
44 660
44 704
44 748
44 792
44 836
44 880
44 924
44 968
44 1012
44 1056
44 1100
44 1144
44 1188
44 1232
44 1276
44 1320
44 1364
44 1408
44 1452
44 1496
44 1540
44 1584
44 1628
44 1672
44 1716
44 1760
44 18...

result:

wrong answer Not correct

Subtask #7:

score: 0
Wrong Answer

Test #31:

score: 0
Wrong Answer
time: 2ms
memory: 3812kb

input:

1995 8

output:

4654
44 88
44 132
44 176
44 220
44 264
44 308
44 352
44 396
44 440
44 484
44 528
44 572
44 616
44 660
44 704
44 748
44 792
44 836
44 880
44 924
44 968
44 1012
44 1056
44 1100
44 1144
44 1188
44 1232
44 1276
44 1320
44 1364
44 1408
44 1452
44 1496
44 1540
44 1584
44 1628
44 1672
44 1716
44 1760
44 18...

result:

wrong answer Not correct

Subtask #8:

score: 0
Wrong Answer

Test #36:

score: 0
Wrong Answer
time: 2ms
memory: 3704kb

input:

1997 9

output:

4656
44 88
44 132
44 176
44 220
44 264
44 308
44 352
44 396
44 440
44 484
44 528
44 572
44 616
44 660
44 704
44 748
44 792
44 836
44 880
44 924
44 968
44 1012
44 1056
44 1100
44 1144
44 1188
44 1232
44 1276
44 1320
44 1364
44 1408
44 1452
44 1496
44 1540
44 1584
44 1628
44 1672
44 1716
44 1760
44 18...

result:

wrong answer Not correct

Subtask #9:

score: 0
Wrong Answer

Test #41:

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

input:

1995 10

output:

4654
44 88
44 132
44 176
44 220
44 264
44 308
44 352
44 396
44 440
44 484
44 528
44 572
44 616
44 660
44 704
44 748
44 792
44 836
44 880
44 924
44 968
44 1012
44 1056
44 1100
44 1144
44 1188
44 1232
44 1276
44 1320
44 1364
44 1408
44 1452
44 1496
44 1540
44 1584
44 1628
44 1672
44 1716
44 1760
44 18...

result:

wrong answer Not correct

Subtask #10:

score: 0
Wrong Answer

Test #46:

score: 0
Wrong Answer
time: 2ms
memory: 3868kb

input:

1993 11

output:

4652
44 88
44 132
44 176
44 220
44 264
44 308
44 352
44 396
44 440
44 484
44 528
44 572
44 616
44 660
44 704
44 748
44 792
44 836
44 880
44 924
44 968
44 1012
44 1056
44 1100
44 1144
44 1188
44 1232
44 1276
44 1320
44 1364
44 1408
44 1452
44 1496
44 1540
44 1584
44 1628
44 1672
44 1716
44 1760
44 18...

result:

wrong answer Not correct

Subtask #11:

score: 0
Wrong Answer

Test #51:

score: 0
Wrong Answer
time: 2ms
memory: 3696kb

input:

1999 12

output:

4658
44 88
44 132
44 176
44 220
44 264
44 308
44 352
44 396
44 440
44 484
44 528
44 572
44 616
44 660
44 704
44 748
44 792
44 836
44 880
44 924
44 968
44 1012
44 1056
44 1100
44 1144
44 1188
44 1232
44 1276
44 1320
44 1364
44 1408
44 1452
44 1496
44 1540
44 1584
44 1628
44 1672
44 1716
44 1760
44 18...

result:

wrong answer Not correct

Subtask #12:

score: 0
Wrong Answer

Test #56:

score: 0
Wrong Answer
time: 0ms
memory: 3688kb

input:

1981 13

output:

4640
44 88
44 132
44 176
44 220
44 264
44 308
44 352
44 396
44 440
44 484
44 528
44 572
44 616
44 660
44 704
44 748
44 792
44 836
44 880
44 924
44 968
44 1012
44 1056
44 1100
44 1144
44 1188
44 1232
44 1276
44 1320
44 1364
44 1408
44 1452
44 1496
44 1540
44 1584
44 1628
44 1672
44 1716
44 1760
44 18...

result:

wrong answer Not correct

Subtask #13:

score: 0
Wrong Answer

Test #61:

score: 0
Wrong Answer
time: 2ms
memory: 3704kb

input:

1979 14

output:

4556
44 88
44 132
44 176
44 220
44 264
44 308
44 352
44 396
44 440
44 484
44 528
44 572
44 616
44 660
44 704
44 748
44 792
44 836
44 880
44 924
44 968
44 1012
44 1056
44 1100
44 1144
44 1188
44 1232
44 1276
44 1320
44 1364
44 1408
44 1452
44 1496
44 1540
44 1584
44 1628
44 1672
44 1716
44 1760
44 18...

result:

wrong answer Not correct

Subtask #14:

score: 0
Wrong Answer

Test #66:

score: 0
Wrong Answer
time: 2ms
memory: 3612kb

input:

2000 15

output:

4659
44 88
44 132
44 176
44 220
44 264
44 308
44 352
44 396
44 440
44 484
44 528
44 572
44 616
44 660
44 704
44 748
44 792
44 836
44 880
44 924
44 968
44 1012
44 1056
44 1100
44 1144
44 1188
44 1232
44 1276
44 1320
44 1364
44 1408
44 1452
44 1496
44 1540
44 1584
44 1628
44 1672
44 1716
44 1760
44 18...

result:

wrong answer Not correct