Submission #288989

#TimeUsernameProblemLanguageResultExecution timeMemory
288989shrek12357Gap (APIO16_gap)C++14
0 / 100
51 ms1200 KiB
#include <iostream> #include <vector> #include <algorithm> #include <string> #include <map> #include <set> #include <climits> #include <cmath> #include <fstream> #include <queue> #include "gap.h" using namespace std; long long findGap(int t, int n){ if (t == 2) { return 0; } long long max = 1e18 + 1; long long pre = 0; long long ans = 0; for (int i = 0; i < n; i++) { long long mn, mx; MinMax(1, max, &mn, &mx); if (i == 0) { pre = mx; } else { if(pre - mx > ans){ ans = pre-mx; } pre=mx; } } return ans; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...