Submission #1304727

#TimeUsernameProblemLanguageResultExecution timeMemory
1304727dshfjkaMeasures (CEOI22_measures)C++20
Compilation error
0 ms0 KiB
include <bits/stdc++.h>
#define LL long long
using namespace std;
int main(){
    LL N,M,D;
    cin >> N >> M >> D;
    LL B,pref=0,ans=0;
    for (int i=0;i<M;i++) {
        cin >> B;
        B -= D*i;
        pref = max(pref, B);
        ans = max(ans, pref-B);
        cout << ans/2;
        if (ans % 2 == 1) {
            cout << ".5";
        }
        cout << " ";
    }
}

Compilation message (stderr)

Main.cpp:1:10: error: 'bits' was not declared in this scope
    1 | include <bits/stdc++.h>
      |          ^~~~
Main.cpp:1:15: error: 'stdc' was not declared in this scope; did you mean 'std'?
    1 | include <bits/stdc++.h>
      |               ^~~~
      |               std
Main.cpp:1:10: error: 'bits' was not declared in this scope
    1 | include <bits/stdc++.h>
      |          ^~~~
Main.cpp:1:15: error: 'stdc' was not declared in this scope; did you mean 'std'?
    1 | include <bits/stdc++.h>
      |               ^~~~
      |               std
Main.cpp:1:10: error: 'bits' was not declared in this scope
    1 | include <bits/stdc++.h>
      |          ^~~~
Main.cpp:1:15: error: 'stdc' was not declared in this scope; did you mean 'std'?
    1 | include <bits/stdc++.h>
      |               ^~~~
      |               std
Main.cpp:1:10: error: 'bits' was not declared in this scope
    1 | include <bits/stdc++.h>
      |          ^~~~
Main.cpp:1:15: error: 'stdc' was not declared in this scope; did you mean 'std'?
    1 | include <bits/stdc++.h>
      |               ^~~~
      |               std
Main.cpp:1:10: error: 'bits' was not declared in this scope
    1 | include <bits/stdc++.h>
      |          ^~~~
Main.cpp:1:15: error: 'stdc' was not declared in this scope; did you mean 'std'?
    1 | include <bits/stdc++.h>
      |               ^~~~
      |               std
Main.cpp:1:10: error: 'bits' was not declared in this scope
    1 | include <bits/stdc++.h>
      |          ^~~~
Main.cpp:1:15: error: 'stdc' was not declared in this scope; did you mean 'std'?
    1 | include <bits/stdc++.h>
      |               ^~~~
      |               std
Main.cpp:1:10: error: 'bits' was not declared in this scope
    1 | include <bits/stdc++.h>
      |          ^~~~
Main.cpp:1:15: error: 'stdc' was not declared in this scope; did you mean 'std'?
    1 | include <bits/stdc++.h>
      |               ^~~~
      |               std
Main.cpp:1:10: error: 'bits' was not declared in this scope
    1 | include <bits/stdc++.h>
      |          ^~~~
Main.cpp:1:15: error: 'stdc' was not declared in this scope; did you mean 'std'?
    1 | include <bits/stdc++.h>
      |               ^~~~
      |               std
Main.cpp:1:10: error: 'bits' was not declared in this scope
    1 | include <bits/stdc++.h>
      |          ^~~~
Main.cpp:1:15: error: 'stdc' was not declared in this scope; did you mean 'std'?
    1 | include <bits/stdc++.h>
      |               ^~~~
      |               std
Main.cpp:1:1: error: 'include' does not name a type
    1 | include <bits/stdc++.h>
      | ^~~~~~~
Main.cpp: In function 'int main()':
Main.cpp:6:5: error: 'cin' was not declared in this scope
    6 |     cin >> N >> M >> D;
      |     ^~~
Main.cpp:11:16: error: 'max' was not declared in this scope
   11 |         pref = max(pref, B);
      |                ^~~
Main.cpp:13:9: error: 'cout' was not declared in this scope
   13 |         cout << ans/2;
      |         ^~~~