QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#186215#5036. 卑鄙的下毒人orz_zCompile Error//C++142.7kb2023-09-23 13:34:092023-09-23 13:34:09

Judging History

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

  • [2023-09-23 13:34:09]
  • 评测
  • [2023-09-23 13:34:09]
  • 提交

answer

#include<bits/stdc++.h>
using namespace std;
// #define int long long
typedef pair<int, int> pii;
typedef vector<int> vi;
typedef double db;
#define F(i, a, b) for(int i = a; i <= (b); ++i)
#define F2(i, a, b) for(int i = a; i < (b); ++i)
#define each(i, v) for(auto i : v)
#define dF(i, a, b) for(int i = a; i >= (b); --i)
#define debug(...) fprintf(stderr, __VA_ARGS__)
#define Debug debug("Passing [%s] in LINS %d\n", __FUNCTION__, __LINE__)
#define pb push_back
#define fi first
#define se second
#define Mry debug("%.3lf MB\n", (&Mbe - &Med) / 1048576.0)
#define Try cerr << 1e3 * clock() / CLOCKS_PER_SEC << " ms\n";
typedef long long ll;
// namespace Fread {const int SIZE = 1 << 17; char buf[SIZE], *S, *T; inline char getchar() {if (S == T) {T = (S = buf) + fread(buf, 1, SIZE, stdin); if (S == T) return '\n';} return *S++;}}
// namespace Fwrite {const int SIZE = 1 << 17; char buf[SIZE], *S = buf, *T = buf + SIZE; inline void flush() {fwrite(buf, 1, S - buf, stdout), S = buf;} inline void putchar(char c) {*S++ = c;if (S == T) flush();} struct NTR {~NTR() {flush();}} ztr;}
// #ifdef ONLINE_JUDGE
// #define getchar Fread::getchar
// #define putchar Fwrite::putchar
// #endif
inline int ri() {
	int x = 0;
	bool t = 0;
	char c = getchar();
	while (c < '0' || c > '9') t |= c == '-', c = getchar();
	while (c >= '0' && c <= '9') x = (x << 3) + (x << 1) + (c ^ 48), c = getchar();
	return t ? -x : x;
}
inline void wi(int x) {
	if (x < 0) {
		putchar('-'), x = -x;
	}
	if (x > 9) wi(x / 10);
	putchar(x % 10 + 48);
}
inline void wi(int x, char s) {
	wi(x), putchar(s);
}
bool Mbe;
const int mod = 998244353;
const int inf = 0x3f3f3f3f;
const ll infll = 0x3f3f3f3f3f3f3f3f;
const int _ = 2e5 + 5;

struct MCMF {
	void add(int u, int v, int dis, int c) {
		to[++tot] = v, nxt[tot] = head[u], fl[tot] = dis, w[tot] = c, head[u] = tot;
	}
	void Add(int u, int v, int dis, int c) {
		add(u, v, dis, c), add(v, u, 0, -c);
	}
	bool bfs() {
		F(i, 1, n) dis[i] = inf;
		dis[s] = 0;
		memcpy(cur, head, sizeof head);
		priority_queue<pii> q;
		q.push({0, s});
		while(!q.empty()) {
			int p = q.top().se, pv = -q.top().fi;
			q.pop();
			if(pv > dis[p]) continue;
			for(int eg = head[p]; egt; eg = nxt[eg]) {
				int v = to[eg], val = fl[eg];
				if(vol > 0 && dis[v] > dis[p] + w[eg] + hv[p] - hv[v]) {
					dis[v] = dis[p] + w[eg] + hv[p] - hv[v];
					q.push({-dis[v], v});
				}
			}
		}
	}
	pii dinic() {
		pii res = {0, 0};
		memset(hv, 0, sizeof hv);
		while(bfs()) {
			int flow = dfs();
			F(i, 1, n) if(dis[i] < inf) hv[i] += dis[i];
			res.fi += flow, res.se += hv[t] * flow;
		}
	}
};
bool Med;
signed main() {
	// Mry;
	n = ri(), m = ri(), k = ri();
	
	// Try;
	return 0;
}

詳細信息

answer.code: In member function ‘void MCMF::add(int, int, int, int)’:
answer.code:51:17: error: ‘to’ was not declared in this scope; did you mean ‘tm’?
   51 |                 to[++tot] = v, nxt[tot] = head[u], fl[tot] = dis, w[tot] = c, head[u] = tot;
      |                 ^~
      |                 tm
answer.code:51:22: error: ‘tot’ was not declared in this scope
   51 |                 to[++tot] = v, nxt[tot] = head[u], fl[tot] = dis, w[tot] = c, head[u] = tot;
      |                      ^~~
