• Welcome to the world's largest Chinese hacker forum

    Welcome to the world's largest Chinese hacker forum, our forum registration is open! You can now register for technical communication with us, this is a free and open to the world of the BBS, we founded the purpose for the study of network security, please don't release business of black/grey, or on the BBS posts, to seek help hacker if violations, we will permanently frozen your IP and account, thank you for your cooperation. Hacker attack and defense cracking or network Security

    business please click here: Creation Security  From CNHACKTEAM

Recommended Posts

1 延长数

3.12 1647A

image

点击查看代码int t;

int a,cnt=0,I;

//试试看你应该报名参赛能上能下1

//找出十进制数中最大且不含0的同一个数不相邻。最大数量A为1000。

//很明显,答案只能由1,2这两个不相邻重复的数字组成(其他的会减少位数)

/*

因为2和1的数只能差一个。

一个

2

21

121 4

212 5

2121 6

2121 7显然,奇数1是以数字递增开始的。

21212 8

212121 9

1212121 10

2121212 11

21212121 12

121212121 13

1:在之后添加(n/3) 21 2:在(n/3) 21之后添加(n/3) 12 :21

*/

cint

while(t - ){

cina

if(a%3==1){

cout“1”;

for(I=1;I=(a-1)/3;一)cout‘21’;

coutendl

}

else if(a%3==2){

cout“2”;

for(I=1;I=(a-2)/3;一)cout‘12’;

coutendl

}

否则{

cout“21”;

for(I=1;I=(a-3)/3;一)cout‘21’;

coutendl

}

}

给定个数、和 求最大平方个数

3.15 1646A

评价:题目描述的太复杂了 当时还想着n+1

点击查看代码int t;

cint

while(t - ){

long long n,s;

cinns

couts/(n * n)endl;

//知道n个数的个数s,求n ^ 2[0,n]n ^ 1数列的个数

}

给n 问下标几赢 (2^n-1)

3.15 1651A

单击以查看代码。//阅读问题来简化你的知识。如果你问下标,你会赢几场?

//在比赛中,如果和是奇数下标,小的获胜,大的获胜。

//直接模拟看是正则还是只有30(正好在int范围内)

//2是3胜,4是15胜。观察图很明显。

int t,a[32]={1,3,7,15},k=2,I;

for(I=1;i=30i ){

a=k-1;

k *=2;

}

cint

while(t - ){

int n;

cinn

couta[n]endl;

}

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now