Submission #915769

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
9157692024-01-24 16:44:43RaulAndrei01Kitchen (BOI19_kitchen)C++14
100 / 100
28 ms768 KiB
#include<iostream>
#include<vector>
using namespace std;
const int NMAX = 400;
const int INF = 1e7;
int a[NMAX+1] , b[NMAX+1];
int dp[NMAX*NMAX+1]; // dp[sum] = cate ore max sunt eligibile pt n*k
int main ()
{
int n, m, k;
cin >> n >> m >> k;
int sumA = 0;
bool bad = 0;
for (int i = 1; i <= n; i++)
{
cin >> a[i];
sumA += a[i];
if (a[i] < k) bad = 1;
}
int sumB = 0;
for (int i = 1; i <= m; i++)
{
cin >> b[i];
sumB += b[i];
}
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

kitchen.cpp: In function 'int main()':
kitchen.cpp:54:9: warning: unused variable 'ans' [-Wunused-variable]
   54 |     int ans = 0;
      |         ^~~
#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...