Submission #947024

# Submission time Handle Problem Language Result Execution time Memory
947024 2024-03-15T11:15:54 Z AkibAzmain Carnival Tickets (IOI20_tickets) C++17
0 / 100
1 ms 500 KB
#include "tickets.h"
#include <bits/stdc++.h>
using namespace std;
using ll = long long;

long long find_maximum(int k, std::vector<std::vector<int>> x) {
  ll n = x.size();
  ll m = x[0].size();
  std::vector<std::vector<int>> ans;
  ll sum = 0;
  if (m == 1)
    {
      ans = x;
      vector < ll > a;
      for (auto &y : x) a.push_back (y[0]);
      sort (a.begin (), a.end ());
      for (auto &y : a) sum += abs (y - a[n / 2]);
    }
  allocate_tickets(ans);
  return sum;
}
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 500 KB Ticket 0 of color 0 is played on invalid day 500507564
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 348 KB WA in grader: allocate_tickets called with parameter of wrong size
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 348 KB WA in grader: allocate_tickets called with parameter of wrong size
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 348 KB WA in grader: allocate_tickets called with parameter of wrong size
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 348 KB WA in grader: allocate_tickets called with parameter of wrong size
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 348 KB WA in grader: allocate_tickets called with parameter of wrong size
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 500 KB Ticket 0 of color 0 is played on invalid day 500507564
2 Halted 0 ms 0 KB -