/ SeriousOJ /

Record Detail

Compile Error

foo.cc:39:2: error: stray '#' in program
   39 | }#include <bits/stdc++.h>
      |  ^
foo.cc:39:12: error: 'bits' was not declared in this scope
   39 | }#include <bits/stdc++.h>
      |            ^~~~
foo.cc:39:17: error: 'stdc' was not declared in this scope; did you mean 'std'?
   39 | }#include <bits/stdc++.h>
      |                 ^~~~
      |                 std
foo.cc:39:12: error: 'bits' was not declared in this scope
   39 | }#include <bits/stdc++.h>
      |            ^~~~
foo.cc:39:17: error: 'stdc' was not declared in this scope; did you mean 'std'?
   39 | }#include <bits/stdc++.h>
      |                 ^~~~
      |                 std
foo.cc:39:12: error: 'bits' was not declared in this scope
   39 | }#include <bits/stdc++.h>
      |            ^~~~
foo.cc:39:17: error: 'stdc' was not declared in this scope; did you mean 'std'?
   39 | }#include <bits/stdc++.h>
      |                 ^~~~
      |                 std
foo.cc:39:12: error: 'bits' was not declared in this scope
   39 | }#include <bits/stdc++.h>
      |            ^~~~
foo.cc:39:17: error: 'stdc' was not declared in this scope; did you mean 'std'?
   39 | }#include <bits/stdc++.h>
      |                 ^~~~
      |                 std
foo.cc:39:12: error: 'bits' was not declared in this scope
   39 | }#include <bits/stdc++.h>
      |            ^~~~
foo.cc:39:17: error: 'stdc' was not declared in this scope; did you mean 'std'?
   39 | }#include <bits/stdc++.h>
      |                 ^~~~
      |                 std
foo.cc:39:12: error: 'bits' was not declared in this scope
   39 | }#include <bits/stdc++.h>
      |            ^~~~
foo.cc:39:17: error: 'stdc' was not declared in this scope; did you mean 'std'?
   39 | }#include <bits/stdc++.h>
      |                 ^~~~
      |                 std
foo.cc:39:12: error: 'bits' was not declared in this scope
   39 | }#include <bits/stdc++.h>
      |            ^~~~
foo.cc:39:17: error: 'stdc' was not declared in this scope; did you mean 'std'?
   39 | }#include <bits/stdc++.h>
      |                 ^~~~
      |                 std
foo.cc:39:12: error: 'bits' was not declared in this scope
   39 | }#include <bits/stdc++.h>
      |            ^~~~
foo.cc:39:17: error: 'stdc' was not declared in this scope; did you mean 'std'?
   39 | }#include <bits/stdc++.h>
      |                 ^~~~
      |                 std
foo.cc:39:12: error: 'bits' was not declared in this scope
   39 | }#include <bits/stdc++.h>
      |            ^~~~
foo.cc:39:17: error: 'stdc' was not declared in this scope; did you mean 'std'?
   39 | }#include <bits/stdc++.h>
      |                 ^~~~
      |                 std
foo.cc:39:3: error: 'include' does not name a type
   39 | }#include <bits/stdc++.h>
      |   ^~~~~~~
foo.cc:50:6: error: redefinition of 'void messi()'
   50 | void messi()
      |      ^~~~~
foo.cc:12:6: note: 'void messi()' previously defined here
   12 | void messi()
      |      ^~~~~
foo.cc:66:5: error: redefinition of 'int main()'
   66 | int main()
      |     ^~~~
foo.cc:28:5: note: 'int main()' previously defined here
   28 | int main()
      |     ^~~~

Code

#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define sp " "
#define YES cout << "YES" << endl
#define NO cout << "NO" << endl
#define Yes cout << "Yes" << endl
#define No cout << "No" << endl
#define yes cout << "yes" << endl
#define no cout << "no" << endl

void messi()
{
    string s;
    cin >> s;
    while (s.length() > 1)
    {
        for (int i = 0; i < s.size(); i++)
        {
            if (i % 2 == 1)
            {
                s.erase(s.begin() + i);
            }
        }
    }
    cout << s << endl;
}
int main()
{
    ios::sync_with_stdio(false);
    cin.tie(NULL);
    ll tc = 1;
    cin >> tc;
    while (tc--)
    {
        messi();
    }
    return 0;
}#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define sp " "
#define YES cout << "YES" << endl
#define NO cout << "NO" << endl
#define Yes cout << "Yes" << endl
#define No cout << "No" << endl
#define yes cout << "yes" << endl
#define no cout << "no" << endl

void messi()
{
    string s;
    cin >> s;
    while (s.length() > 1)
    {
        for (int i = 0; i < s.size(); i++)
        {
            if (i % 2 == 1)
            {
                s.erase(s.begin() + i);
            }
        }
    }
    cout << s << endl;
}
int main()
{
    ios::sync_with_stdio(false);
    cin.tie(NULL);
    ll tc = 1;
    cin >> tc;
    while (tc--)
    {
        messi();
    }
    return 0;
}

Information

Submit By
Type
Submission
Problem
P1080 String Algorithm
Contest
Bangladesh 2.0
Language
C++20 (G++ 13.2.0)
Submit At
2024-08-16 15:38:01
Judged At
2024-11-11 03:18:22
Judged By
Score
0
Total Time
0ms
Peak Memory
0 Bytes