├── Chef and NextGen.cpp ├── Find maximum in an Array.cpp └── Lucky Four.cpp /Chef and NextGen.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | using namespace std; 3 | 4 | int main() { 5 | int t; 6 | cin >> t; 7 | while(t--) 8 | { 9 | int a,b,x,y; 10 | cin >> a >> b >> x >> y; 11 | if(a*b <= x*y) 12 | { 13 | cout << "YES" << endl; 14 | } 15 | else 16 | { 17 | cout << "NO" << endl; 18 | } 19 | } 20 | return 0; 21 | } 22 | -------------------------------------------------------------------------------- /Find maximum in an Array.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | using namespace std; 3 | 4 | int main() { 5 | int t; 6 | cin >> t; 7 | while(t--) 8 | { 9 | int a; 10 | cin >> a; 11 | vector arr(a); 12 | for(int i=0;i> arr[i]; 15 | } 16 | sort(arr.begin(),arr.end()); 17 | cout << arr[arr.size()-1] << endl; 18 | } 19 | return 0; 20 | } 21 | -------------------------------------------------------------------------------- /Lucky Four.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | using namespace std; 3 | 4 | int main() { 5 | int t; 6 | cin >> t; 7 | int count =0; 8 | for(int i=0;i> a; 12 | int b = a.length(); 13 | for(int j=0;j< b;j++) 14 | { 15 | if(a[j] == '4') 16 | { 17 | count++; 18 | } 19 | } 20 | cout << count <