ZCMU暑期训练四

A - Vus the Cossack and a Contest
Vus the Cossack holds a programming competition, in which nn people participate. He decided to award them all with pens and notebooks. It is known that Vus has exactly mm pens and kk notebooks.

Determine whether the Cossack can reward all participants, giving each of them at least one pen and at least one notebook.

Input
The first line contains three integers nn, mm, and kk (1≤n,m,k≤1001≤n,m,k≤100) — the number of participants, the number of pens, and the number of notebooks respectively.

Output
Print “Yes” if it possible to reward all the participants. Otherwise, print “No”.

You can print each letter in any case (upper or lower).

Examples
Input

5 8 6

Output

Yes

Input

3 9 3

Output

Yes

Input

8 5 20

Output

No

Note
In the first example, there are 55 participants. The Cossack has 88 pens and 66 notebooks. Therefore, he has enough pens and notebooks.

In the second example, there are 33 participants. The Cossack has 99 pens and 33 notebooks. He has more than enough pens but only the minimum needed number of notebooks.

In the third example, there are 88 participants but only 55 pens. Since the Cossack does not have enough pens, the answer is “No”.
HINT
如果k,m都大于n就输出YES
Code:

#include<stdio.h>
int main()
{
    int n,m,k;
    scanf("%d %d %d",&n,&m,&k);
    if(n<=m&&k>=n)printf("YES\n");
    else printf("NO\n");
    return 0;
}

B - Tokitsukaze and Mahjong
Tokitsukaze is playing a game derivated from Japanese mahjong. In this game, she has three tiles in her hand. Each tile she owns is a suited tile, which means it has a suit (manzu, pinzu or souzu) and a number (a digit ranged from 11 to 99). In this problem, we use one digit and one lowercase letter, which is the first character of the suit, to represent a suited tile. All possible suited tiles are represented as 1m, 2m, ……, 9m, 1p, 2p, ……, 9p, 1s, 2s, ……, 9s.

In order to win the game, she must have at least one mentsu (described below) in her hand, so sometimes she should draw extra suited tiles. After drawing a tile, the number of her tiles increases by one. She can draw any tiles she wants, including those already in her hand.

Do you know the minimum number of extra suited tiles she needs to draw so that she can win?

Here are some useful definitions in this game:

A mentsu, also known as meld, is formed by a koutsu or a shuntsu;
A koutsu, also known as triplet, is made of three identical tiles, such as [1m, 1m, 1m], however, [1m, 1p, 1s] or [1m, 4m, 7m] is NOT a koutsu;
A shuntsu, also known as sequence, is made of three sequential numbered tiles in the same suit, such as [1m, 2m, 3m] and [5s, 7s, 6s], however, [9m, 1m, 2m] or [1m, 2p, 3s] is NOT a shuntsu.
Some examples:

[2m, 3p, 2s, 4m, 1s, 2s, 4s] — it contains no koutsu or shuntsu, so it includes no mentsu;
[4s, 3m, 3p, 4s, 5p, 4s, 5p] — it contains a koutsu, [4s, 4s, 4s], but no shuntsu, so it includes a mentsu;
[5p, 5s, 9m, 4p, 1s, 7p, 7m, 6p] — it contains no koutsu but a shuntsu, [5p, 4p, 6p] or [5p, 7p, 6p], so it includes a mentsu.
Note that the order of tiles is unnecessary and you can assume the number of each type of suited tiles she can draw is infinite.

Input
The only line contains three strings — the tiles in Tokitsukaze’s hand. For each string, the first character is a digit ranged from 11 to 99 and the second character is m, p or s.

Output
Print a single integer — the minimum number of extra suited tiles she needs to draw.

Examples
Input

1s 2s 3s

Output

0

Input

9m 9m 9m

Output

0

Input

3p 9m 2p

Output

1

Note
In the first example, Tokitsukaze already has a shuntsu.

In the second example, Tokitsukaze already has a koutsu.

In the third example, Tokitsukaze can get a shuntsu by drawing one suited tile — 1p or 4p. The resulting tiles will be [3p, 9m, 2p, 1p] or [3p, 9m, 2p, 4p].
类似于麻将 ,三张一样的牌就胡了,顺子也胡了。
题目要求缺几张牌才能胡,模拟
Code:

