QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#251215 | #6652. 着色 | hongrock | AC ✓ | 1ms | 3504kb | C++17 | 317b | 2023-11-14 14:00:23 | 2023-11-14 14:00:23 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
const int N = 1e3 + 10;
char s[N];
int main(){
int n;
scanf("%d", &n);
for(int i=0; i<n-1; ++i){
int len = 0;
for(int j=i+1; j<n; ++j){
s[len++] = '0' + __builtin_ctz(i ^ j);
}
s[len] = '\0';
puts(s);
}
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 0ms
memory: 3368kb
input:
2
output:
0
result:
ok Accepted.
Test #2:
score: 0
Accepted
time: 1ms
memory: 3428kb
input:
1000
output:
010201030102010401020103010201050102010301020104010201030102010601020103010201040102010301020105010201030102010401020103010201070102010301020104010201030102010501020103010201040102010301020106010201030102010401020103010201050102010301020104010201030102010801020103010201040102010301020105010201030102...
result:
ok Accepted.
Test #3:
score: 0
Accepted
time: 1ms
memory: 3464kb
input:
988
output:
010201030102010401020103010201050102010301020104010201030102010601020103010201040102010301020105010201030102010401020103010201070102010301020104010201030102010501020103010201040102010301020106010201030102010401020103010201050102010301020104010201030102010801020103010201040102010301020105010201030102...
result:
ok Accepted.
Test #4:
score: 0
Accepted
time: 0ms
memory: 3440kb
input:
104
output:
0102010301020104010201030102010501020103010201040102010301020106010201030102010401020103010201050102010 010201030102010401020103010201050102010301020104010201030102010601020103010201040102010301020105010201 010201030102010401020103010201050102010301020104010201030102010601020103010201040102010301020...
result:
ok Accepted.
Test #5:
score: 0
Accepted
time: 1ms
memory: 3464kb
input:
7
output:
010201 01020 0102 010 01 0
result:
ok Accepted.
Test #6:
score: 0
Accepted
time: 1ms
memory: 3504kb
input:
59
output:
0102010301020104010201030102010501020103010201040102010301 010201030102010401020103010201050102010301020104010201030 01020103010201040102010301020105010201030102010401020103 0102010301020104010201030102010501020103010201040102010 010201030102010401020103010201050102010301020104010201 010201030102010...
result:
ok Accepted.