Submission #739550

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
7395502023-05-10 15:46:51Farhan_HYAutobus (COCI22_autobus)C++14
55 / 70
505 ms11284 KiB
#include <bits/stdc++.h>
#define int long long
#define F first
#define S second
#define T int tc; cin >> tc; while(tc--)
#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
using namespace std;
const int inf = 1e18;
const int N = 1e6 + 5;
const int M = 505;
const int LOG = 32;
const int CHAR = 26;
const int mod = 1e9 + 7;
const int mod2 = 998244353;
const float pi = atan(1) * 4;
const int dx[] = {1, 1, 1, 0, 0, -1, -1, -1};
const int dy[] = {0, -1, 1, -1, 1, 0, -1, 1};
const char d[] = {'E', 'N', 'S', 'W'};
int n, m, k, q;
vector<pair<int, int>> adj[100];
priority_queue<pair<pair<int, int>, int>> pq;
int g[100][100], dist[100][100][100], ans[100][100];
void dij(int node) {
for(int i = 1; i <= n; i++)
for(int j = 0; j <= n; j++)
dist[node][i][j] = inf;
dist[node][node][0] = 0;
pq.push({{0, 0}, node});
while(!pq.empty()) {
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

Main.cpp: In function 'void dij(long long int)':
Main.cpp:32:13: warning: unused variable 'w' [-Wunused-variable]
   32 |         int w = -pq.top().F.F;
      |             ^
Main.cpp: At global scope:
Main.cpp:44:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
   44 | main() {
      | ^~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...