#include<iostream>
#include<cstdio>
#include<cstring>
#include<algorithm>
#include<map>
#include<set>
#include<vector>
#include<queue>
#include<cmath>
using namespace std;
int main()
{
    string a,b,c;
    while(cin>>a>>b>>c)
    {
        if(a==b&&b==c)
        {
            cout<<0<<endl;
            continue;
        }
        if(a==b||a==c||b==c)
        {
            cout<<1<<endl;
            continue;
        }
        if(a>b)
            swap(a,b);
        if(a>c)
            swap(a,c);
        if(b>c)
            swap(b,c);
        if(a[1]==b[1]&&b[1]==c[1])
        {
            if(a[0]+1==b[0]&&b[0]+1==c[0])
            {
                cout<<0<<endl;
                continue;
            }
        }
        if(a[1]==b[1])
        {
            if(a[0]+1==b[0]||a[0]+2==b[0])
            {
                cout<<1<<endl;
                continue;
            }
        }
        if(a[1]==c[1])
        {
            if(a[0]+1==c[0]||a[0]+2==c[0])
            {
                cout<<1<<endl;
                continue;
            }
        }

        if(b[1]==c[1])
        {
            if(b[0]+1==c[0]||b[0]+2==c[0])
            {
                cout<<1<<endl;
                continue;
            }
        }
        cout<<2<<endl;
    }

    return 0;
}

C - Tokitsukaze and Discard Items
Recently, Tokitsukaze found an interesting game. Tokitsukaze had nn items at the beginning of this game. However, she thought there were too many items, so now she wants to discard mm (1≤m≤n1≤m≤n) special items of them.

These nn items are marked with indices from 11 to nn. In the beginning, the item with index ii is placed on the ii-th position. Items are divided into several pages orderly, such that each page contains exactly kk positions and the last positions on the last page may be left empty.

Tokitsukaze would do the following operation: focus on the first special page that contains at least one special item, and at one time, Tokitsukaze would discard all special items on this page. After an item is discarded or moved, its old position would be empty, and then the item below it, if exists, would move up to this empty position. The movement may bring many items forward and even into previous pages, so Tokitsukaze would keep waiting until all the items stop moving, and then do the operation (i.e. check the special page and discard the special items) repeatedly until there is no item need to be discarded.
在这里插入图片描述

Consider the first example from the statement: n=10n=10, m=4m=4, k=5k=5, p=[3,5,7,10]p=[3,5,7,10]. The are two pages. Initially, the first page is special (since it is the first page containing a special item). So Tokitsukaze discards the special items with indices 33 and 55. After, the first page remains to be special. It contains [1,2,4,6,7][1,2,4,6,7], Tokitsukaze discards the special item with index 77. After, the second page is special (since it is the first page containing a special item). It contains [9,10][9,10], Tokitsukaze discards the special item with index 1010.
Tokitsukaze wants to know the number of operations she would do in total.

Input
The first line contains three integers nn, mm and kk (1≤n≤10181≤n≤1018, 1≤m≤1051≤m≤105, 1≤m,k≤n1≤m,k≤n) — the number of items, the number of special items to be discarded and the number of positions in each page.

The second line contains mm distinct integers p1,p2,…,pmp1,p2,…,pm (1≤p1<p2<…<pm≤n1≤p1<p2<…<pm≤n) — the indices of special items which should be discarded.

Output
Print a single integer — the number of operations that Tokitsukaze would do in total.

Examples

Input

10 4 5
3 5 7 10

Output

3

Input

13 4 5
7 8 9 10

Output

1

Note
For the first example:

In the first operation, Tokitsukaze would focus on the first page [1,2,3,4,5][1,2,3,4,5] and discard items with indices 33 and 55;
In the second operation, Tokitsukaze would focus on the first page [1,2,4,6,7][1,2,4,6,7] and discard item with index 77;
In the third operation, Tokitsukaze would focus on the second page [9,10][9,10] and discard item with index 1010.
For the second example, Tokitsukaze would focus on the second page [6,7,8,9,10][6,7,8,9,10] and discard all special items at once.
就是一次操作可以去除k的倍数里面的数字个数,然后缺的空前移
Code:

#include<stdio.h>

