Hdu 5099 Comparison of Android versions enumeration test instructions

Source: Internet
Author: User

Title Link: http://acm.hdu.edu.cn/showproblem.php?pid=5099

Card reading problem, in fact, the test instructions of the topic is not complete, so read carefully and add some practical "common sense"

About enumerating test instructions, it feels like three people to look at each other and then discuss what the most likely test instructions is.

In order to avoid the change of attitude after WA, in the premise of trying to guarantee not to knock, before the hand should be all possible test instructions, listed, according to the possibility of sorting, and then handed

It feels like it's the only thing that can make WA don't panic.

About "The first output to determine the first two letters or only to determine the number one letter of the good question"

Note that for the first letter, the description of the test instructions is:

"The code names is ordered alphabetically. The latest code name is K (KitKat).

For the last letter, test instructions's description is:

"Sequentially starting with A;"

For the second letter, however, the relationship between letters is not described in the text.

So the introduction is probably just the first letter of the judgment

About "The second output, ' the same Code branch" is the first two letters or a good question

I am based on reality, is generally family in the same branch to compare the need for each other, presumably should be sentenced to two letters

It's the top two places that are hard to understand.

You can't just enumerate test instructions.

#include <cstring>#include<cstdlib>#include<cstring>#include<cmath>#include<algorithm>#include<iostream>#include<cstdio>#include<stack>#include<vector>#include<queue>#include<map>#include<Set>using namespacestd;Const intMAXN = -;CharA[MAXN], B[MAXN];Const CharCh[] ="<=>";intMain () {//freopen ("In.txt", "R", stdin);    intT; scanf ("%d", &T); intKase =0;  while(t--) {printf ("Case %d:", ++Kase); scanf ("%s%s", A, b); intans1; if(a[0] < b[0]) ans1= -1; Else if(a[0] > b[0]) ans1=1; Elseans1=0; intAns2 =0;  for(inti =2; I <=4&& Ans2 = =0; i++)        {            if(A[i] <B[i]) ans2= -1; Else if(A[i] >B[i]) ans2=1; }        BOOLFlag; if(Ans1 = =0&& a[1] = = b[1]) Flag=true; ElseFlag=false; if(flag) {if(Ans2 = =0)            {                if(a[5] < b[5]) Ans2= -1; Else if(a[5] > b[5]) Ans2=1; ElseAns2=0; }} printf ("%c", ch[ans1+1]); printf ("%c", ch[ans2+1]); printf ("\ n"); }    return 0;}

Hdu 5099 Comparison of Android versions enumeration test instructions

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.