제출 #523742

#제출 시각아이디문제언어결과실행 시간메모리
523742mansurGap (APIO16_gap)C++17
컴파일 에러
0 ms0 KiB
#include<bits/stdc++.h> #include "gap.h" #pragma optimize ("g",on) #pragma GCC optimize ("inline") #pragma GCC optimize ("Ofast") #pragma GCC optimize ("unroll-loops") #pragma GCC optimize ("03") #pragma GCC target ("sse,sse2,sse3,ssse3,sse4,popcnt,abm,avx2,mmx,fma,avx,tune=native") //01001101 01100001 01101011 01101000 01100001 01100111 01100001 01111001 using namespace std; #define all(a) a.begin(), a.end() #define rall(a) a.rbegin(), a.rend() #define ll long long #define pb push_back #define sz(a) a.size() #define nl '\n' #define popb pop_back() #define ld double #define ull unsigned long long #define ff first #define ss second #define fix fixed << setprecision #define pii pair<int, int> #define E exit (0) #define int long long const int inf = 1e18; int findGap(int t, int n) { int li, lj; int i, j; MinMax(0, inf, li, lj); int ans = 0; while (li < lj) { MinMax(li, lj, i, j); ans = max(ans, i - li); ans = max(ans, lj - j); li = i, lj = j; } return ans; }

컴파일 시 표준 에러 (stderr) 메시지

gap.cpp:5: warning: ignoring '#pragma optimize ' [-Wunknown-pragmas]
    5 | #pragma optimize ("g",on)
      | 
gap.cpp: In function 'long long int findGap(long long int, long long int)':
gap.cpp:37:17: error: invalid conversion from 'long long int' to 'long long int*' [-fpermissive]
   37 |  MinMax(0, inf, li, lj);
      |                 ^~
      |                 |
      |                 long long int
In file included from gap.cpp:3:
gap.h:1:35: note:   initializing argument 3 of 'void MinMax(long long int, long long int, long long int*, long long int*)'
    1 | void MinMax(long long, long long, long long*, long long*);
      |                                   ^~~~~~~~~~
gap.cpp:37:21: error: invalid conversion from 'long long int' to 'long long int*' [-fpermissive]
   37 |  MinMax(0, inf, li, lj);
      |                     ^~
      |                     |
      |                     long long int
In file included from gap.cpp:3:
gap.h:1:47: note:   initializing argument 4 of 'void MinMax(long long int, long long int, long long int*, long long int*)'
    1 | void MinMax(long long, long long, long long*, long long*);
      |                                               ^~~~~~~~~~
gap.cpp:40:18: error: invalid conversion from 'long long int' to 'long long int*' [-fpermissive]
   40 |   MinMax(li, lj, i, j);
      |                  ^
      |                  |
      |                  long long int
In file included from gap.cpp:3:
gap.h:1:35: note:   initializing argument 3 of 'void MinMax(long long int, long long int, long long int*, long long int*)'
    1 | void MinMax(long long, long long, long long*, long long*);
      |                                   ^~~~~~~~~~
gap.cpp:40:21: error: invalid conversion from 'long long int' to 'long long int*' [-fpermissive]
   40 |   MinMax(li, lj, i, j);
      |                     ^
      |                     |
      |                     long long int
In file included from gap.cpp:3:
gap.h:1:47: note:   initializing argument 4 of 'void MinMax(long long int, long long int, long long int*, long long int*)'
    1 | void MinMax(long long, long long, long long*, long long*);
      |                                               ^~~~~~~~~~