int main()
{
    long long n,m,k;
    long long a[100005];
    scanf("%lld %lld %lld",&n,&m,&k);
    long long kk=k;
    long long sum=0,x=0,ans=0;
    for(int i=0; i<m; i++)
        scanf("%lld",&a[i]);
    for(int i=0; i<m; i++)
    {
        if(a[i]<=k+sum)
        {
            x++;
        }
        else
        {
            if(x>0)
            {
                sum+=x;
                i--;
                ans++;
                x=0;
            }
             else if((a[i]-k - sum)/kk > 10) k = (a[i]-kk)/kk*kk,i--;//连续翻页防止超时
            else
            {
                k+=kk;
                i--;
            }
        }
    }
    if(x>0)
        ans++;
    printf("%lld\n",ans);
    return 0;
}

D - Tokitsukaze and Enhancement
Tokitsukaze is one of the characters in the game “Kantai Collection”. In this game, every character has a common attribute — health points, shortened to HP.

In general, different values of HP are grouped into 44 categories:

Category AA if HP is in the form of (4n+1)(4n+1), that is, when divided by 44, the remainder is 11;
Category BB if HP is in the form of (4n+3)(4n+3), that is, when divided by 44, the remainder is 33;
Category CC if HP is in the form of (4n+2)(4n+2), that is, when divided by 44, the remainder is 22;
Category DD if HP is in the form of 4n4n, that is, when divided by 44, the remainder is 00.
The above-mentioned nn can be any integer.

These 44 categories ordered from highest to lowest as A>B>C>DA>B>C>D, which means category AA is the highest and category DD is the lowest.

While playing the game, players can increase the HP of the character. Now, Tokitsukaze wants you to increase her HP by at most 22 (that is, either by 00, 11 or 22). How much should she increase her HP so that it has the highest possible category?

Input
The only line contains a single integer xx (30≤x≤10030≤x≤100) — the value Tokitsukaze’s HP currently.

Output
Print an integer aa (0≤a≤20≤a≤2) and an uppercase letter bb (b∈{A,B,C,D}b∈{A,B,C,D}), representing that the best way is to increase her HP by aa, and then the category becomes bb.

Note that the output characters are case-sensitive.

Examples

Input

33

Output

0 A

Input

98

Output

1 B

Note
For the first example, the category of Tokitsukaze’s HP is already AA, so you don’t need to enhance her ability.

For the second example:

If you don’t increase her HP, its value is still 9898, which equals to (4×24+2)(4×24+2), and its category is CC.
If you increase her HP by 11, its value becomes 9999, which equals to (4×24+3)(4×24+3), and its category becomes BB.
If you increase her HP by 22, its value becomes 100100, which equals to (4×25)(4×25), and its category becomes DD.
Therefore, the best way is to increase her HP by 11 so that the category of her HP becomes BB.

可以加0-2的数让他的等级达到最高

Code:

#include<stdio.h>
int main()
{
    int x,a;
    scanf("%d",&x);
    x%=4;
    if(x==1)printf("0 A\n");
    else if(x==2)printf("1 B\n");
    else if(x==3)printf("2 A\n");
    else printf("1 A\n");
    return 0;
}

E - Vus the Cossack and Strings
Vus the Cossack has two binary strings, that is, strings that consist only of “0” and “1”. We call these strings aa and bb. It is known that |b|≤|a||b|≤|a|, that is, the length of bb is at most the length of aa.

The Cossack considers every substring of length |b||b| in string aa. Let’s call this substring cc. He matches the corresponding characters in bb and cc, after which he counts the number of positions where the two strings are different. We call this function f(b,c)f(b,c).

For example, let b=00110b=00110, and c=11000c=11000. In these strings, the first, second, third and fourth positions are different.

Vus the Cossack counts the number of such substrings cc such that f(b,c)f(b,c) is even.

For example, let a=01100010a=01100010 and b=00110b=00110. aa has four substrings of the length |b||b|: 0110001100, 1100011000, 1000110001, 0001000010.

f(00110,01100)=2f(00110,01100)=2;
f(00110,11000)=4f(00110,11000)=4;
f(00110,10001)=4f(00110,10001)=4;
f(00110,00010)=1f(00110,00010)=1.
Since in three substrings, f(b,c)f(b,c) is even, the answer is 33.

Vus can not find the answer for big strings. That is why he is asking you to help him.

Input
The first line contains a binary string aa (1≤|a|≤1061≤|a|≤106) — the first string.

The second line contains a binary string bb (1≤|b|≤|a|1≤|b|≤|a|) — the second string.

