Submission #781240

# Submission time Handle Problem Language Result Execution time Memory
781240 2023-07-13T00:29:12 Z NK_ Pipes (CEOI15_pipes) C++17
0 / 100
723 ms 63764 KB
// Success consists of going from failure to failure without loss of enthusiasm
#include <bits/stdc++.h>

using namespace std;

#define nl '\n'
#define f first
#define s second
#define mp make_pair
#define pb push_back

using pi = pair<int, int>;
template<class T> using V = vector<T>;

const int eax = 12e6+5;
const int nax = 1e5+5;

int adj[eax];
int nxt[nax], start[nax];

int main() {
	cin.tie(0)->sync_with_stdio(0);
	
	for(int i = 0; i < nax; i++) nxt[i] = start[i] = -1;

	int N, M; cin >> N >> M;
	int u, v;
	for(int e = 0; e < M; e++) {
		cin >> u >> v; --u, --v;

		adj[2*e] = v;
		nxt[2*e] = start[u];
		start[u] = 2*e;

		adj[2*e+1] = u;
		nxt[2*e+1] = start[v];
		start[v] = 2*e+1;	
	}

    return 0;
}


# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 980 KB Wrong number of edges
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 1252 KB Wrong number of edges
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 68 ms 5940 KB Output is correct
2 Incorrect 64 ms 6260 KB Wrong number of edges
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 107 ms 9268 KB Output is correct
2 Incorrect 127 ms 11032 KB Wrong number of edges
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 179 ms 12996 KB Output is correct
2 Incorrect 155 ms 11616 KB Wrong number of edges
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 214 ms 15280 KB Output is correct
2 Incorrect 187 ms 13460 KB Wrong number of edges
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 370 ms 23984 KB Memory limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 448 ms 31236 KB Memory limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 587 ms 39148 KB Memory limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 723 ms 63764 KB Memory limit exceeded
2 Halted 0 ms 0 KB -