QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#115262#6652. 着色ToxicAC ✓19ms1864kbC++14409b2023-06-25 13:37:402023-06-25 13:37:41

Judging History

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

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2023-06-25 13:37:41]
  • 评测
  • 测评结果:AC
  • 用时:19ms
  • 内存:1864kb
  • [2023-06-25 13:37:40]
  • 提交

answer

#include<cstdio>
using namespace std;
int n;
int read()
{
	int res,f=1;
	char ch;
	while((ch=getchar())<'0'||ch>'9')
	if(ch=='-')
	f=-1;
	res=ch^48;
	while((ch=getchar())>='0'&&ch<='9')
	res=(res<<1)+(res<<3)+(ch^48);
	return res*f;
}
int main()
{
	int i,j;
	n=read();
	for(i=0;i<=n-1;i++)
	{
		for(j=i+1;j<=n-1;j++)
		printf("%d",__builtin_ctz(i^j));
		printf("\n");
	}
	return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 0ms
memory: 1480kb

input:

2

output:

0


result:

ok Accepted.

Test #2:

score: 0
Accepted
time: 19ms
memory: 1484kb

input:

1000

output:

010201030102010401020103010201050102010301020104010201030102010601020103010201040102010301020105010201030102010401020103010201070102010301020104010201030102010501020103010201040102010301020106010201030102010401020103010201050102010301020104010201030102010801020103010201040102010301020105010201030102...

result:

ok Accepted.

Test #3:

score: 0
Accepted
time: 13ms
memory: 1500kb

input:

988

output:

010201030102010401020103010201050102010301020104010201030102010601020103010201040102010301020105010201030102010401020103010201070102010301020104010201030102010501020103010201040102010301020106010201030102010401020103010201050102010301020104010201030102010801020103010201040102010301020105010201030102...

result:

ok Accepted.

Test #4:

score: 0
Accepted
time: 0ms
memory: 1492kb

input:

104

output:

0102010301020104010201030102010501020103010201040102010301020106010201030102010401020103010201050102010
010201030102010401020103010201050102010301020104010201030102010601020103010201040102010301020105010201
010201030102010401020103010201050102010301020104010201030102010601020103010201040102010301020...

result:

ok Accepted.

Test #5:

score: 0
Accepted
time: 0ms
memory: 1864kb

input:

7

output:

010201
01020
0102
010
01
0


result:

ok Accepted.

Test #6:

score: 0
Accepted
time: 0ms
memory: 1716kb

input:

59

output:

0102010301020104010201030102010501020103010201040102010301
010201030102010401020103010201050102010301020104010201030
01020103010201040102010301020105010201030102010401020103
0102010301020104010201030102010501020103010201040102010
010201030102010401020103010201050102010301020104010201
010201030102010...

result:

ok Accepted.