QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#86896#1212. NavigationDr_GilbertCompile Error//C++20682b2023-03-11 14:34:082023-03-11 14:34:11

Judging History

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

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2023-03-11 14:34:11]
  • 评测
  • [2023-03-11 14:34:08]
  • 提交

Anna

#include <bits/stdc++.h>
#include "Annalib.h"
using namespace std;
vector<vector<int>> G;
void dfs(int x, int fa, int col){
	if (fa<x) col^=1;
	Flag(x,col);
	for (int v:G[x]){
		if (v==fa) continue;
		dfs(v,x,col);
	}return;
}
void Anna(int k, int n, int t, vector<int> u, vector<int> v){
	G.resize(n+10);
	for (int i=0;i<n-1;i++){
		G[u[i]].emplace_back(v[i]);
		G[v[i]].emplace_back(u[i]);
	}dfs(t,0,0);return;
}

Bruno

#include <bits/stdc++.h>
#include "Brunolib.h"
using namespace std;
void Bruno(int k, int s, int f, int l, vector<int> p, vector<int> q){
	for (int i=0;i<l;i++){
		if ((s<p[i])^(q[i]^f)) return Answer(p[i]),void();
	}return Answer(s),void();
}

詳細信息

grader.cpp: In function ‘int main(int, char**)’:
grader.cpp:144:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
  144 |         scanf("%d%d%d%d", &K, &S, &F, &L);
      |         ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
grader.cpp:146:22: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
  146 |                 scanf("%d", &P_[i]);
      |                 ~~~~~^~~~~~~~~~~~~~
grader.cpp:150:22: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
  150 |                 scanf("%d", &Q_[i]);
      |                 ~~~~~^~~~~~~~~~~~~~
/usr/bin/ld: /tmp/ccEp5RdY.o: in function `main':
grader.cpp:(.text.startup+0x248): undefined reference to `Anna(int, int, int, int*, int*)'
/usr/bin/ld: grader.cpp:(.text.startup+0x50f): undefined reference to `Bruno(int, int, int, int, int*, int*)'
collect2: error: ld returned 1 exit status