Output
Print one number — the answer.

Examples

Input
01100010
00110
Output
3
Input
1010111110
0110
Output
4
Note
The first example is explained in the legend.

In the second example, there are five substrings that satisfy us: 10101010, 01010101, 11111111, 11111111.

开始没想到用异或,所以超时了;
后来用异或就过了,题意就是找到不相同的个数,如果是偶数就累加。
超时代码:

#include<stdio.h>
#include<iostream>
#include<algorithm>
#include<cmath>
#include<cstring>
using namespace std;
char a[2000005],b[2000005];
int main()
{
    scanf("%s %s",a,b);
    int l1=strlen(a),l2=strlen(b);
    int x=0,abs=0;
    for(int i=0; i<l1-l2+1; i++)
    {
        int sum=0,m=0;
        for(int j=i; j<l2+i; j++)
        {
            if(a[j]=='1'||b[m]=='1')
                sum++;
            if(a[j]=='1'&&b[m]=='1')
                sum--;
         m++;   // cout<<sum<<" ";
        }
        //cout<<sum<<" ";
        if(sum%2==0)abs++;
       // printf("%d ",i);
    }
    printf("%d\n",abs);
    return 0;
}

通过代码:

#include<stdio.h>
#include<iostream>
#include<algorithm>
#include<cmath>
#include<cstring>
using namespace std;
char a[2000005],b[2000005];
int main()
{
    scanf("%s %s",a,b);
    int l1=strlen(a),l2=strlen(b);
    int ans=0,sum=0;
    for(int i = 0 ; i < l2 ; i++)
    {
        ans=ans^a[i]^b[i];
    }
    if(ans%2 == 0)
        sum++;
    for(int i = l2 ;  i < l1 ; i++)
    {
        ans = ans^a[i-l2]^a[i];//进入一个开始的让原来的抵消再进去一个末尾的。
        if(ans % 2 == 0)
            sum++;
    }
    printf("%d\n",sum);
    return 0;
}

F - Vus the Cossack and Numbers
Vus the Cossack has nn real numbers aiai. It is known that the sum of all numbers is equal to 00. He wants to choose a sequence bb the size of which is nn such that the sum of all numbers is 00 and each bibi is either ⌊ai⌋⌊ai⌋ or ⌈ai⌉⌈ai⌉. In other words, bibi equals aiai rounded up or down. It is not necessary to round to the nearest integer.

For example, if a=[4.58413,1.22491,−2.10517,−3.70387]a=[4.58413,1.22491,−2.10517,−3.70387], then bb can be equal, for example, to [4,2,−2,−4][4,2,−2,−4].

Note that if aiai is an integer, then there is no difference between ⌊ai⌋⌊ai⌋ and ⌈ai⌉⌈ai⌉, bibi will always be equal to aiai.

Help Vus the Cossack find such sequence!

Input
The first line contains one integer nn (1≤n≤1051≤n≤105) — the number of numbers.

Each of the next nn lines contains one real number aiai (|ai|<105|ai|<105). It is guaranteed that each aiai has exactly 55 digits after the decimal point. It is guaranteed that the sum of all the numbers is equal to 00.

Output
In each of the next nn lines, print one integer bibi. For each ii, |ai−bi|<1|ai−bi|<1 must be met.

If there are multiple answers, print any.

Examples

Input

4
4.58413
1.22491
-2.10517
-3.70387

Output

4
2
-2
-4

Input

5
-6.32509
3.30066
-0.93878
2.00000
1.96321

Output

-6
3
-1
2
2

Note
The first example is explained in the legend.

In the second example, we can round the first and fifth numbers up, and the second and third numbers down. We can round the fourth number neither up, nor down.
得到他们的小数部分和之后四舍五入。然后按顺序加入或者减去
Code:

#include<stdio.h>
#include<iostream>
#include<algorithm>
#include<cmath>
#include<cstring>
using namespace std;

