Submission #961348

# Submission time Handle Problem Language Result Execution time Memory
961348 2024-04-11T22:01:42 Z Mohamed_Kachef06 Swapping Cities (APIO20_swap) C++17
0 / 100
1 ms 436 KB
#include "swap.h"

// #ifndef ONLINE_JUDGE
// #include "grader.cpp"
// #endif
#include <bits/stdc++.h>
using namespace std;

map<pair<int , int> , int> mp;


void init(int N, int M,
          std::vector<int> U, std::vector<int> V, std::vector<int> W) {
      for (int i = 0 ; i < N ; i++){
        mp[{U[i] , V[i]}] = W[i];
      }     
}

int getMinimumFuelCapacity(int X, int Y) {
  if (X == 0) return -1;
  int a = max(mp[{0 , Y}] , mp[{0 , X}]);
  return a;
}
# Verdict Execution time Memory Grader output
1 Correct 1 ms 436 KB Output is correct
2 Incorrect 0 ms 348 KB Output isn't correct
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 436 KB Output is correct
2 Incorrect 0 ms 348 KB Output isn't correct
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 436 KB Output is correct
2 Incorrect 0 ms 348 KB Output isn't correct
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 436 KB Output is correct
2 Incorrect 0 ms 348 KB Output isn't correct
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 436 KB Output is correct
2 Incorrect 0 ms 348 KB Output isn't correct
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 436 KB Output is correct
2 Incorrect 0 ms 348 KB Output isn't correct
3 Halted 0 ms 0 KB -