| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1202971 | notme | 카니발 티켓 (IOI20_tickets) | C++20 | 0 ms | 328 KiB |
#include "tickets.h"
#include <bits/stdc++.h>
#include <vector>
#define pb push_back
using namespace std;
long long find_maximum(int k, std::vector<std::vector<int>> x)
{
int n = x.size();
int m = x[0].size();
std::vector<std::vector<int>> answer;
long long b;
vector < long long > g;
for (int i = 0; i < n; ++ i)
g.pb(1LL * x[i][0]);
sort(g.begin(), g.end());
long long half1 = g[n/2];
for (int i = 0; i < n; i++)
{
std::vector<int> row(m);
for (int j = 0; j < m; j++)
{
row[j] = 1;
/*if (j < k)
{
row[j] = j;
}
else
{
row[j] = -1;
}*/
}
answer.push_back(row);
}
allocate_tickets(answer);
long long ans = 0;
for (auto x: g)
ans += 1LL * (x - half1);
return ans;
}
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
