답안 #434211

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
434211 2021-06-20T18:23:00 Z ioi 카니발 티켓 (IOI20_tickets) C++14
0 / 100
1 ms 292 KB
#include "tickets.h"
#include <vector>
#include<bits/stdc++.h>
using namespace std ;

long long find_maximum(int k, std::vector<std::vector<int>> x) {


	int n = x.size() , m = x[0].size();


	vector<vector<int> > ans(n , vector<int> (m , 0));
	allocate_tickets(ans);
    double b = 0 ;

    for(int i = 0 ; i < n ; i ++)
        b += x[i][0];

    b /= n ;

    b = round(b);

    long long ret = 0 ;

    for(int i = 0 ; i < n ; i++)ret += abs(x[i][0] - b);
    return ret ;



	/*
	int n = x.size();
	int m = x[0].size();
	std::vector<std::vector<int>> answer;
	for (int i = 0; i < n; i++) {
		std::vector<int> row(m);
		for (int j = 0; j < m; j++) {
			if (j < k) {
				row[j] = j;
			} else {
				row[j] = -1;
			}
		}
		answer.push_back(row);
	}
	allocate_tickets(answer);
	return 1;

	*/
}
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 204 KB Output is correct
2 Correct 1 ms 204 KB Output is correct
3 Correct 0 ms 204 KB Output is correct
4 Incorrect 1 ms 204 KB Contestant returned 18919508441 but the tickets gives a total value of 18973753473
5 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 204 KB There is multiple tickets of color 0 on day 0
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 204 KB There is multiple tickets of color 0 on day 0
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 204 KB There is multiple tickets of color 0 on day 0
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 292 KB There is multiple tickets of color 0 on day 0
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 292 KB There is multiple tickets of color 0 on day 0
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 204 KB Output is correct
2 Correct 1 ms 204 KB Output is correct
3 Correct 0 ms 204 KB Output is correct
4 Incorrect 1 ms 204 KB Contestant returned 18919508441 but the tickets gives a total value of 18973753473
5 Halted 0 ms 0 KB -