제출 #1275027

#제출 시각아이디문제언어결과실행 시간메모리
1275027muhammad-mutahirIsland Hopping (JOI24_island)C++20
컴파일 에러
0 ms0 KiB
#include "island.h"

#include <bits/stdc++.h>
using namespace std;

#define print(l) for(auto i:l) cout<<i<<" ";cout<<endl;
#define input(t,l,n) vector<t>l(n);for(int i = 0;i<n;i++)cin>>l[i];
#define int long long
#define pb push_back
#define ordered_set tree<int, null_type,less<int>, rb_tree_tag,tree_order_statistics_node_update> 
#define all(l) l.begin(),l.end()
#define pii pair<int,int>
#define fi first
#define se second

const int M = 998244853;

int inf = 1e18;

void io(){
    #ifndef ONLINE_JUDGE
    freopen("input.in","r",stdin);
    // freopen("outputf.in","w",stdout);
    #endif

    ios::sync_with_stdio(0);//DO NOT USE IN INTERACTIVE
    cin.tie(0), cout.tie(0);
    cout << fixed<<setprecision(9);

}


void solve(int N, int L) {
  // int variable_example = query(1, 1);
  // for (int i = 2; i <= N; i++) {
  //   answer(1, i);
  // }
  vector<vector<int>>find(N+1);
  for(int i = 1;i<=N;i++){
    for(int j = 1;j<N;j++){
      int f = query(i,j);
      find[i].pb(f);
    }
  }
  for(int i = 1;i<=N;i++){
    for(int j = i+1;j<=N;j++){

      vector<int>v1,v2;
      for(int k:find[i]){
        if(k == j)continue;
        v1.pb(k);
      }
      for(int k:find[j]){
        if(k == i)continue;
        v2.pb(k);
      }
      if(v1 == v2){
        answer(i,j);
      }
    }
  }


}




// signed main(){
//     io();
//     int t = 1;
//     while(t--) solve();

// }

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

island.cpp: In function 'void io()':
island.cpp:22:12: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
   22 |     freopen("input.in","r",stdin);
      |     ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
/usr/bin/ld: /tmp/ccyUWMtn.o: in function `main':
stub.cpp:(.text.startup+0x8c): undefined reference to `solve(int, int)'
collect2: error: ld returned 1 exit status