제출 #119515

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

typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;

#define FOR(i,a) for (int i=0;i<(a);++i)
#define FORD(i,a) for (int i=(a)-1;i>=0;i--)
#define FORT(i,a,b) for (int i=(a);i<=(b);++i)
#define FORTD(i,b,a) for (int i=(b);i>=(a);--i)
#define trav(i,v) for (auto i : v)
#define all(v) v.begin(),v.end()
#define ad push_back
#define fr first
#define sc second
#define mpr(a,b) make_pair(a,b)
#define pir pair<int,int>
#define all(v) v.begin(),v.end()
#define make_unique(v) v.erase(unique(all(v),v.end()))
#define fastio ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);
#define dbg(x);
#define dbgv(v);
#define srng mt19937 rng(chrono::steady_clock::now().time_since_epoch().count())
#define y1 EsiHancagorcRepa
#ifdef ALEXPC
#define dbg(x); cout<<#x<<" = "<<x<<endl
#define dbgv(v); cout<<#v<<" = ["; trav(tv,v)cout<<"tv,";cout<<"]"<<endl
#endif

//const int N=100,M=N*N;
const ll MOD=1000*1000*1000+7;

const int N=1e5+6;

int main(){
    fastio;
    srng;
    int n=get_n(),ans=0;
    FOR(i1,n){
        bool bl=false;
        FORT(i2,i1+1,n-1){
            int tv=0;
            FOR(i,n){
                if (i==i1 || i==i2)continue;
                tv+=is_clockwise(i1+1,i2+1,i+1);
            }
            if (tv==n-2 || tv==0)bl=true;
        }
        ans+=bl;
    }
    give_answer(ans);
    return 0;
}

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

tri.cpp: In function 'int main()':
tri.cpp:39:11: error: 'get_n' was not declared in this scope
     int n=get_n(),ans=0;
           ^~~~~
tri.cpp:39:11: note: suggested alternative: 'getwc'
     int n=get_n(),ans=0;
           ^~~~~
           getwc
tri.cpp:46:21: error: 'is_clockwise' was not declared in this scope
                 tv+=is_clockwise(i1+1,i2+1,i+1);
                     ^~~~~~~~~~~~
tri.cpp:46:21: note: suggested alternative: 'funlockfile'
                 tv+=is_clockwise(i1+1,i2+1,i+1);
                     ^~~~~~~~~~~~
                     funlockfile
tri.cpp:50:9: error: 'ans' was not declared in this scope
         ans+=bl;
         ^~~
tri.cpp:50:9: note: suggested alternative: 'abs'
         ans+=bl;
         ^~~
         abs
tri.cpp:52:17: error: 'ans' was not declared in this scope
     give_answer(ans);
                 ^~~
tri.cpp:52:17: note: suggested alternative: 'abs'
     give_answer(ans);
                 ^~~
                 abs
tri.cpp:52:5: error: 'give_answer' was not declared in this scope
     give_answer(ans);
     ^~~~~~~~~~~