Submission #989107

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
9891072024-05-27 14:29:04aykhnBitaro’s Party (JOI18_bitaro)C++17
7 / 100
2031 ms14792 KiB
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define inf 0x3F3F3F3F3F3F3F3F
const int MXN = 1e5 + 5;
const int B = 350;
int n, m, q;
vector<int> adj[MXN];
int used[MXN], dp[MXN], inq[MXN];
vector<array<int, 2>> b[MXN];
vector<int> o;
void init(int a)
{
used[a] = 1;
b[a].push_back({0, a});
set<int> in;
vector<array<int, 2>> nw;
for (int v : adj[a])
{
if (!used[v]) init(v);
in.clear();
nw.clear();
int i = 0, j = 0;
while (nw.size() < B + 1 && i < b[a].size() && j < b[v].size())
{
 
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

bitaro.cpp: In function 'void init(long long int)':
bitaro.cpp:29:39: warning: comparison of integer expressions of different signedness: 'long long int' and 'std::vector<std::array<long long int, 2> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   29 |         while (nw.size() < B + 1 && i < b[a].size() && j < b[v].size())
      |                                     ~~^~~~~~~~~~~~~
bitaro.cpp:29:58: warning: comparison of integer expressions of different signedness: 'long long int' and 'std::vector<std::array<long long int, 2> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   29 |         while (nw.size() < B + 1 && i < b[a].size() && j < b[v].size())
      |                                                        ~~^~~~~~~~~~~~~
bitaro.cpp:44:39: warning: comparison of integer expressions of different signedness: 'long long int' and 'std::vector<std::array<long long int, 2> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   44 |         while (nw.size() < B + 1 && i < b[a].size()) if (in.find(b[a][i][1]) != in.end() && ++i) continue; else nw.push_back(b[a][i]), in.insert(b[a][i++][1]);
      |                                     ~~^~~~~~~~~~~~~
bitaro.cpp:45:39: warning: comparison of integer expressions of different signedness: 'long long int' and 'std::vector<std::array<long long int, 2> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   45 |         while (nw.size() < B + 1 && j < b[v].size()) if (in.find(b[v][j][1]) != in.end() && ++j) continue; else nw.push_back({b[v][j][0] + 1, b[v][j][1]}), in.insert(b[v][j++][1]);
      |                                     ~~^~~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...