Saleh127

codeforces 1140B.cpp

Jun 1st, 2020
145
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3. #define test int t; cin>>t; while (t--)
  4. #define ll long long int
  5. #define pi acos(-1)
  6. int main()
  7. {
  8. test
  9. {
  10. int c,d=0,e=0,f,i,j,k,l;
  11. string a;
  12. cin>>c;
  13. cin>>a;
  14. e=c-1;
  15. for(i=0;i<c;i++)
  16. {
  17. if(a[i]=='>' || a[c-i-1]=='<')
  18. {
  19. e=min(e,i);
  20. }
  21. }
  22. cout<<e<<endl;
  23. }
  24.  
  25. return 0;
  26. }
Advertisement
Add Comment
Please, Sign In to add comment