Submission #106015

# Submission time Handle Problem Language Result Execution time Memory
106015 2019-04-16T08:05:34 Z yamamayumi9489 Gap (APIO16_gap) C++14
Compilation error
0 ms 0 KB
#include<iostream>
#include<utility>
#include<string>
#include<vector>
#include<algorithm>
#include<deque>
#include<queue>
#include<set>
#include<map>
#include<functional>

using namespace std;
#define LL long long
#define ALF "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
#define LLBIG 1999999999999999999
#define INTBIG 1111111111
#define MOD 1000000007
#define PI pair<int,int>
#define VI vector<int>
#define VVI vector<vector<int>>

#include"gap.h"
//MinMax(int,int,int&,int&)

long long findGap(int T, int N){
	if(T==1){
	LL A[100002];
	LL l=0, r=1000000000000000000;
	for(int i=0; i<(N+1)/2; i++)
		MinMax(l,r,A[i],A[N-1-i]);

	LL ans = 0;
	for(int i=0; i<N-1; i++)
		ans = max(ans, A[i+1] - A[i]);
	return ans;
	}
	else 
	return 0;
}

Compilation message

gap.cpp: In function 'long long int findGap(int, int)':
gap.cpp:30:17: error: invalid conversion from 'long long int' to 'long long int*' [-fpermissive]
   MinMax(l,r,A[i],A[N-1-i]);
              ~~~^
In file included from gap.cpp:22:0:
gap.h:1:6: note:   initializing argument 3 of 'void MinMax(long long int, long long int, long long int*, long long int*)'
 void MinMax(long long, long long, long long*, long long*);
      ^~~~~~
gap.cpp:30:26: error: invalid conversion from 'long long int' to 'long long int*' [-fpermissive]
   MinMax(l,r,A[i],A[N-1-i]);
                   ~~~~~~~^
In file included from gap.cpp:22:0:
gap.h:1:6: note:   initializing argument 4 of 'void MinMax(long long int, long long int, long long int*, long long int*)'
 void MinMax(long long, long long, long long*, long long*);
      ^~~~~~