답안 #687073

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
687073 2023-01-26T05:52:13 Z Alihan_8 Mouse (info1cup19_mouse) C++17
컴파일 오류
0 ms 0 KB
#include <bits/stdc++.h>
#include <grader.h>
// include <ext/pb_ds/assoc_container.hpp>
// include <ext/pb_ds/tree_policy.hpp>
// using namespace __gnu_pbds;
using namespace std;
#define all(x) x.begin(), x.end()
#define pb push_back
// define ordered_set tree<int,null_type,less<int>,rb_tree_tag,tree_order_statistics_node_update>
#define mpr make_pair
#define ln '\n'
void IO(string name){freopen((name+".in").c_str(),"r",stdin); freopen((name+".out").c_str(),"w",stdout);}
#define int long long
int query(vector <int> q);
void solve(int n){
    vector <int> p(n);
    iota(all(p), 1);
    do{
        if ( query(p) == n ) exit(0);
    } while ( next_permutation(all(p)) );
}
signed main(){
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);



 	cout << '\n';
}

Compilation message

mouse.cpp: In function 'void IO(std::string)':
mouse.cpp:12:29: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
   12 | void IO(string name){freopen((name+".in").c_str(),"r",stdin); freopen((name+".out").c_str(),"w",stdout);}
      |                      ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
mouse.cpp:12:70: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
   12 | void IO(string name){freopen((name+".in").c_str(),"r",stdin); freopen((name+".out").c_str(),"w",stdout);}
      |                                                               ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/bin/ld: /tmp/ccU6MAmZ.o: in function `main':
grader.cpp:(.text.startup+0x0): multiple definition of `main'; /tmp/ccp7m0JZ.o:mouse.cpp:(.text.startup+0x0): first defined here
/usr/bin/ld: /tmp/ccp7m0JZ.o: in function `solve(long long)':
mouse.cpp:(.text+0x38b): undefined reference to `query(std::vector<long long, std::allocator<long long> >)'
/usr/bin/ld: /tmp/ccU6MAmZ.o: in function `main':
grader.cpp:(.text.startup+0x30): undefined reference to `solve(int)'
collect2: error: ld returned 1 exit status