Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

Pragram1.

cpp

GPragram1.cppFog(int, int, int,int)


1 #includecbits/stdc++. h>
2 using namespace std;
3
1 fog function
5 int fog(int x, int y, int z, int n)
6 vector<pair<int, int>> f;
7 vector<paireint, int>> g;
8
9
f.push back(make_pair(x, y)
10
9-push back(make_pair(y, 2)}
int ans1 = 0;
11 it « "fog of function is:"< endl;
12 for(int i =0; i<n; i++)
13 ansl glftf[i].first].second].second
14
15 return ans1;
16
17 1 gof function
18 int gof(int x, int y, int z, int n){
19 vector<pair<int,int>> f;
20 vectorspair<int, int>> g:
21 f.push_back(make_pair(x, y)
22
9.pushback (make_pair(y, 2));
23 int ans= 0;
24 cout < "gof of function is:" << endl;
25 for(int i = 0; i < n; it+){

26
27
ans
flglgti].first]. second].second;
28 return ans;
29
30
30
31 int main()
32 11 Input the size of segment A,B,C;
33 int n;
34 cin > n;
35 1 Input segment A
36 vector<int> a;
37 for(auto &vall: a) cin >» vall;
38 1 Input segment B
39 vector<int> b;
40 for(auto &val2: b)) cin >> val2;
41 11 Input segment C
42 vectorcint> c;
43 for(auto 6val3: c)cin val3;
44
45 // Calling fog function
46 for(int i = i
0;
<n; i+){
47 cout < fog(a[il, b[il, c[i], n) «< endl;
48
49 1/ Calling gof function
50 for(int i = 0; i < n; i+){

51 cout gof (a[il, b[il, c[il, n) «« endl;


52
53 return ;
54

You might also like