停放在机场上的苏

发布时间:2019-03-31  栏目:军事  评论:0 Comments

yzc111亚洲城官网 1苏-35/苏-37“侧卫-E”苏/俄yzc111亚洲城官网 2

yzc111亚洲城官网 3苏-30/苏-33“侧卫” yzc111亚洲城官网 ,苏/俄yzc111亚洲城官网 4

  格军方还意味着,已经击落至少5架俄罗丝战机。而俄新网的音信说,俄罗丝装甲部队已经进去南奥塞梯首府茨欣瓦利。

E – Pretty Poem
  • 名称:苏-35/苏-37“侧卫-E” 全天候防空中作战斗机
  • 首飞时间:壹玖捌柒年七月二十七日
  • 研究开发单位:苏霍伊设计局
  • 气动布局:后掠翼
  • 斯特林发动机数据:双发
  • 停放在机场上的苏。飞行速度:亚音速
  • 名称:苏-30/苏-33“侧卫” 制空战斗机和对地攻击机
  • 首飞时间:壹玖捌玖年
  • 研究开发单位:苏霍伊设计局
  • 气动布局:后掠翼
  • 外燃机数量:双发
  • 飞行速度:超音速
  • 关注度:(4.8分)
ZOJ – 3818

Poetry is a form of literature that uses aesthetic and rhythmic
qualities of language. There are many famous poets in the contemporary
era. It is said that a few ACM-ICPC contestants can even write poetic
code. Some poems has a strict rhyme scheme like “ABABA” or “ABABCAB”.
For example, “niconiconi” is composed of a rhyme scheme “ABABA” with A =
“ni” and B = “co”.

More technically, we call a poem pretty if it can be decomposed into one
of the following rhyme scheme: “ABABA” or “ABABCAB”. The symbol A, B and
C are different continuous non-empty substrings of the poem. By the way,
punctuation characters should be ignored when considering the rhyme
scheme.

You are given a line of poem, please determine whether it is pretty or
not.

Input
There are multiple test cases. The first line of input contains an
integer T indicating the number of test cases. For each test case:

There is a line of poem S (1 <= length(S) <= 50). S will only
contains alphabet characters or punctuation characters.

Output
For each test case, output “Yes” if the poem is pretty, or “No” if not.

Sample Input
3
niconiconi亚洲城 ,~
pettan,pettan,tsurupettan
wafuwafu
Sample Output
Yes
Yes
No


题意:假若一首诗符合ABABA或ABABCAB那么是一首好诗,判断一首诗是还是不是为好诗,不考虑标点符号

解法:枚举法,枚举A和B的长度,不用枚举C的长度,C的尺寸能够由此AB求出,然后切割字符串,获得A、B、C,假使输入字符串S=A+B+A+B+A,或S=A+B+A+B+C+A+B,则知足好诗的准绳。注意A、B、C区别且长度大于0。

代码:

#include<iostream>
#include<string>
#include<cstring>
using namespace std;
char a[60];
string b;
bool com1()
{
    int n=b.length();
    for(int i=1;i<=n/3;i++){
        for(int j=1;j<=n/2;j++){
            if(i*3+j*2==n){
                string A,B;
                A=b.substr(0,i);
                B=b.substr(i,j);
                if(A+B+A+B+A==b&&A!=B)
                    return true;
            }
        }
    }
    return false;
}
bool com2()
{
    int n=b.length();
    for(int i=1;i<=n/3;i++){
        for(int j=1;j<=n/3;j++){
            if(i*3+j*3<n){
                string A,B,C;
                A=b.substr(0,i);
                B=b.substr(i,j);
                C=b.substr(i+j+i+j,n-i-j-i-j-i-j);
                if(A+B+A+B+C+A+B==b&&A!=B&&A!=C&&B!=C)
                    return true;
            }
        }
    }
    return false;
}
int main()
{
    int num;
    cin>>num;
    while(num--){
        cin>>a;
        b="";
        int n=strlen(a);
        for(int i=0;i<n;i++)
            if(isalpha(a[i]))
                b+=a[i];
        com1()||com2()?cout<<"Yes"<<endl:cout<<"No"<<endl;      
    }
}

苏-35

武备

  • (1)内置武器:1门30毫米GSH-30-1机炮;
    (2)挂载点:1三个(外加翼尖挂载点);
    (3)最大载弹量:九千公斤(17635磅);
    (4)典型武器:空对空导弹、(汉兰达-27“白杨”、福特Explorer-73“射手”、Highlander-77“盲蛇”);空对地对地导弹(Kh-2九 、Kh-3一 、Kh-59);Raduga 3M80E反舰导弹;常规炸弹;火箭;外挂式油箱。

留下评论

网站地图xml地图