QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#86903#1212. NavigationxixikeCompile Error//C++14672b2023-03-11 14:37:422023-03-11 14:37:44

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:37:44]
  • 评测
  • [2023-03-11 14:37:42]
  • 提交

Anna

#include "Annalib.h"
#include <bits/stdc++.h>

using namespace std;

const int N = 1e5 + 10;
vector <int> G[N];

inline void dfs(int x, int fa, int col){
	Flag(x, col);
	for(auto y : G[x])
		if(y != fa) dfs(y, x, col ^ (y > x));
}

inline void Anna(int K, int N, int T, int A[], int B[]){
	for(int i = 0; i <= (N - 2); ++i){
		G[A[i]].push_back(B[i]);
		G[B[i]].push_back(A[i]);
	}
	dfs(T, 0, 0);
}

Bruno

#include "Brunolib.h"
#include <bits/stdc++.h>

using namespace std;

inline void Bruno(int K, int S, int F, int L, int P[], int Q[]){
	for(int i = 0; i < L; ++i)
		if(F == (Q[i] ^ (S > P[i]))){
			Answer(P[i]);
			return;
		}
	Answer(S);
}

Details

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/ccwFObII.o: in function `main':
grader.cpp:(.text.startup+0x250): undefined reference to `Anna(int, int, int, int*, int*)'
/usr/bin/ld: grader.cpp:(.text.startup+0x4df): undefined reference to `Bruno(int, int, int, int, int*, int*)'
collect2: error: ld returned 1 exit status