Submission #1017776

# Submission time Handle Problem Language Result Execution time Memory
1017776 2024-07-09T10:07:21 Z MohamedFaresNebili Magic Show (APIO24_show) C++17
5 / 100
3 ms 832 KB
#include <bits/stdc++.h>
#include "Alice.h"

		using namespace std;

		vector<pair<int, int>> Alice() {
			long long X = setN(5000);
			vector<pair<int, int>> G;
			for(int l = 1; l <= 5000; l++) {
				if(l == X) continue;
				G.push_back({X, l});
			}
			return G;
		}
#include <bits/stdc++.h>
#include "Bob.h"

		using namespace std;

		long long Bob(vector<pair<int, int>> V) {
			vector<int> occ(5001, 0);
			for(int l = 0; l < V.size(); l++) {
				int X = V[l].first, Y = V[l].second;
				occ[X]++, occ[Y]++;
				if(occ[X] > occ[Y]) swap(X, Y);
				if(occ[Y] > 1) return Y;
			}
			return -1;
		}

Compilation message

Bob.cpp: In function 'long long int Bob(std::vector<std::pair<int, int> >)':
Bob.cpp:8:21: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<int, int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
    8 |    for(int l = 0; l < V.size(); l++) {
      |                   ~~^~~~~~~~~~
# Verdict Execution time Memory Grader output
1 Correct 3 ms 816 KB Correct.
2 Correct 2 ms 820 KB Correct.
3 Correct 1 ms 820 KB Correct.
4 Correct 1 ms 820 KB Correct.
5 Correct 2 ms 828 KB Correct.
6 Correct 2 ms 832 KB Correct.
7 Correct 3 ms 820 KB Correct.
8 Correct 3 ms 820 KB Correct.
9 Correct 2 ms 820 KB Correct.
10 Correct 2 ms 820 KB Correct.
11 Correct 3 ms 832 KB Correct.
12 Correct 2 ms 824 KB Correct.
# Verdict Execution time Memory Grader output
1 Correct 3 ms 816 KB Correct.
2 Correct 2 ms 820 KB Correct.
3 Correct 1 ms 820 KB Correct.
4 Correct 1 ms 820 KB Correct.
5 Correct 2 ms 828 KB Correct.
6 Correct 2 ms 832 KB Correct.
7 Correct 3 ms 820 KB Correct.
8 Correct 3 ms 820 KB Correct.
9 Correct 2 ms 820 KB Correct.
10 Correct 2 ms 820 KB Correct.
11 Correct 3 ms 832 KB Correct.
12 Correct 2 ms 824 KB Correct.
13 Incorrect 1 ms 344 KB Output isn't correct
14 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 3 ms 816 KB Correct.
2 Correct 2 ms 820 KB Correct.
3 Correct 1 ms 820 KB Correct.
4 Correct 1 ms 820 KB Correct.
5 Correct 2 ms 828 KB Correct.
6 Correct 2 ms 832 KB Correct.
7 Correct 3 ms 820 KB Correct.
8 Correct 3 ms 820 KB Correct.
9 Correct 2 ms 820 KB Correct.
10 Correct 2 ms 820 KB Correct.
11 Correct 3 ms 832 KB Correct.
12 Correct 2 ms 824 KB Correct.
13 Incorrect 1 ms 344 KB Output isn't correct
14 Halted 0 ms 0 KB -