-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathprocesscyc.cpp
More file actions
50 lines (44 loc) · 870 Bytes
/
processcyc.cpp
File metadata and controls
50 lines (44 loc) · 870 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#include <iostream>
#include <cstdlib>
using namespace std;
int main()
{
int n, k, i, s;
for(n=2; n<=20; n++)
{
cout<<n<<"\t";
for(k=2; k<=5; k++)
{
float mintime = 1000;
for(i=1; i<=3; i++)
{
bool done = false;
float totals = 0;
int numas = 0;
for(s=2; s<=10; s++)
{
int rn, rk, ri, rs;
int prevnumas = 0;
string dummy;
float time;
cin>>rn>>rk>>ri>>rs;
cin>>numas;
cin>>dummy>>time;
cin>>dummy>>dummy;
cin>>dummy>>dummy;
//cout<<n<<" "<<k<<" "<<i<<" "<<time<<endl;
if(!done)
totals += time;
if(numas > 0)
done = true;
}
//cout<<n<<" "<<k<<" "<<i<<" "<<totals<<endl;
if(totals<mintime)
mintime=totals;
}
int mt = 1000*mintime;
cout<<"\t"<<mt;
}
cout<<endl;
}
}