답안 #949562

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
949562 2024-03-19T11:06:31 Z tnun Jelly Flavours (IOI20_jelly) C++14
0 / 100
1 ms 600 KB
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
#define mp make_pair
int find_maximum_unique(int x, int y,vector<int> a,vector<int> b){
	sort(a.begin(),a.end());
	int ans=0;
	for(int i=0;i<a.size();i++){
		if(x>=a[i]){
			x-=a[i];
			ans++;
		}
	}
	return ans+y/b[0];
	
}

Compilation message

jelly.cpp: In function 'int find_maximum_unique(int, int, std::vector<int>, std::vector<int>)':
jelly.cpp:9:15: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
    9 |  for(int i=0;i<a.size();i++){
      |              ~^~~~~~~~~
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 600 KB 1st lines differ - on the 1st token, expected: '8', found: '30'
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 600 KB 1st lines differ - on the 1st token, expected: '8', found: '30'
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Runtime error 1 ms 600 KB Execution killed with signal 8
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 348 KB Output is correct
2 Correct 1 ms 348 KB Output is correct
3 Correct 1 ms 348 KB Output is correct
4 Incorrect 1 ms 348 KB 1st lines differ - on the 1st token, expected: '1906', found: '3797'
5 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 344 KB 1st lines differ - on the 1st token, expected: '154', found: '147'
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 600 KB 1st lines differ - on the 1st token, expected: '8', found: '30'
2 Halted 0 ms 0 KB -