int main()
{
    int n;
    double a[100005];
    int b[100005];
    while(cin>>n)
    {
        double sum=0;
        for(int i=0; i<n; i++)
        {
            cin>>a[i];
            b[i]=a[i];
            sum+=a[i]-b[i];
            //printf("%.2lf %d\n",a[i],b[i]);
        }
        int f=round(sum);//round,四舍五入。
        //printf("%d ",f);
        if(f>0)
        {
            for(int i=0; i<n; i++)
            {
                if(f==0)
                    break;
                if(a[i]>b[i])
                {
                    b[i]++;
                    f--;
                }
            }
        }
        else if(f<0)
        {
            for(int i=0; i<n; i++)
            {
                if(f==0)
                    break;
                if(a[i]<b[i])
                {
                    b[i]--;
                    f++;

                }
            }
        }
        for(int i=0; i<n; i++)
            cout<<b[i]<<endl;
    }
    return 0;
}

G - Alex and a Rhombus
While playing with geometric figures Alex has accidentally invented a concept of a nn-th order rhombus in a cell grid.

A 11-st order rhombus is just a square 1×11×1 (i.e just a cell).

A nn-th order rhombus for all n≥2n≥2 one obtains from a n−1n−1-th order rhombus adding all cells which have a common side with it to it (look at the picture to understand it better).

在这里插入图片描述
Alex asks you to compute the number of cells in a nn-th order rhombus.

Input
The first and only input line contains integer nn (1≤n≤1001≤n≤100) — order of a rhombus whose numbers of cells should be computed.

Output
Print exactly one integer — the number of cells in a nn-th order rhombus.

Examples

Input

1

Output

1

Input

2

Output

5

Input

3

Output

13

Note
Images of rhombus corresponding to the examples are given in the statement.
容易得出规律 4+8+12+16…,求和公式得出
Code:

#include<stdio.h>
int main()
{
    int n;
    scanf("%d",&n);
    n--;
    printf("%d\n",1+(4+n*4)*n/2);
    return 0;
}

H - Nick and Array
Nick had received an awesome array of integers a=[a1,a2,…,an]a=[a1,a2,…,an] as a gift for his 55 birthday from his mother. He was already going to explore its various properties but after unpacking he was disappointed a lot because the product a1⋅a2⋅…ana1⋅a2⋅…an of its elements seemed to him not large enough.

He was ready to throw out the array, but his mother reassured him. She told him, that array would not be spoiled after the following operation: choose any index ii (1≤i≤n1≤i≤n) and do ai:=−ai−1ai:=−ai−1.

For example, he can change array [3,−1,−4,1][3,−1,−4,1] to an array [−4,−1,3,1][−4,−1,3,1] after applying this operation to elements with indices i=1i=1 and i=3i=3.

Kolya had immediately understood that sometimes it’s possible to increase the product of integers of the array a lot. Now he has decided that he wants to get an array with the maximal possible product of integers using only this operation with its elements (possibly zero, one or more times, as many as he wants), it is not forbidden to do this operation several times for the same index.

Help Kolya and print the array with the maximal possible product of elements a1⋅a2⋅…ana1⋅a2⋅…an which can be received using only this operation in some order.

If there are multiple answers, print any of them.

Input
The first line contains integer nn (1≤n≤1051≤n≤105) — number of integers in the array.

The second line contains nn integers a1,a2,…,ana1,a2,…,an (−106≤ai≤106−106≤ai≤106) — elements of the array

Output
Print nn numbers — elements of the array with the maximal possible product of elements which can be received using only this operation in some order from the given array.

If there are multiple answers, print any of them.

Examples

Input

4
2 2 2 2

Output

-3 -3 -3 -3 

Input

1
0

Output

0

Input

3
-3 -3 2

Output

-3 -3 2 

一道贪心题,求最大的乘积
先将负数全部乘-1再减1,然后排序,把最大偶数个再进行一次操作,然后归位输出。
Code:

#include<stdio.h>
#include<iostream>
#include<algorithm>
#include<cmath>
#include<cstring>
using namespace std;
struct node
{
    int x;
    int y;
};
int cmp(node a,node b)
{
    return a.x<b.x;
}
int cmp1(node a,node b)
{
    return a.y<b.y;
}
int main()
{
    int n;
    node b[100005];
    cin>>n;
    for(int i=0; i<n; i++)
    {
        cin>>b[i].x;
        b[i].y=i;
        if(b[i].x<0)
            b[i].x=-b[i].x-1;
    }
    sort(b,b+n,cmp);
    if(n%2==1)
    {
        for(int i=0; i<n-1; i++)
            b[i].x=-b[i].x-1;
    }
    else
    {
        for(int i=0; i<n; i++)
            b[i].x=-b[i].x-1;
    }
       sort(b,b+n,cmp1);
    for(int i=0; i<n; i++)
        if(i==0)
            printf("%d",b[i].x);
        else
            printf(" %d",b[i].x);
    printf("\n");
    return 0;
}

