207852026-01-08 21:49:13KosAKosHullámvasút építéscpp17Compilation error
#include <iostream>

using namespace std;

int N,Sebess,Plusz,Csere;
char S[100];

int main()
{
    cin >> N;
    for (int i=0;i<N;i++)
    {
        cin >> S[i];
        if (S[i] == 'D') {
            Sebess+=9;
        }
        if (S[i] == 'U') {
            Sebess-=11;
        }
        if (S[i] == 'H') {
            Plusz++;
        }
        if (S[i] == 'B') {
            Sebess+=10;
        }
        
        while (Sebess < 0 && Plusz > 0)
        {
            Sebess+=10;
            Plusz--;
            Csere++;
        }
        
        if (Sebess =< 0) {
            cout << "-1";
            return 0;
        }
    }
    
    cout << Csere;
    
    
    
    
    return 0;
}
Compilation error
open /var/local/lib/isolate/439/box/a.out: no such file or directory
main.cpp: In function 'int main()':
main.cpp:34:21: error: expected primary-expression before '<' token
   34 |         if (Sebess =< 0) {
      |                     ^