Submission #1277809

#TimeUsernameProblemLanguageResultExecution timeMemory
1277809dostsMensza (COI22_mensza)C++20
Compilation error
0 ms0 KiB
        if (s == "alojzije") {
            int a;
            cin >> a;
            int x = 1;
            vi v;
            for (int j = limbo;j>=0;j--) {
                x<<=1;
                if (a&(1<<j)) x|=1;
                v.push_back(x);
            }
            sort(all(v));
            cout << big(v) << ' ';
            for (auto it : v) cout << it << ' ';
            cout << endl;
        }
        if (s == "benjamin") {
            int b;
            cin >> b;
            int x = 1;
            vi v;
            for (int j = limbo;j>=0;j--) {
                x<<=1;
                if (b&(1<<j)) {
                    x|=1;
                } else {
                    v.push_back(x^1);
                }
            }
            cout << big(v) << ' ';
            sort(all(v));
            for (auto it : v) cout << it << ' ';
            cout << endl;
        }
        if (s == "cecilija") {
            int lc;
            cin >> lc;
            vi v(lc);
            for (auto& it : v) cin >> it;
            if (v.back() == 2) cout << "A" << endl;
            else cout << "B" << endl;
        }

Compilation message (stderr)

Main.cpp:1:9: error: expected unqualified-id before 'if'
    1 |         if (s == "alojzije") {
      |         ^~
Main.cpp:16:9: error: expected unqualified-id before 'if'
   16 |         if (s == "benjamin") {
      |         ^~
Main.cpp:34:9: error: expected unqualified-id before 'if'
   34 |         if (s == "cecilija") {
      |         ^~