markdown AtCoder初学者比赛089

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了markdown AtCoder初学者比赛089相关的知识,希望对你有一定的参考价值。

#include <iostream>
#include <stdio.h>
#include <string>
#include <vector>

using namespace std;

int main(){
  unsigned long long N = 0;
  unsigned long long M=0, A=0, R=0, C=0, H=0;
  cin >> N;
  string s;
  for(int i=0; i<N; i++){
    cin >> s;
    if(s[0]=='M'){
      M+=1;
    }else if(s[0]=='A'){
      A+=1;
    }else if(s[0]=='R'){
      R+=1;
    }else if(s[0]=='C'){
      C+=1;
    }else if(s[0]=='H'){
      H+=1;
    }
  }
  unsigned long long sum = 0;
  sum += M * A * R;
  sum += M * A * C;
  sum += M * A * H;
  sum += M * R * C;
  sum += M * R * H;
  sum += M * C * H;
  sum += A * R * C;
  sum += A * R * H;
  sum += A * C * H;
  sum += R * C * H;
  printf("%llu\n", sum);
  return 0;
}
#include <iostream>
#include <stdio.h>
#include <string>
#include <set>

using namespace std;

int main(){
  int N = 0;
  set<string> st;
  cin >> N;
  string s;
  for(int i=0; i<N; i++){
    cin >> s;
    st.insert(s);
  }

  if(int(st.size())==3){
    printf("Three\n");
  }else if(int(st.size())==4){
    printf("Four\n");
  }
  return 0;
}
#include <iostream>
#include <stdio.h>

using namespace std;

int main(){
  int N = 0;
  cin >> N;
  printf("%d\n", int(N/3));
}
https://beta.atcoder.jp/contests/abc089/tasks

以上是关于markdown AtCoder初学者比赛089的主要内容,如果未能解决你的问题,请参考以下文章

AtCoder Regular Contest 089 D - Checker 思维题点的转移二维前缀和

Atcoder 比赛/补题记录榜

2018.03.04 晚上Atcoder比赛

比赛 AtCoder Beginner Contest 171

比赛总结——atcoder beginner contest 109

markdown AtCoder常规大赛090