QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#115262 | #6652. 着色 | Toxic | AC ✓ | 19ms | 1864kb | C++14 | 409b | 2023-06-25 13:37:40 | 2023-06-25 13:37:41 |
Judging History
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.