# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
169426 | 2019-12-20T10:15:52 Z | Ruxandra985 | Sure Bet (CEOI17_sure) | C++14 | 3 ms | 504 KB |
/// sunt foarte inteligenta nu stiu sa citesc enunturi #include <bits/stdc++.h> #define DIMN 100010 using namespace std; pair <double , int> v[DIMN],w[DIMN]; int main() { FILE *fin = fopen ("a.in","r"); FILE *fout = fopen ("a.out","w"); int n , i , j , taken = 0; double sol = 0.0, sx , sy; fscanf (fin,"%d",&n); if (n <= 1000){ for (i=1;i<=n;i++){ fscanf (fin,"%lf%lf",&v[i].first,&w[i].first); v[i].second = w[i].second = i; } sort (v+1 , v + n + 1); sort (w+1 , w + n + 1); sx = 0.0; for (i=1;i<=n;i++){ sx += v[n-i+1].first; taken = 0; sy = 0.0; for (j=n;j;j--){ sy += w[j].first; taken++; sol = max(sol , min(sx - i - taken , sy - i - taken)); } } } cout << setprecision(4) << fixed << sol; return 0; }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Runtime error | 3 ms | 504 KB | Execution killed with signal 11 (could be triggered by violating memory limits) |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Runtime error | 3 ms | 504 KB | Execution killed with signal 11 (could be triggered by violating memory limits) |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Runtime error | 3 ms | 504 KB | Execution killed with signal 11 (could be triggered by violating memory limits) |
2 | Halted | 0 ms | 0 KB | - |