QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#87289#1212. NavigationpengyuleCompile Error//C++14680b2023-03-12 11:59:582023-03-12 12:00:01

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-12 12:00:01]
  • 评测
  • [2023-03-12 11:59:58]
  • 提交

Anna

#include <bits/stdc++.h>
#include "Annalib.h"
using namespace std;
const int N=1e5+5;
int u[N],v[N],dep[N],col[N];
vector<int>G[N];
void dfs(int x,int p){
	dep[x]=dep[p]+1;
	for(int y:G[x])if(y^p){
		col[y]=col[x]^(x<y);
		dfs(y,x);
	}
}
void Anna(int tid,int n,int T,int u[],int v[]){
	for(int i=1;i<n;i++){
		G[u[i]].emplace_back(v[i]),G[v[i]].emplace_back(u[i]);
	}
	col[T]=0;
	dfs(T,0);
	for(int i=1;i<=n;i++)Flag(i,col[i]+1);
}

Bruno

#include <bits/stdc++.h>
#include "Brunolib.h"
using namespace std;
void Bruno(int tid,int S,int flag,int L,int P[],int Q[]){
	for(int i=0;i<L;i++){
		if((S<P[i])^(flag-1)^(Q[i]-1)){Answer(P[i]);return;}
	}
	Ansert(S);
}

详细

Bruno.code: In function ‘void Bruno(int, int, int, int, int*, int*)’:
Bruno.code:8:9: error: ‘Ansert’ was not declared in this scope; did you mean ‘assert’?
    8 |         Ansert(S);
      |         ^~~~~~
      |         assert
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]);
      |                 ~~~~~^~~~~~~~~~~~~~