-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTest Cases.cpp
50 lines (44 loc) · 899 Bytes
/
Test Cases.cpp
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>
using namespace std;
//Driver code
int main()
{
int n, cpuL, memL,diff, cpu_use, mem_use;
cin >> n >> cpuL >> memL;
bool flag = true;
int a=2;
for(int i=1; i<=n; i++)
{
for(int j=1; j<=1; j++)
{
cin >> diff >> cpu_use >> mem_use;
if(cpu_use>cpuL)
{
cout << "CLE" << endl;
flag = false;
break;
}
else if(mem_use>memL)
{
cout << "MLE" <<endl;
flag = false;
break;
}
if(diff != 0)
{
cout << "WA" << endl;
flag = false;
break;
}
}
if(!flag)
{
break;
}
}
if(flag)
{
cout << "AC" << endl;
}
return 0;
}