Submission #928133

# Submission time Handle Problem Language Result Execution time Memory
928133 2024-02-15T21:14:03 Z SUNWOOOOOOOO Carnival Tickets (IOI20_tickets) C++17
0 / 100
1 ms 348 KB
#include "tickets.h"
#include <bits/stdc++.h>
using namespace std;
using LL = long long;

LL find_maximum(int k, vector<vector<int>> x) {
	int n = x.size(), m = x[0].size();
	LL ans = 0;
	for (int i = 0; i < n; i++){
		LL sum = 0;
		for (int j = 0; j < n; j++) sum += abs(x[j][0] - x[i][0]);
		ans = min(ans, sum);
	}
	allocate_tickets(x);
	return ans;
}

Compilation message

tickets.cpp: In function 'LL find_maximum(int, std::vector<std::vector<int> >)':
tickets.cpp:7:20: warning: unused variable 'm' [-Wunused-variable]
    7 |  int n = x.size(), m = x[0].size();
      |                    ^
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 348 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 0 ms 348 KB Ticket 0 of color 0 is played on invalid day 78791011
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 344 KB There is multiple tickets of color 0 on day 1
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 348 KB There is no ticket of color 0 on day 0
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 348 KB There is no ticket of color 0 on day 0
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 348 KB There is no ticket of color 0 on day 0
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 348 KB Ticket 0 of color 0 is played on invalid day 500507564
2 Halted 0 ms 0 KB -