2016ACM/ICPC亚洲区青岛站

hdu5982 Relic Discovery (签到题)

#include<iostream>
#include<cstdio>
#include<algorithm>
using namespace std;
typedef long long ll;

int main(){
    int t,a,b,sum;
    scanf("%d",&t);
    while(t--){
        sum=0;
        scanf("%d%d",&a,&b);
        sum=a+b+max(a,b);
        printf("%d\n",sum);
    }

    return 0;
}

hdu5983 Pocket Cube (签到题)

#include<iostream>
#include<cstdio>
#include<algorithm>
#include<string>
using namespace std;
typedef long long ll;
string s;


int main(){
    int n,sum;
    scanf("%d",&n);
    while(n--){
        sum=0;
        cin>>s;
        int len=s.length();
        for(int i=0;i<len;i++){
            if(s[i]=='H') sum++;
            else if(s[i]=='O') sum+=16;
            else sum+=12;
        }
        printf("%d\n",sum);
    }

    return 0;
}

hdu5984 Pocky

hdu5985 Lucky Coins

hdu5986 Fibonacci

hdu5987 Lambda Calculus

hdu5988 Coding Contest

hdu5989 Pattern

hdu5990 Travel Brochure

hdu5991 Cliques

hdu5992 Finding Hotels

hdu5993 Tower Attack

hdu5994 Generator and Monitor

 

相关文章:

  • 2022-12-23
  • 2021-12-17
  • 2022-12-23
  • 2018-10-27
  • 2021-11-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-03
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-21
  • 2021-05-28
  • 2021-04-12
相关资源
相似解决方案