QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#145327 | #6652. 着色 | qzez# | AC ✓ | 18ms | 3732kb | C++14 | 860b | 2023-08-22 07:20:46 | 2023-08-22 07:20:47 |
Judging History
answer
#include<bits/stdc++.h>
#define Gc() getchar()
#define Me(x,y) memset(x,y,sizeof(x))
#define Mc(x,y) memcpy(x,y,sizeof(x))
#define d(x,y) ((m)*(x-1)+(y))
#define R(n) (rnd()%(n)+1)
#define Pc(x) putchar(x)
#define LB lower_bound
#define UB upper_bound
#define fi first
#define se second
using namespace std;using ll=long long;using db=double;using lb=long db;using ui=unsigned;using ull=unsigned long long;using pii=pair<int,int>;using LL=__int128;
const int N=1e5+5,M=N*4+5,K=31650,mod=998244353,Mod=mod-1;const db eps=1e-9;const int INF=1e9+7;mt19937 rnd(time(0));
int n,p,k;
void Solve(){
int i,j;scanf("%d",&n);
for(i=1;i<=n-1;i++){
for(j=i+1;j<=n;j++){
int x=i,y=j,Ct=0;
while(x%2==y%2) Ct++,x>>=1,y>>=1;
printf("%d",Ct);
}printf("\n");
}
}
int main(){
int t;
// scanf("%d",&t);
t=1;
while(t--) Solve();
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 1ms
memory: 3708kb
input:
2
output:
0
result:
ok Accepted.
Test #2:
score: 0
Accepted
time: 18ms
memory: 3732kb
input:
1000
output:
010201030102010401020103010201050102010301020104010201030102010601020103010201040102010301020105010201030102010401020103010201070102010301020104010201030102010501020103010201040102010301020106010201030102010401020103010201050102010301020104010201030102010801020103010201040102010301020105010201030102...
result:
ok Accepted.
Test #3:
score: 0
Accepted
time: 16ms
memory: 3712kb
input:
988
output:
010201030102010401020103010201050102010301020104010201030102010601020103010201040102010301020105010201030102010401020103010201070102010301020104010201030102010501020103010201040102010301020106010201030102010401020103010201050102010301020104010201030102010801020103010201040102010301020105010201030102...
result:
ok Accepted.
Test #4:
score: 0
Accepted
time: 2ms
memory: 3660kb
input:
104
output:
0102010301020104010201030102010501020103010201040102010301020106010201030102010401020103010201050102010 010201030102010401020103010201050102010301020104010201030102010601020103010201040102010301020105010201 010201030102010401020103010201050102010301020104010201030102010601020103010201040102010301020...
result:
ok Accepted.
Test #5:
score: 0
Accepted
time: 1ms
memory: 3724kb
input:
7
output:
010201 01020 0102 010 01 0
result:
ok Accepted.
Test #6:
score: 0
Accepted
time: 1ms
memory: 3708kb
input:
59
output:
0102010301020104010201030102010501020103010201040102010301 010201030102010401020103010201050102010301020104010201030 01020103010201040102010301020105010201030102010401020103 0102010301020104010201030102010501020103010201040102010 010201030102010401020103010201050102010301020104010201 010201030102010...
result:
ok Accepted.