QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#798425#9787. Shrek's Song of the SwampHuangHanShengCompile Error//C++20557b2024-12-04 13:41:242024-12-04 13:41:26

Details

answer.code:1:1: error: expected unqualified-id before ‘?’ token
    1 | ?include <bits/stdc++.h>
      | ^
answer.code: In function ‘int main()’:
answer.code:8:9: error: ‘ios’ has not been declared
    8 |         ios::sync_with_stdio(false);
      |         ^~~
answer.code:9:9: error: ‘cin’ was not declared in this scope
    9 |         cin.tie(nullptr);
      |         ^~~
answer.code:14:9: error: ‘vector’ was not declared in this scope
   14 |         vector<int> a(n);
      |         ^~~~~~
answer.code:14:16: error: expected primary-expression before ‘int’
   14 |         vector<int> a(n);
      |                ^~~
answer.code:16:24: error: ‘a’ was not declared in this scope
   16 |                 cin >> a[i];
      |                        ^
answer.code:19:9: error: ‘set’ was not declared in this scope
   19 |         set<int> s;
      |         ^~~
answer.code:19:13: error: expected primary-expression before ‘int’
   19 |         set<int> s;
      |             ^~~
answer.code:23:21: error: ‘a’ was not declared in this scope
   23 |                 if (a[i] == pre || s.find(a[i]) != s.end()) {
      |                     ^
answer.code:23:36: error: ‘s’ was not declared in this scope
   23 |                 if (a[i] == pre || s.find(a[i]) != s.end()) {
      |                                    ^
answer.code:38:9: error: ‘cout’ was not declared in this scope
   38 |         cout << ans << "\n";
      |         ^~~~