Submission #609514

# Submission time Handle Problem Language Result Execution time Memory
609514 2022-07-27T16:37:14 Z sword060 Gap (APIO16_gap) C++17
Compilation error
0 ms 0 KB
#include <bits/stdc++.h>
#include "gap.h"
using namespace std;
vector<long long>a;
long long findGap(int q,int x){ 
  long long c=0,v=1e18,zz=x;
    while(zz&&c<=v){
      long long l,r;
      MinMax(c,v,&l,&r);
      if(l==-1)break;
      a.push_back(l);a.push_back(r);
      c=l+1;v=r-1;zz-=2;
    }
  sort(a.begin(),a.end());
  long long ret=0;
  for(int i=0;i<(int)a.size()-1;i++)ret=max(ret,a[i+1]-a[i]);
  return ret;
}

Compilation message

gap.cpp:11:2: error: extended character   is not valid in an identifier
   11 |       a.push_back(l);a.push_back(r);
      |  ^
gap.cpp:11:5: error: extended character   is not valid in an identifier
   11 |       a.push_back(l);a.push_back(r);
      |    ^
gap.cpp:11:8: error: extended character   is not valid in an identifier
   11 |       a.push_back(l);a.push_back(r);
      |      ^
gap.cpp: In function 'long long int findGap(int, int)':
gap.cpp:11:2: error: '\U000000a0' was not declared in this scope
   11 |       a.push_back(l);a.push_back(r);
      |  ^