QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#646997 | #1212. Navigation | Grand_Elf | Compile Error | / | / | C++17 | 782b | 2024-10-17 10:51:57 | 2024-10-17 10:51:57 |
Judging History
Anna
#include "Annalib.h"
#include <bits/stdc++.h>
using namespace std;
namespace Anna {
const int N = 1e5 + 5;
int n, t;
vector<int> e[N];
void dfs(int u, int fa, int dis) {
Flag(u, dis);
for (int v : e[u]) {
if (v == fa) {
continue;
}
dfs(v, u, dis);
}
}
}
void Anna(int subid, int n_, int t_, int x[], int y[]) {
using namespace Anna;
n = n_;
t = t_;
for (int i = 0; i < n - 1; i++) {
int u = x[i], v = y[i];
e[u].emplace_back(v);
e[v].emplace_back(u);
}
dfs(t, 0, 0);
}
Bruno
#include "Brunolib.h"
#include <bits/stdc++.h>
using namespace std;
void Bruno(int subid, int s, int F, int L, int P[], int Q[]) {
for (int i = 0; i < L; i++) {
if (F > Q[i]) {
Answer(P[i]);
return;
}
}
Answer(s);
}
Details
Anna.code:22:54: error: ‘void Anna(int, int, int, int*, int*)’ redeclared as different kind of entity 22 | void Anna(int subid, int n_, int t_, int x[], int y[]) { | ^ Anna.code:5:11: note: previous declaration ‘namespace Anna { }’ 5 | namespace Anna { | ^~~~ 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]); | ~~~~~^~~~~~~~~~~~~~