**J - Lose it! **
You are given an array aa consisting of nn integers. Each aiai is one of the six following numbers: 4,8,15,16,23,424,8,15,16,23,42.

Your task is to remove the minimum number of elements to make this array good.

An array of length kk is called good if kk is divisible by 66 and it is possible to split it into k6k6 subsequences 4,8,15,16,23,424,8,15,16,23,42.

Examples of good arrays:

[4,8,15,16,23,42][4,8,15,16,23,42] (the whole array is a required sequence);
[4,8,4,15,16,8,23,15,16,42,23,42][4,8,4,15,16,8,23,15,16,42,23,42] (the first sequence is formed from first, second, fourth, fifth, seventh and tenth elements and the second one is formed from remaining elements);
[][] (the empty array is good).
Examples of bad arrays:

[4,8,15,16,42,23][4,8,15,16,42,23] (the order of elements should be exactly 4,8,15,16,23,424,8,15,16,23,42);
[4,8,15,16,23,42,4][4,8,15,16,23,42,4] (the length of the array is not divisible by 66);
[4,8,15,16,23,42,4,8,15,16,23,23][4,8,15,16,23,42,4,8,15,16,23,23] (the first sequence can be formed from first six elements but the remaining array cannot form the required sequence).
Input
The first line of the input contains one integer nn (1≤n≤5⋅1051≤n≤5⋅105) — the number of elements in aa.

The second line of the input contains nn integers a1,a2,…,ana1,a2,…,an (each aiai is one of the following numbers: 4,8,15,16,23,424,8,15,16,23,42), where aiai is the ii-th element of aa.

Output
Print one integer — the minimum number of elements you have to remove to obtain a good array.

Examples

Input

5
4 8 15 16 23

Output

5

Input

12
4 8 4 15 16 8 23 15 16 42 23 42

Output

0

Input

15
4 8 4 8 15 16 8 16 23 15 16 4 42 23 42

Output

3

给这些数一个标记,便于遍历
按数顺序求出有几组数,然后n-6*T
Code:

#include<stdio.h>
#include<iostream>
#include<algorithm>
#include<cmath>
#include<cstring>
using namespace std;
int n, a[500005], x[500005];
int main()
{
    int n;
    cin >> n;
    for(int i=1; i<=n; i++)
    {
        cin >> a[i];
        if(a[i] == 4)
            a[i] = 1;
        else if(a[i] == 8)
            a[i] = 2;
        else if(a[i] == 15)
            a[i] = 3;
        else if(a[i] == 16)
            a[i] = 4;
        else if(a[i] == 23)
            a[i] = 5;
        else
            a[i] = 6;
    }
    for(int i=1; i<=n; i++)
    {
        for(int j=1; j<=6; j++)
        {
            if(a[i] == j && (j == 1 || x[j - 1] > x[j]))
                x[j] ++;
                //printf("%d ",x[j]);
        }
        //printf("\n");
    }
    cout << n - x[6] * 6 << endl;
    return 0;
}

L - Filling Shapes
You have a given integer nn. Find the number of ways to fill all 3×n3×n tiles with the shape described in the picture below. Upon filling, no empty spaces are allowed. Shapes cannot overlap.
在这里插入图片描述
This picture describes when n=4n=4. The left one is the shape and the right one is 3×n3×n tiles.
Input
The only line contains one integer nn (1≤n≤601≤n≤60) — the length.

Output
Print the number of ways to fill.

Examples

Input

4

Output

4

Input

1

Output

0

Note
In the first example, there are 44 possible cases of filling.

In the second example, you cannot fill the shapes in 3×13×1 tiles.
一道规律题,如果n是偶数倍,那么每2个长度有两种组合
Code:

#include<stdio.h>
#include<iostream>
#include<algorithm>
#include<cmath>
#include<cstring>
using namespace std;
int main()
{
    int n;
    cin >> n;
    if(n%2!=0)
    {
        cout<<0<<endl;
        return 0;
    }
    else
    {
        int sum=1;
        for(int i=0; i<n/2; i++)
        {
            sum*=2;
        }
        cout<<sum<<endl;
    }
    return 0;
}

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值