답안 #625984

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
625984 2022-08-11T05:47:19 Z sword060 메기 농장 (IOI22_fish) C++17
0 / 100
29 ms 3300 KB
#include <bits/stdc++.h>
#include "fish.h"
using namespace std;
long long max_weights(int x,int k,vector<int> a,vector<int> b,vector<int> c){
  vector<pair<int,int>>l[2];
  long long ans=0,cur=0;
  for(int i=0;i<k;i++){
    l[1-(a[i]%2)].push_back({b[i],c[i]});
    if(1-(a[i]%2))cur+=c[i];
  }
  sort(l[0].begin(),l[0].end());
  sort(l[1].begin(),l[1].end());
  ans=cur;
  int j=(int)l[0].size()-1;
  for(int i=(int)l[1].size()-1;i>=0;i--){
    cur+=l[1][i].second;
    while(j>=0&&l[0][j].first>=l[1][i].first){
      cur-=l[1][i].second;
      j--;
    }
    ans=max(ans,cur);
  }
  return ans;
}
# 결과 실행 시간 메모리 Grader output
1 Incorrect 29 ms 3300 KB 1st lines differ - on the 1st token, expected: '40313272768926', found: '80626545537852'
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 212 KB 1st lines differ - on the 1st token, expected: '2', found: '1'
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 212 KB 1st lines differ - on the 1st token, expected: '10082010', found: '20164020'
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 212 KB Output is correct
2 Incorrect 1 ms 212 KB 1st lines differ - on the 1st token, expected: '7', found: '5'
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 212 KB Output is correct
2 Incorrect 1 ms 212 KB 1st lines differ - on the 1st token, expected: '7', found: '5'
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 212 KB Output is correct
2 Incorrect 1 ms 212 KB 1st lines differ - on the 1st token, expected: '7', found: '5'
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 212 KB 1st lines differ - on the 1st token, expected: '10082010', found: '20164020'
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 29 ms 3300 KB 1st lines differ - on the 1st token, expected: '40313272768926', found: '80626545537852'
2 Halted 0 ms 0 KB -