My issue
i cannot understand what is the error in this code, it is showing WA.
My code
#include <iostream>
using namespace std;
int main() {
// your code goes here
int t;
cin>>t;
while(t--){
long long int n,a,b;
cin>>n>>a>>b;
int sarthak=0;
int anuradha=0;
while(n--){
string s;
cin>>s;
if(s[0]=='E'||s[0]=='Q'||s[0]=='U'||s[0]=='I'||s[0]=='N'||s[0]=='O'||s[0]=='X')
{
sarthak=sarthak+a;
}
else
anuradha=anuradha+b;
}
if(sarthak>anuradha){
cout<<"SARTHAK"<<endl;
}
else if(anuradha>sarthak){
cout<<"ANURADHA"<<endl;
}
else
cout<<"DRAW"<<endl;
}
return 0;
}
Problem Link: CodeChef: Practical coding for everyone