Submission #2173459


Source Code Expand

#include <iostream>  
#include <string.h>  
using namespace std;  
char A[104],B[105],C[105];  
int main()  
{  
    int a,b,c;  
    int la,lb,lc;  
  
    while(cin>>A>>B>>C)  
    {  
        int tmp;  
        la=strlen(A);  
        lb=strlen(B);  
        lc=strlen(C);  
        tmp=1;  
        a=b=c=-1;  
        while(1)  
        {  
            if(a==la)  
            {  
                cout<<"A"<<endl;  
                break;  
            }  
            else if(b==lb)  
            {  
                cout<<"B"<<endl;  
                break;  
            }  
            else if(c==lc)  
            {  
                cout<<"C"<<endl;  
                break;  
            }  
            if(tmp==1)  
            {  
                  a++;  
                tmp=A[a]-'a'+1;  
  
  
            }  
            else if(tmp==2)  
            {  
                 b++;  
                tmp=B[b]-'a'+1;  
  
            }  
            else if(tmp==3)  
            {  
               c++;  
                tmp=C[c]-'a'+1;  
  
            }  
        }  
        cout<<(a+b)*h/2<<endl;  
    }  
    return 0;  
}  

Submission Info

Submission Time
Task A - センター採点
User luogu_bot1
Language C++ (GCC 5.4.1)
Score 0
Code Size 1199 Byte
Status CE

Compile Error

./Main.cpp: In function ‘int main()’:
./Main.cpp:55:21: error: ‘h’ was not declared in this scope
         cout<<(a+b)*h/2<<endl;  
                     ^