제출 #1096150

#제출 시각UTC-0아이디문제언어결과실행 시간메모리
10961502024-10-04 01:55:51Zero_OPBitaro’s Party (JOI18_bitaro)C++14
14 / 100
271 ms63316 KiB
#include "bits/stdc++.h"
using namespace std;
#define sz(v) (int)v.size()
const int MAX = 1e5 + 5;
int SQRT = 350;
int n, m, q, dp[MAX], f[MAX];
vector<int> adj[MAX], rev[MAX];
bool bad[MAX], vis[MAX];
vector<int> bestNodes[MAX]; //only take B nodes
vector<int> S[MAX], tmpS;
bool better(int u, int v){
return (dp[u] == dp[v] ? u > v : dp[u] > dp[v]);
}
void addTmpS(int u){
if(!tmpS.empty() && tmpS.back() == u); else tmpS.push_back(u);
}
void insert(vector<int>& A, vector<int>& B){ //define A is larger set
vector<int>().swap(tmpS);
int i = 0, j = 0;
while(i < sz(A) || j < sz(B)){
if(sz(tmpS) == SQRT) break;
if(i == sz(A)) addTmpS(B[j++]);
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...