Submission #928017

# Submission time Handle Problem Language Result Execution time Memory
928017 2024-02-15T17:34:14 Z EJIC_B_KEDAX Comparing Plants (IOI20_plants) C++17
Compilation error
0 ms 0 KB
#include <bits/stdc++.h>

#define x first
#define y second

using ll = long long

using namespace std;

void solve();

int main() {
#ifndef LOCAL
    cin.tie(nullptr)->sync_with_stdio(false);
#endif
    cout << fixed << setprecision(30);
    int t = 1;
    // cin >> t;
    while (t--) {
        solve();
    }
}

void solve() {
    cout << "00\n";
}

Compilation message

plants.cpp:6:21: error: expected ';' before 'using'
    6 | using ll = long long
      |                     ^
      |                     ;
    7 | 
    8 | using namespace std;
      | ~~~~~                
plants.cpp: In function 'int main()':
plants.cpp:14:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
   14 |     cin.tie(nullptr)->sync_with_stdio(false);
      |     ^~~
      |     std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:75,
                 from plants.cpp:1:
/usr/include/c++/10/iostream:60:18: note: 'std::cin' declared here
   60 |   extern istream cin;  /// Linked to standard input
      |                  ^~~
plants.cpp:16:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   16 |     cout << fixed << setprecision(30);
      |     ^~~~
      |     std::cout
In file included from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:75,
                 from plants.cpp:1:
/usr/include/c++/10/iostream:61:18: note: 'std::cout' declared here
   61 |   extern ostream cout;  /// Linked to standard output
      |                  ^~~~
plants.cpp:16:13: error: 'fixed' was not declared in this scope
   16 |     cout << fixed << setprecision(30);
      |             ^~~~~
plants.cpp:16:13: note: suggested alternatives:
In file included from /usr/include/c++/10/ios:42,
                 from /usr/include/c++/10/istream:38,
                 from /usr/include/c++/10/sstream:38,
                 from /usr/include/c++/10/complex:45,
                 from /usr/include/c++/10/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:54,
                 from plants.cpp:1:
/usr/include/c++/10/bits/ios_base.h:1048:3: note:   'std::fixed'
 1048 |   fixed(ios_base& __base)
      |   ^~~~~
In file included from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:127,
                 from plants.cpp:1:
/usr/include/c++/10/charconv:660:21: note:   'std::chars_format::fixed'
  660 |     scientific = 1, fixed = 2, hex = 4, general = fixed | scientific
      |                     ^~~~~
plants.cpp:16:22: error: 'setprecision' was not declared in this scope; did you mean 'std::setprecision'?
   16 |     cout << fixed << setprecision(30);
      |                      ^~~~~~~~~~~~
      |                      std::setprecision
In file included from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:72,
                 from plants.cpp:1:
/usr/include/c++/10/iomanip:195:3: note: 'std::setprecision' declared here
  195 |   setprecision(int __n)
      |   ^~~~~~~~~~~~
plants.cpp: In function 'void solve()':
plants.cpp:25:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   25 |     cout << "00\n";
      |     ^~~~
      |     std::cout
In file included from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:75,
                 from plants.cpp:1:
/usr/include/c++/10/iostream:61:18: note: 'std::cout' declared here
   61 |   extern ostream cout;  /// Linked to standard output
      |                  ^~~~