What wrong in my Code

Compilers and parsers | CodeChef
#include<bits/stdc++.h>
#define ll long long int
using namespace std;
void test()
{
int t;
cin>>t;
while(t–)
{
int count=0,count1=0,cnt=0;
string s;
cin>>s;
stackst;
for(int i=0;i<s.size();i++)
{
if(s[i]==‘<’)
{
st.push(s[i]);
}
else
{
if(st.empty())
{
break;
}
else
{
st.pop();
count+=2;
}
}
}
cout<<count<<endl;
}
}
int main()
{
ios_base::sync_with_stdio(0);
cin.tie(0); cout.tie(0);
test();
}

Please either format your code or (better!) link to your submission - the forum software has mangled it and it won’t compile! :slight_smile:

1 Like

Thanks! COMPILER - Editorial - #65 by ssjgz