Submission #209533

# Submission time Handle Problem Language Result Execution time Memory
209533 2020-03-14T12:47:46 Z model_code Island (NOI18_island) C++17
100 / 100
101 ms 2812 KB
#include <bits/stdc++.h>
using namespace std;
const int MAXN = 200004;
int N, M, cnt[MAXN], fac[MAXN];
int main() {
	scanf("%d%d", &N, &M);
	for (int i = 0, u, v; i < N+M-1; ++i) {
		scanf("%d%d", &u, &v);
		if (cnt[u-1]++ > 1) 
		printf("%d 1\n", cnt[u-1]-1);
		if (cnt[v-1]++ > 1)
		printf("%d 1\n", cnt[v-1]-1);
	}
}

Compilation message

island.cpp: In function 'int main()':
island.cpp:6:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  scanf("%d%d", &N, &M);
  ~~~~~^~~~~~~~~~~~~~~~
island.cpp:8:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   scanf("%d%d", &u, &v);
   ~~~~~^~~~~~~~~~~~~~~~
# Verdict Execution time Memory Grader output
1 Correct 5 ms 256 KB Output is correct
2 Correct 5 ms 256 KB Output is correct
3 Correct 83 ms 2552 KB Output is correct
4 Correct 96 ms 2812 KB Output is correct
5 Correct 22 ms 760 KB Output is correct
6 Correct 91 ms 2808 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 5 ms 256 KB Output is correct
2 Correct 5 ms 376 KB Output is correct
3 Correct 5 ms 376 KB Output is correct
4 Correct 5 ms 380 KB Output is correct
5 Correct 5 ms 256 KB Output is correct
6 Correct 4 ms 256 KB Output is correct
7 Correct 5 ms 256 KB Output is correct
8 Correct 5 ms 376 KB Output is correct
9 Correct 5 ms 376 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 5 ms 376 KB Output is correct
2 Correct 5 ms 376 KB Output is correct
3 Correct 5 ms 376 KB Output is correct
4 Correct 5 ms 256 KB Output is correct
5 Correct 5 ms 256 KB Output is correct
6 Correct 6 ms 376 KB Output is correct
7 Correct 5 ms 256 KB Output is correct
8 Correct 5 ms 256 KB Output is correct
9 Correct 5 ms 380 KB Output is correct
10 Correct 5 ms 376 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 5 ms 256 KB Output is correct
2 Correct 5 ms 256 KB Output is correct
3 Correct 83 ms 2552 KB Output is correct
4 Correct 96 ms 2812 KB Output is correct
5 Correct 22 ms 760 KB Output is correct
6 Correct 91 ms 2808 KB Output is correct
7 Correct 5 ms 256 KB Output is correct
8 Correct 5 ms 376 KB Output is correct
9 Correct 5 ms 376 KB Output is correct
10 Correct 5 ms 380 KB Output is correct
11 Correct 5 ms 256 KB Output is correct
12 Correct 4 ms 256 KB Output is correct
13 Correct 5 ms 256 KB Output is correct
14 Correct 5 ms 376 KB Output is correct
15 Correct 5 ms 376 KB Output is correct
16 Correct 5 ms 376 KB Output is correct
17 Correct 5 ms 376 KB Output is correct
18 Correct 5 ms 376 KB Output is correct
19 Correct 5 ms 256 KB Output is correct
20 Correct 5 ms 256 KB Output is correct
21 Correct 6 ms 376 KB Output is correct
22 Correct 5 ms 256 KB Output is correct
23 Correct 5 ms 256 KB Output is correct
24 Correct 5 ms 380 KB Output is correct
25 Correct 5 ms 376 KB Output is correct
26 Correct 14 ms 504 KB Output is correct
27 Correct 93 ms 2656 KB Output is correct
28 Correct 88 ms 2808 KB Output is correct
29 Correct 48 ms 1016 KB Output is correct
30 Correct 89 ms 2424 KB Output is correct
31 Correct 17 ms 680 KB Output is correct
32 Correct 12 ms 504 KB Output is correct
33 Correct 76 ms 1656 KB Output is correct
34 Correct 67 ms 1400 KB Output is correct
35 Correct 101 ms 2168 KB Output is correct
36 Correct 90 ms 1656 KB Output is correct
37 Correct 5 ms 376 KB Output is correct