Submission #1873576
Source Code Expand
#include <iostream> using namespace std; double A,B,C,D,E,F,Ai,Bi,tan,sum,kefan; int main() { cin>>A>>B>>C>>D>>E>>F; Ai=A*E,Bi=B*E; double max1=-1,max2=1; for(int a = 0;a*A*100<=F;a++) for(int b = 0;b*B*100<=F-a*A*100;b++) for(int c = 0;c*C<=F-a*A*100-b*B*100;c++) for(int d = 0;d*D<=F-a*A*100-b*B*100-c*C;d++) { tan = c*C+d*D; sum = A*a*100+B*b*100+tan; kefan = Ai*a+Bi*b; if(kefan<tan||sum>F)continue; if(sum!=0&&tan/sum>max2/max1){ max1 = sum; max2 = tan; } } cout<<(int)max1<<" "<<(int)max2<<endl; return 0; }
Submission Info
Submission Time | |
---|---|
Task | C - Sugar Water |
User | vjudge1 |
Language | Bash (GNU bash v4.3.11) |
Score | 0 |
Code Size | 617 Byte |
Status | RE |
Exec Time | 3 ms |
Memory | 504 KB |
Judge Result
Set Name | Sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 0 / 300 | ||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | subtask0_0.txt, subtask0_1.txt, subtask0_2.txt |
All | 01.txt, 02.txt, 03.txt, 04.txt, 05.txt, 06.txt, 07.txt, 08.txt, 09.txt, subtask0_0.txt, subtask0_1.txt, subtask0_2.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
01.txt | RE | 3 ms | 504 KB |
02.txt | RE | 3 ms | 504 KB |
03.txt | RE | 3 ms | 504 KB |
04.txt | RE | 3 ms | 504 KB |
05.txt | RE | 3 ms | 504 KB |
06.txt | RE | 3 ms | 504 KB |
07.txt | RE | 3 ms | 504 KB |
08.txt | RE | 3 ms | 504 KB |
09.txt | RE | 3 ms | 504 KB |
subtask0_0.txt | RE | 3 ms | 504 KB |
subtask0_1.txt | RE | 3 ms | 504 KB |
subtask0_2.txt | RE | 3 ms | 504 KB |