QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#283069#6652. 着色one_god_and_two_dogs#AC ✓20ms3964kbC++14274b2023-12-13 19:14:282023-12-13 19:14:29

Judging History

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

  • [2023-12-13 19:14:29]
  • 评测
  • 测评结果:AC
  • 用时:20ms
  • 内存:3964kb
  • [2023-12-13 19:14:28]
  • 提交

answer

#include<bits/stdc++.h>
using namespace std;
int bit(int x){
	int ans=0;
	while((x&1)==0){
		ans++;
		x>>=1;
	}
	return ans;
}
int main() {
	int n;cin>>n;
	for(int i=1;i<=n;i++){
		for(int j=i+1;j<=n;j++)printf("%d",bit(i^j));
		puts("");
	}
    return 0;
}

詳細信息

Test #1:

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

input:

2

output:

0


result:

ok Accepted.

Test #2:

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

input:

1000

output:

010201030102010401020103010201050102010301020104010201030102010601020103010201040102010301020105010201030102010401020103010201070102010301020104010201030102010501020103010201040102010301020106010201030102010401020103010201050102010301020104010201030102010801020103010201040102010301020105010201030102...

result:

ok Accepted.

Test #3:

score: 0
Accepted
time: 20ms
memory: 3820kb

input:

988

output:

010201030102010401020103010201050102010301020104010201030102010601020103010201040102010301020105010201030102010401020103010201070102010301020104010201030102010501020103010201040102010301020106010201030102010401020103010201050102010301020104010201030102010801020103010201040102010301020105010201030102...

result:

ok Accepted.

Test #4:

score: 0
Accepted
time: 1ms
memory: 3964kb

input:

104

output:

0102010301020104010201030102010501020103010201040102010301020106010201030102010401020103010201050102010
010201030102010401020103010201050102010301020104010201030102010601020103010201040102010301020105010201
010201030102010401020103010201050102010301020104010201030102010601020103010201040102010301020...

result:

ok Accepted.

Test #5:

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

input:

7

output:

010201
01020
0102
010
01
0


result:

ok Accepted.

Test #6:

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

input:

59

output:

0102010301020104010201030102010501020103010201040102010301
010201030102010401020103010201050102010301020104010201030
01020103010201040102010301020105010201030102010401020103
0102010301020104010201030102010501020103010201040102010
010201030102010401020103010201050102010301020104010201
010201030102010...

result:

ok Accepted.