Submission details
Task:TLE on Train Schedule
Sender:Dereden
Submission time:2025-11-24 17:18:19 +0200
Language:C++ (C++17)
Status:COMPILE ERROR

Compiler report

input/code.cpp: In function 'int main()':
input/code.cpp:19:22: error: 'sqrt' was not declared in this scope
   19 |         int a = (int)sqrt(i);
      |                      ^~~~

Code

#include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <climits>

typedef long long ll;

using namespace std;

int main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);

    // freopen("input.txt", "w", stdout); // TODO: REMOVE THIS YOU STUPID ****
    int n = 1e5;
    cout << n << '\n';
    for (int i = 0; i < n; i++) {
        int a = (int)sqrt(i);
        if (a < 1) a = 1;
        cout << a << " ";
    }
}