Submission #463520

#TimeUsernameProblemLanguageResultExecution timeMemory
463520fuad27Triangles (CEOI18_tri)C++14
Compilation error
0 ms0 KiB
#include<bits/stdc++.h> #include"trilib.c" typedef long long ll; typedef long double ld; #define vii vector<pair<int, int>> #define vi vector<int> #define vl vector<long long> #define vll vector<pair<long long, long long>> #define mp make_pair #define pb push_back #define rep(i, a, b) for(int i = a;i<=b;i++) #define f first #define s second #define FIO ios_base::sync_with_stdio(0);cin.tie(0); #define start int tt;cin>>tt;rep(testcase, 1, tt) #define print(k) cout<<"Case #"<<testcase<<": "<<k<<"\n"; #define endl "\n" #define DEBUG(k) cerr<<k<<"\n"; int main () { freopen("stdin", "r", stdin); freopen("stdout", "w", stdout); int n = get_n(), ans = 0; rep(i, 1, n) { rep(j, i+1, n) { bool check = true; rep(k, 1, n) { if(k == i or k == j)continue; check &= is_clockwise(i, j, k); } ans+=check; } } give_answer(ans*2); }

Compilation message (stderr)

tri.cpp: In function 'int main()':
tri.cpp:21:9: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
   21 |  freopen("stdin", "r", stdin);
      |  ~~~~~~~^~~~~~~~~~~~~~~~~~~~~
tri.cpp:22:9: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
   22 |  freopen("stdout", "w", stdout);
      |  ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
/usr/bin/ld: /tmp/ccqBlKt2.o: in function `get_n':
tri.cpp:(.text+0x120): multiple definition of `get_n'; /tmp/cc0TBLFY.o:trilib.c:(.text+0x120): first defined here
/usr/bin/ld: /tmp/ccqBlKt2.o: in function `is_clockwise':
tri.cpp:(.text+0x190): multiple definition of `is_clockwise'; /tmp/cc0TBLFY.o:trilib.c:(.text+0x190): first defined here
/usr/bin/ld: /tmp/ccqBlKt2.o: in function `give_answer':
tri.cpp:(.text+0x2f0): multiple definition of `give_answer'; /tmp/cc0TBLFY.o:trilib.c:(.text+0x2f0): first defined here
collect2: error: ld returned 1 exit status