Submission #1299413

#TimeUsernameProblemLanguageResultExecution timeMemory
1299413tamzidGap (APIO16_gap)C++20
Compilation error
0 ms0 KiB
#include <bits/stdc++.h>
#include "gap.h"
using namespace std;

long long findGap(int T, int N)
{
	if(T == 1) {
		l = 0, r = 1e18;
		int i = 0, j = N - 1;
		vector<int> a(N);
		while(i <= j) {
			ll mn, mx;
			MinMax(l, r, mn, mx);
			a[i] = mn;
			a[j] = mx;
			++i;
			--j;
		}
	}
}

Compilation message (stderr)

gap.cpp: In function 'long long int findGap(int, int)':
gap.cpp:8:17: error: 'l' was not declared in this scope
    8 |                 l = 0, r = 1e18;
      |                 ^
gap.cpp:8:24: error: 'r' was not declared in this scope
    8 |                 l = 0, r = 1e18;
      |                        ^
gap.cpp:12:25: error: 'll' was not declared in this scope
   12 |                         ll mn, mx;
      |                         ^~
gap.cpp:13:38: error: 'mn' was not declared in this scope; did you mean 'yn'?
   13 |                         MinMax(l, r, mn, mx);
      |                                      ^~
      |                                      yn
gap.cpp:13:42: error: 'mx' was not declared in this scope
   13 |                         MinMax(l, r, mn, mx);
      |                                          ^~
gap.cpp:20:1: warning: no return statement in function returning non-void [-Wreturn-type]
   20 | }
      | ^