Submission #815923

#TimeUsernameProblemLanguageResultExecution timeMemory
815923vjudge1Self Study (JOI22_ho_t2)C++17
10 / 100
50 ms11400 KiB
#include <bits/stdc++.h> #define int long long using namespace std; void open(){ if(fopen("input.inp", "r")){ freopen("input.inp", "r", stdin); //freopen("output.out", "w", stdout); } } const int maxn = 3e5 + 5; int n, m; int A[maxn], B[maxn]; signed main(){ ios_base::sync_with_stdio(false); cin.tie(NULL); open(); cin >> n >> m; for(int i = 1; i <= n; i++){ cin >> A[i]; } for(int i = 1; i <= n; i++){ cin >> B[i]; } if(m == 1){ int result = 1e9 + 7; for(int i = 1; i <= n; i++){ result = min(result, max(A[i], B[i])); } cout << result << endl; return 0; } return 0; }

Compilation message (stderr)

Main.cpp: In function 'void open()':
Main.cpp:8:10: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
    8 |   freopen("input.inp", "r", stdin);
      |   ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...