hiho week 80 register

Ended

Participants:173

Verdict:Accepted
Score:100 / 100
Submitted:2016-01-11 15:44:30

Lang:G++

Edit
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#include "stdio.h"
#include <algorithm>
using namespace std;
int absv(int a)
{
    if(a>0)
        return a;
    else
        return -a;
}
bool cmp(int a,int b)
{
    if(a<b)
        return true;
    else
        return false;
}
int main()
{
    int Cr=0,Cy=0,Cb=0;
    char s[20005];
    int record=0;
    int max_num=0;
    int xyz[3];
    int ryb[3];
    scanf("%d%d%d",&xyz[0],&xyz[1],&xyz[2]);
    scanf("%s",s);
    sort(xyz,xyz+3,cmp);
    for(int i=0;s[i]!='\0';i++)
    {
        if(s[i]=='R')
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX