QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#87291 | #1212. Navigation | pengyule | Compile Error | / | / | C++14 | 653b | 2023-03-12 12:04:16 | 2023-03-12 12:04:18 |
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:04:18]
- 评测
- 测评结果:Compile Error
- 用时:0ms
- 内存:0kb
- [2023-03-12 12:04:16]
- 提交
Anna
#include <bits/stdc++.h>
#include "Annalib.h"
using namespace std;
const int N=1e5+5;
int 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]);
}
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^Q[i]){Answer(P[i]);return;}
}
Answer(S);
}
Details
Anna.code: In function ‘void dfs(int, int)’: Anna.code:8:9: error: ‘dep’ was not declared in this scope 8 | dep[x]=dep[p]+1; | ^~~ 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]); | ~~~~~^~~~~~~~~~~~~~