QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#828249#9914. 前往何方zhenjianuo2025Compile Error//C++201.2kb2024-12-23 15:03:322024-12-23 15:03:39

Judging History

你现在查看的是最新测评结果

  • [2024-12-23 15:03:39]
  • 评测
  • [2024-12-23 15:03:32]
  • 提交

answer

#include<bits/stdc++.h>
#include "wheretoreach.h"
using namespace std;
#define vec vector
#define pb push_back
#define eb emplace_back
#define siz(vec) ((int)(vec).size())
#define all(vec) (vec).begin(),(vec).end()
template<class T>
void operator +=(vec<T> &a,T b){a.push_back(b);}
template<class T>
void operator --(vec<T> &a){a.pop_back();}
#define pii pair<int,int>
#define x first
#define y second
#define mp make_pair
#define exc(exp) if(exp)continue;
#define stop(exp) if(exp)break;
#define ret(exp) if(exp)return;
#define deb(var) cerr<<#var<<'='<<(var)<<"; "
#define debl(var) cerr<<#var<<'='<<(var)<<";\n"
#define ins insert
#define era erase
#define lb lower_bound
#define int long long
#define inf (long long)(1e18)
template<class T>
bool Min(T &x,T y){return x>y?x=y,1:0;}
template<class T>
bool Max(T &x,T y){return x<y?x=y,1:0;}

int add(int x);
int remove(int x);
void report(int x,int y);
void solve(int n){
    
    for(int i=1;i<n;i++){
        add(i);
        for(int j=i+1;j<=n;j++){
            if(add(j)==2){
                report(i,j);
            }
            remove(j);
        }
        remove(i);
    }
}

詳細信息

implementer.cpp: In function ‘void Interactor::init()’:
implementer.cpp:25:22: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   25 |                 scanf("%d",&n);
      |                 ~~~~~^~~~~~~~~
implementer.cpp:30:30: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   30 |                         scanf("%d%d",&x,&y); v[x].push_back(y),v[y].push_back(x);
      |                         ~~~~~^~~~~~~~~~~~~~
/usr/bin/ld: /tmp/ccVRvvR2.o: in function `main':
implementer.cpp:(.text.startup+0x14): undefined reference to `solve(int)'
/usr/bin/ld: /tmp/ccbkxue1.o: in function `solve(long long)':
answer.code:(.text+0x33): undefined reference to `add(long long)'
/usr/bin/ld: answer.code:(.text+0x50): undefined reference to `remove(long long)'
/usr/bin/ld: answer.code:(.text+0x5d): undefined reference to `add(long long)'
/usr/bin/ld: answer.code:(.text+0x6e): undefined reference to `report(long long, long long)'
/usr/bin/ld: answer.code:(.text+0x7c): undefined reference to `remove(long long)'
/usr/bin/ld: answer.code:(.text+0x9e): undefined reference to `remove(long long)'
collect2: error: ld returned 1 exit status