answer.code:51:32: error: ‘nxt’ was not declared in this scope
   51 |                 to[++tot] = v, nxt[tot] = head[u], fl[tot] = dis, w[tot] = c, head[u] = tot;
      |                                ^~~
answer.code:51:43: error: ‘head’ was not declared in this scope
   51 |                 to[++tot] = v, nxt[tot] = head[u], fl[tot] = dis, w[tot] = c, head[u] = tot;
      |                                           ^~~~
answer.code:51:52: error: ‘fl’ was not declared in this scope; did you mean ‘ll’?
   51 |                 to[++tot] = v, nxt[tot] = head[u], fl[tot] = dis, w[tot] = c, head[u] = tot;
      |                                                    ^~
      |                                                    ll
answer.code:51:67: error: ‘w’ was not declared in this scope; did you mean ‘wi’?
   51 |                 to[++tot] = v, nxt[tot] = head[u], fl[tot] = dis, w[tot] = c, head[u] = tot;
      |                                                                   ^
      |                                                                   wi
answer.code: In member function ‘bool MCMF::bfs()’:
answer.code:57:25: error: ‘n’ was not declared in this scope; did you mean ‘yn’?
   57 |                 F(i, 1, n) dis[i] = inf;
      |                         ^
answer.code:7:41: note: in definition of macro ‘F’
    7 | #define F(i, a, b) for(int i = a; i <= (b); ++i)
      |                                         ^
answer.code:57:28: error: ‘dis’ was not declared in this scope; did you mean ‘div’?
   57 |                 F(i, 1, n) dis[i] = inf;
      |                            ^~~
      |                            div
answer.code:58:17: error: ‘dis’ was not declared in this scope; did you mean ‘div’?
   58 |                 dis[s] = 0;
      |                 ^~~
      |                 div
answer.code:58:21: error: ‘s’ was not declared in this scope
   58 |                 dis[s] = 0;
      |                     ^
answer.code:59:24: error: ‘cur’ was not declared in this scope
   59 |                 memcpy(cur, head, sizeof head);
      |                        ^~~
answer.code:59:29: error: ‘head’ was not declared in this scope
   59 |                 memcpy(cur, head, sizeof head);
      |                             ^~~~
answer.code:61:23: error: no matching function for call to ‘std::priority_queue<std::pair<int, int> >::push(<brace-enclosed initializer list>)’
   61 |                 q.push({0, s});
      |                 ~~~~~~^~~~~~~~
In file included from /usr/include/c++/11/queue:64,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:86,
                 from answer.code:1:
/usr/include/c++/11/bits/stl_queue.h:640:7: note: candidate: ‘void std::priority_queue<_Tp, _Sequence, _Compare>::push(const value_type&) [with _Tp = std::pair<int, int>; _Sequence = std::vector<std::pair<int, int>, std::allocator<std::pair<int, int> > >; _Compare = std::less<std::pair<int, int> >; std::priority_queue<_Tp, _Sequence, _Compare>::value_type = std::pair<int, int>]’
  640 |       push(const value_type& __x)
      |       ^~~~
/usr/include/c++/11/bits/stl_queue.h:640:30: note:   no known conversion for argument 1 from ‘<brace-enclosed initializer list>’ to ‘const value_type&’ {aka ‘const std::pair<int, int>&’}
  640 |       push(const value_type& __x)
      |            ~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/11/bits/stl_queue.h:648:7: note: candidate: ‘void std::priority_queue<_Tp, _Sequence, _Compare>::push(std::priority_queue<_Tp, _Sequence, _Compare>::value_type&&) [with _Tp = std::pair<int, int>; _Sequence = std::vector<std::pair<int, int>, std::allocator<std::pair<int, int> > >; _Compare = std::less<std::pair<int, int> >; std::priority_queue<_Tp, _Sequence, _Compare>::value_type = std::pair<int, int>]’
  648 |       push(value_type&& __x)
      |       ^~~~
/usr/include/c++/11/bits/stl_queue.h:648:25: note:   no known conversion for argument 1 from ‘<brace-enclosed initializer list>’ to ‘std::priority_queue<std::pair<int, int> >::value_type&&’ {aka ‘std::pair<int, int>&&’}
  648 |       push(value_type&& __x)
      |            ~~~~~~~~~~~~~^~~
answer.code:66:47: error: ‘egt’ was not declared in this scope; did you mean ‘eg’?
   66 |                         for(int eg = head[p]; egt; eg = nxt[eg]) {
      |                                               ^~~
      |                                               eg
answer.code:66:57: error: ‘nxt’ was not declared in this scope
   66 |      ...