# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
380802 | 2021-03-23T02:57:02 Z | Pichon5 | 카니발 티켓 (IOI20_tickets) | C++17 | 677 ms | 73324 KB |
#include "tickets.h" #include<bits/stdc++.h> #define lcm(a,b) (a/__gcd(a,b))*b #define fast ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0); #define ll long long #define vi vector<int> #define vll vector<ll> #define pb push_back #define F first #define S second #define mp make_pair using namespace std; long long find_maximum(int k,vector<vi> x) { int n = x.size(); int m = x[0].size(); ll res=0; ll sum=0; vector<vi>M(n,vi(m,-1)); vector<pair<int,int> >v;//sumas , indice for(int i=0;i<n;i++){ res+=x[i][m-1]; v.pb({x[i][0]+x[i][m-1],i}); } sort(v.begin(),v.end()); for(int i=0;i<n/2;i++){ res-=v[i].F; M[v[i].S][0]=0; } for(int i=0;i<n;i++){ if(M[i][0]==-1)M[i][m-1]=0; } allocate_tickets(M); return res; }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 364 KB | Output is correct |
2 | Correct | 1 ms | 364 KB | Output is correct |
3 | Correct | 1 ms | 364 KB | Output is correct |
4 | Correct | 1 ms | 364 KB | Output is correct |
5 | Correct | 1 ms | 364 KB | Output is correct |
6 | Correct | 2 ms | 748 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 364 KB | Output is correct |
2 | Correct | 1 ms | 364 KB | Output is correct |
3 | Correct | 1 ms | 364 KB | Output is correct |
4 | Correct | 3 ms | 492 KB | Output is correct |
5 | Correct | 27 ms | 3424 KB | Output is correct |
6 | Correct | 677 ms | 73324 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 364 KB | There is no ticket of color 0 on day 1 |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 364 KB | There is no ticket of color 0 on day 1 |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 364 KB | There is no ticket of color 0 on day 1 |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 364 KB | There is no ticket of color 0 on day 1 |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 364 KB | Output is correct |
2 | Correct | 1 ms | 364 KB | Output is correct |
3 | Correct | 1 ms | 364 KB | Output is correct |
4 | Correct | 1 ms | 364 KB | Output is correct |
5 | Correct | 1 ms | 364 KB | Output is correct |
6 | Correct | 2 ms | 748 KB | Output is correct |
7 | Correct | 1 ms | 364 KB | Output is correct |
8 | Correct | 1 ms | 364 KB | Output is correct |
9 | Correct | 1 ms | 364 KB | Output is correct |
10 | Correct | 3 ms | 492 KB | Output is correct |
11 | Correct | 27 ms | 3424 KB | Output is correct |
12 | Correct | 677 ms | 73324 KB | Output is correct |
13 | Incorrect | 1 ms | 364 KB | There is no ticket of color 0 on day 1 |
14 | Halted | 0 ms | 0 KB | - |