제출 #385773

#제출 시각아이디문제언어결과실행 시간메모리
385773mohamedsobhi777Triangles (CEOI18_tri)C++14
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h>

using namespace std;

#define vi vector<int>
#define vll vector<ll>
#define vii vector<pair<int, int>>
#define pii pair<int, int>
#define pll pair<ll, ll>
#define loop(_) for (int __ = 0; __ < (_); ++__)
#define pb push_back
#define f first
#define s second
#define sz(_) ((int)_.size())
#define all(_) _.begin(), _.end()
#define lb lower_bound
#define ub upper_bound

using ll = long long;
using ld = long double;

const int N = 1e5 + 7;
const ll mod = 1e9 + 7;

int gn;

bool ok(int x, int y)
{
       int mask = 0;
       for (int i = 1; i <= gn; ++i)
       {
              if (x == i || y == i || mask == 3)
                     continue;
              mask |= 1 << is_clockwise(x, y, i);
       }
       return mask != 3;
}

int main()
{
       ios_base::sync_with_stdio(0);
       cin.tie(0);
#ifndef ONLINE_JUDGE
#endif
       gn = get_n();

       int ans = 0;
       for (int i = 1; i <= gn; ++i)
       {
              for (int j = 1; j < i; ++j)
              {
                     ans += ok(i, j);
              }
       }
       cout << ans;
       return 0;
}

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

tri.cpp: In function 'bool ok(int, int)':
tri.cpp:34:28: error: 'is_clockwise' was not declared in this scope
   34 |               mask |= 1 << is_clockwise(x, y, i);
      |                            ^~~~~~~~~~~~
tri.cpp: In function 'int main()':
tri.cpp:45:13: error: 'get_n' was not declared in this scope
   45 |        gn = get_n();
      |             ^~~~~