Submission #1199553

#TimeUsernameProblemLanguageResultExecution timeMemory
1199553InvMOD라멘 (JOI14_ramen)C++17
Compilation error
0 ms0 KiB
#include<bits/stdc++.h> using namespace std; void Ramen(int n){ int Mx = 0, Mn = 1; if(Compare(0, 1) < 0) swap(Mx, Mn); for(int i = 2; i < n; i += 2){ int j1 = i, j2 = i + 1; if(Compare(j1, j2) < 0) swap(j1, j2); if(Compare(j1, Mx) > 0) Mx = j1; if(Compare(j2, Mn) < 0) Mn = j2; } if((n&1)){ if(Compare(n - 1, Mx) > 0) Mx = n - 1; if(Compare(n - 1, Mn) < 0) Mn = n - 1; } Answer(Mn, Mx); }

Compilation message (stderr)

ramen.cpp: In function 'void Ramen(int)':
ramen.cpp:8:6: error: 'Compare' was not declared in this scope
    8 |   if(Compare(0, 1) < 0) swap(Mx, Mn);
      |      ^~~~~~~
ramen.cpp:12:8: error: 'Compare' was not declared in this scope
   12 |     if(Compare(j1, j2) < 0) swap(j1, j2);
      |        ^~~~~~~
ramen.cpp:14:8: error: 'Compare' was not declared in this scope
   14 |     if(Compare(j1, Mx) > 0) Mx = j1;
      |        ^~~~~~~
ramen.cpp:15:8: error: 'Compare' was not declared in this scope
   15 |     if(Compare(j2, Mn) < 0) Mn = j2;
      |        ^~~~~~~
ramen.cpp:19:8: error: 'Compare' was not declared in this scope
   19 |     if(Compare(n - 1, Mx) > 0) Mx = n - 1;
      |        ^~~~~~~
ramen.cpp:20:8: error: 'Compare' was not declared in this scope
   20 |     if(Compare(n - 1, Mn) < 0) Mn = n - 1;
      |        ^~~~~~~
ramen.cpp:22:3: error: 'Answer' was not declared in this scope
   22 |   Answer(Mn, Mx);
      |   ^~~~~~