제출 #820028

#제출 시각UTC-0아이디문제언어결과실행 시간메모리
8200282023-08-10 18:04:02Aldas25Two Transportations (JOI19_transportations)C++14
6 / 100
3000 ms33608 KiB
#include "Azer.h"
#include <bits/stdc++.h>
using namespace std;
namespace {
const int MAXN = 500100;
const int BITS_IN_DISTANCES = 9;
const int BITS_IN_VERTICES = 11;
const int INF_DISTANCE = (1 << BITS_IN_DISTANCES) - 1;
int d[MAXN];
bool vis[MAXN];
int n;
vector<pair<int, int>> adj[MAXN];
priority_queue<pair<int, int>, vector<pair<int, int>>, greater<>> pq;
int longestCommonDistance = 0;
pair<int, int> nextShortest;
int distancesKnown = 0;
int distanceReceived = 0;
int vertexReceived = 0;
int receivedBitsCount = 0;
bool gettingDistance = true; // true if receiveA gets bits for distances, false if receiveA gets bits for vertex number
void sendNumber(int number, int bits) {
for (int i = 0; i < bits; i++) {
SendA(number & (1 << i));
}
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#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...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...