Submission #978206

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
9782062024-05-09 03:18:21model_codeSpy 3 (JOI24_spy3)C++17
100 / 100
81 ms7144 KiB
#include "Aoi.h"
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
namespace {
const ll linf = 1LL << 60;
string encode(ll num, int len) {
string s;
for (int i = len - 1; i >= 0; i--) s.push_back('0' + (num >> i & 1));
return s;
}
// {dist, pre}
pair<vector<ll>, vector<int>> dijkstra(int n, const vector<int> &a, const vector<int> &b, const vector<ll> &c) {
vector<vector<tuple<int, ll, int>>> G(n);
for (int i = 0; i < a.size(); i++) {
if (c[i] == -1) continue;
G[a[i]].emplace_back(b[i], c[i], i);
G[b[i]].emplace_back(a[i], c[i], i);
}
vector<ll> dist(n, linf);
vector<int> pre(n, -1);
priority_queue<pair<ll, int>, vector<pair<ll, int >>, greater<>> pq;
dist[0] = 0;
pq.emplace(0, 0);
while (!pq.empty()) {
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

Aoi.cpp: In function 'std::pair<std::vector<long long int>, std::vector<int> > {anonymous}::dijkstra(int, const std::vector<int>&, const std::vector<int>&, const std::vector<long long int>&)':
Aoi.cpp:20:27: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   20 |         for (int i = 0; i < a.size(); i++) {
      |                         ~~^~~~~~~~~~
Aoi.cpp: In function 'std::string aoi(int, int, int, int, std::vector<int>, std::vector<int>, std::vector<long long int>, std::vector<int>, std::vector<int>)':
Aoi.cpp:87:31: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   87 |             for (int j = 1; j < mg.size(); j++) {
      |                             ~~^~~~~~~~~~~

Bitaro.cpp: In function 'std::pair<std::vector<long long int>, std::vector<int> > {anonymous}::dijkstra(int, const std::vector<int>&, const std::vector<int>&, const std::vector<long long int>&)':
Bitaro.cpp:24:27: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   24 |         for (int i = 0; i < a.size(); i++) {
      |                         ~~^~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...