6032 2023. 10. 28 00:03:46 xxx Könyvkupac cpp14 Forditási hiba
// @check-accepted: examples no-limits
#include <iostream>

static void move(int amount, int from, int to) {
    std::cout << amount << ' ' << from << ' ' << to << '\n';
}

int main() {
    int n;
    std::cin >> n;

    for (int i = 0; i < (n + 1) / 2; ++i) {
        move(1, 0, 1);
    }
    move(n / 2, 0, 1);
	for (int i = 0; i < n / 2; ++i) {
		move(1, 1, 0);
	}
    move(n / 2, 0, 1);
    cout << 1 << " " << 0 << " " << 1 << "\n";
    cout << 1 << " " << 1 << " " << 0 << "\n";
}
Forditási hiba
exit status 1
main.cpp: In function 'int main()':
main.cpp:20:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   20 |     cout << 1 << " " << 0 << " " << 1 << "\n";
      |     ^~~~
      |     std::cout
In file included from main.cpp:2:
/usr/include/c++/11/iostream:61:18: note: 'std::cout' declared here
   61 |   extern ostream cout;          /// Linked to standard output
      |                  ^~~~
Exited with error status 1