# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
721310 | 2023-04-10T16:28:53 Z | nihaddhuseynli | 카니발 티켓 (IOI20_tickets) | C++14 | 5 ms | 6740 KB |
#include "tickets.h" #include <vector> #include <bits/stdc++.h> using namespace std; typedef long long int ll; ll n1,m1,a[1505][1505]; 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; 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); ll ans=0,maxx=0; for(int i =0;i<n;i++) { for(int j =0;j<m;j++) { a[i][j]=x[i][j]; maxx=max(maxx,(ll)x[i][j]); } } ll sum=0; sort(x.begin(),x.end()); for(int i=0;i<n/2;i++){ sum+=x[i][0]; } reverse(x.begin(),x.end()); ll sum1=0; for(int i=0;i<n/2;i++){ sum1+=x[i][0]; } return sum1-sum; }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 212 KB | Output is correct |
2 | Correct | 0 ms | 212 KB | Output is correct |
3 | Correct | 0 ms | 340 KB | Output is correct |
4 | Correct | 1 ms | 596 KB | Output is correct |
5 | Correct | 1 ms | 1492 KB | Output is correct |
6 | Correct | 5 ms | 6740 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 212 KB | Contestant returned 292273026 while correct return value is 860858182. |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 212 KB | Contestant returned 2 but the tickets gives a total value of 0 |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 212 KB | Contestant returned 5 but the tickets gives a total value of 2 |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 212 KB | Contestant returned 5 but the tickets gives a total value of 2 |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 212 KB | Contestant returned 5 but the tickets gives a total value of 2 |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 212 KB | Output is correct |
2 | Correct | 0 ms | 212 KB | Output is correct |
3 | Correct | 0 ms | 340 KB | Output is correct |
4 | Correct | 1 ms | 596 KB | Output is correct |
5 | Correct | 1 ms | 1492 KB | Output is correct |
6 | Correct | 5 ms | 6740 KB | Output is correct |
7 | Incorrect | 1 ms | 212 KB | Contestant returned 292273026 while correct return value is 860858182. |
8 | Halted | 0 ms | 0 KB | - |