제출 #457925

#제출 시각아이디문제언어결과실행 시간메모리
457925mario05092929카니발 티켓 (IOI20_tickets)C++17
11 / 100
2 ms588 KiB
#include "tickets.h" #include <bits/stdc++.h> #define x first #define y second #define pb push_back #define mp make_pair #define all(v) v.begin(),v.end() #pragma gcc optimize("O3") #pragma gcc optimize("Ofast") #pragma gcc optimize("unroll-loops") using namespace std; const int INF = 1e9; const int TMX = 1 << 18; const long long llINF = 1e18; const long long mod = 1e9+7; const long long hashmod = 100003; typedef long long ll; typedef long double ld; typedef pair <int,int> pi; typedef pair <ll,ll> pl; typedef vector <int> vec; typedef vector <pi> vecpi; typedef long long ll; int n,m; ll find_maximum(int k,vector <vec> a) { n = a.size(); m = a[0].size(); vector <vec> ans2; ans2.resize(n); for(int i = 0;i < n;i++) { ans2[i].resize(m); ans2[i][0] = 0; } allocate_tickets(ans2); vec v; for(int i = 0;i < n;i++) { v.pb(a[i][0]); } sort(all(v)); int mid = v[v.size()/2]; ll ans = 0; for(int i = 0;i < n;i++) ans += abs(v[i]-mid); return ans; }

컴파일 시 표준 에러 (stderr) 메시지

tickets.cpp:8: warning: ignoring '#pragma gcc optimize' [-Wunknown-pragmas]
    8 | #pragma gcc optimize("O3")
      | 
tickets.cpp:9: warning: ignoring '#pragma gcc optimize' [-Wunknown-pragmas]
    9 | #pragma gcc optimize("Ofast")
      | 
tickets.cpp:10: warning: ignoring '#pragma gcc optimize' [-Wunknown-pragmas]
   10 | #pragma gcc optimize("unroll-loops")
      |
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...