답안 #793014

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
793014 2023-07-25T12:25:18 Z ln_e Jelly Flavours (IOI20_jelly) C++17
0 / 100
1 ms 340 KB
#include <bits/stdc++.h> //Andrei Alexandru a.k.a Sho
#include "jelly.h"
using ll=long long;
using ld=long double;
int const INF=1000000005;
ll const LINF=1000000000000000005;
ll const mod=6700417;
ld const PI=3.14159265359;
ll const MAX_N=3e5+5;
ld const EPS=0.00000001;
#pragma GCC optimize("O3")
#pragma GCC optimize("Ofast")
#define f first
#define s second
#define pb push_back
#define mp make_pair
#define endl '\n'
#define sz(a) (int)a.size()
#define CODE_START  ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
using namespace std;
pair<int,int>p[2005];
int find_maximum_unique(int x, int y, std::vector<int> a, std::vector<int> b) {
	int n = a.size();
	int ans=0;
	for(int i=0;i<n;i++)
	{
		p[i].f=a[i];
		p[i].s=b[i];
	}
	sort(p,p+n);
	ll mx=x;
	for(ll i=0;i<n;i++)
	{
		if(x-p[i].f>=0){
			ans++;
			x-=p[i].f;
		}
	}
	return ans;
}

Compilation message

jelly.cpp: In function 'int find_maximum_unique(int, int, std::vector<int>, std::vector<int>)':
jelly.cpp:31:5: warning: unused variable 'mx' [-Wunused-variable]
   31 |  ll mx=x;
      |     ^~
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 212 KB 1st lines differ - on the 1st token, expected: '8', found: '5'
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 212 KB 1st lines differ - on the 1st token, expected: '8', found: '5'
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 340 KB 1st lines differ - on the 1st token, expected: '689', found: '58'
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 340 KB 1st lines differ - on the 1st token, expected: '62', found: '60'
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 340 KB 1st lines differ - on the 1st token, expected: '154', found: '146'
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 212 KB 1st lines differ - on the 1st token, expected: '8', found: '5'
2 Halted 0 ms 0 KB -