제출 #1084543

#제출 시각UTC-0아이디문제언어결과실행 시간메모리
10845432024-09-06 11:26:35SamueleVid수천개의 섬 (IOI22_islands)C++17
5 / 100
34 ms48900 KiB
#include <bits/stdc++.h>
using namespace std;
// constexpr int MAXN = 1e5 + 5;
constexpr int MAXN = 1e3 + 5;
constexpr int MAXM = 2e5 + 5;
// vector<pair<int, int>> adj[MAXN]; // nodo, barca
vector<int> adj[MAXN][MAXN];
bool v[MAXN];
vector<int> barche;
vector<int> barche_res;
vector<int> nodi;
int N;
bool fatto = false;
variant<bool, vector<int>> n_two(int N, int M, vector<int> U, vector<int> V) {
vector<int> el_primo;
vector<int> el_secondo;
for (int i = 0; i < M; i ++) {
if (U[i] == 0) el_primo.push_back(i);
if (U[i] == 1) el_secondo.push_back(i);
}
if (el_primo.size() >= 2 && el_secondo.size() >= 1) {
int a = el_primo[0];
int b = el_secondo[0];
int c = el_primo[1];
vector<int> res = {a, b, c, a, b, c};
return res;
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

컴파일 시 표준 에러 (stderr) 메시지

islands.cpp: In function 'void dfs(int)':
islands.cpp:61:27: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   61 |         for (int i = 0; i < nodi.size(); i ++) {
      |                         ~~^~~~~~~~~~~~~
islands.cpp:111:37: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  111 |         for (int i = primo_u + 1; i < nodi.size(); i ++) {
      |                                   ~~^~~~~~~~~~~~~
islands.cpp: In function 'std::variant<bool, std::vector<int, std::allocator<int> > > subtask_two(int, int, std::vector<int>, std::vector<int>)':
islands.cpp:47:58: warning: 'f' may be used uninitialized in this function [-Wmaybe-uninitialized]
   47 |     vector<int> res = {a, c, e, f, d, b, e, c, a, b, d, f};
      |                                                          ^
islands.cpp:47:58: warning: 'e' may be used uninitialized in this function [-Wmaybe-uninitialized]
islands.cpp:47:58: warning: 'd' may be used uninitialized in this function [-Wmaybe-uninitialized]
islands.cpp:47:58: warning: 'c' may be used uninitialized in this function [-Wmaybe-uninitialized]
islands.cpp:47:58: warning: 'b' may be used uninitialized in this function [-Wmaybe-uninitialized]
islands.cpp:47:58: warning: 'a' may be used uninitialized in this function [-Wmaybe-uninitialized]
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...