QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#275131#6652. 着色rageOfThunder#AC ✓15ms3612kbC++141.0kb2023-12-04 13:55:332023-12-04 13:55:34

Judging History

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

  • [2023-12-04 13:55:34]
  • 评测
  • 测评结果:AC
  • 用时:15ms
  • 内存:3612kb
  • [2023-12-04 13:55:33]
  • 提交

answer

//-DYUNQIAN -std=c++14 -O2 -Wall
#include<bits/stdc++.h>

#define ll long long
#define fi first
#define se second
#define mk make_pair

using namespace std;

inline int read(){
    int x=0,f=1;char c=getchar();
    for(;(c<'0'||c>'9');c=getchar()){if(c=='-')f=-1;}
    for(;(c>='0'&&c<='9');c=getchar())x=x*10+(c&15);
    return x*f;
}

const int mod=1e9+7;
int ksm(int x,int y,int p=mod){
    int ans=1;
    for(int i=y;i;i>>=1,x=1ll*x*x%p)if(i&1)ans=1ll*ans*x%p;
    return ans%p;
}
int inv(int x,int p=mod){return ksm(x,p-2,p)%p;}
mt19937 rnd(time(0));
int randint(int l,int r){return rnd()%(r-l+1)+l;}
void add(int &x,int v){x+=v;if(x>=mod)x-=mod;}
void Mod(int &x){if(x>=mod)x-=mod;}

void Assert(bool c,int L=0){if(!c){cout<<"Assertion Failed at "<<L<<endl;exit(0);}}

void cmax(int &x,int v){x=max(x,v);}
void cmin(int &x,int v){x=min(x,v);}

signed main(void){
	
	int n=read();
//	auto lowbit=[&](int x){return x&(-x);};
	for(int i=1;i<=n;i++){for(int j=i+1;j<=n;j++)cout<<__builtin_ctz(j-i);puts("");}

    return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 1ms
memory: 3432kb

input:

2

output:

0


result:

ok Accepted.

Test #2:

score: 0
Accepted
time: 14ms
memory: 3504kb

input:

1000

output:

010201030102010401020103010201050102010301020104010201030102010601020103010201040102010301020105010201030102010401020103010201070102010301020104010201030102010501020103010201040102010301020106010201030102010401020103010201050102010301020104010201030102010801020103010201040102010301020105010201030102...

result:

ok Accepted.

Test #3:

score: 0
Accepted
time: 15ms
memory: 3496kb

input:

988

output:

010201030102010401020103010201050102010301020104010201030102010601020103010201040102010301020105010201030102010401020103010201070102010301020104010201030102010501020103010201040102010301020106010201030102010401020103010201050102010301020104010201030102010801020103010201040102010301020105010201030102...

result:

ok Accepted.

Test #4:

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

input:

104

output:

0102010301020104010201030102010501020103010201040102010301020106010201030102010401020103010201050102010
010201030102010401020103010201050102010301020104010201030102010601020103010201040102010301020105010201
010201030102010401020103010201050102010301020104010201030102010601020103010201040102010301020...

result:

ok Accepted.

Test #5:

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

input:

7

output:

010201
01020
0102
010
01
0


result:

ok Accepted.

Test #6:

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

input:

59

output:

0102010301020104010201030102010501020103010201040102010301
010201030102010401020103010201050102010301020104010201030
01020103010201040102010301020105010201030102010401020103
0102010301020104010201030102010501020103010201040102010
010201030102010401020103010201050102010301020104010201
010201030102010...

result:

ok Accepted.