이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "Azer.h"
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
#define rep(a, b) for(int a = 0; a < (b); ++a)
#define st first
#define nd second
#define pb push_back
#define all(a) a.begin(), a.end()
vector<int>wynik;
int akt=0, ile=0;
void InitA(int N, int A, vector<int>U, vector<int>V, vector<int>C) {
}
void ReceiveA(bool x) {
if(x) akt+=1<<(ile%20);
++ile;
if(ile%20==0) {
wynik.pb(akt);
akt=0;
}
}
vector<int>Answer() {
return wynik;
}
#include "Baijan.h"
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
#define rep(a, b) for(int a = 0; a < (b); ++a)
#define st first
#define nd second
#define pb push_back
#define all(a) a.begin(), a.end()
const int LIM=2e3+7, INF=1e9+7;
vector<pair<int,int>>V[LIM];
int odl[LIM];
void wyslij(int x) {
rep(i, 20) if(x&(1<<i)) SendB(1); else SendB(0);
}
void InitB(int N, int B, vector<int>S, vector<int>T, vector<int>D) {
rep(i, B) {
V[S[i]].pb({T[i], D[i]});
V[T[i]].pb({S[i], D[i]});
}
rep(i, N) odl[i]=INF;
priority_queue<pair<int,int>>q;
q.push({0, 0});
while(!q.empty()) {
int o=-q.top().st, p=q.top().nd; q.pop();
if(odl[p]<INF) continue;
odl[p]=o;
for(auto i : V[p]) if(odl[i.st]==INF) q.push({-o-i.nd, i.st});
}
rep(i, N) wyslij(odl[i]);
}
void ReceiveB(bool y) {
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |