Submission #690952

#TimeUsernameProblemLanguageResultExecution timeMemory
690952mohammedMonemJob Scheduling (CEOI12_jobs)C++17
0 / 100
4 ms596 KiB
#include<bits/stdc++.h>
[[maybe_unused]] typedef long long ll;
[[maybe_unused]] const int N = (int) 1e6 + 20;
[[maybe_unused]] const int mod = (int) 1e9 + 7;
[[maybe_unused]] char endl = '\n';
[[maybe_unused]] char space = ' ';
[[maybe_unused]] const int off = 1 << 18;
void Run();

int main()
{
    Run();

    //in
    int t = 1;
//    std::cin >> t;
    while (t--) {
        int n,d,m;
        std::cin >> n >> d >> m;
        std::vector<int> v(m);
        for (auto &item: v) {
            std::cin >> item;
        }

        //ops


        //out
        std::cout << *std::max_element(v.begin(), v.end());
    }

    return 0;
}
void Run(){
    std::ios_base::sync_with_stdio(false);std::cin.tie(nullptr);std::cout.tie(nullptr);
#ifndef ONLINE_JUDGE
     freopen("input.txt","r",stdin);
     freopen("output.txt","w",stdout);
#endif
}

Compilation message (stderr)

jobs.cpp: In function 'void Run()':
jobs.cpp:37:13: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
   37 |      freopen("input.txt","r",stdin);
      |      ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
jobs.cpp:38:13: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
   38 |      freopen("output.txt","w",stdout);
      |      ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...