forked from dixitt5/CP-Solutions
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstack.cpp
More file actions
49 lines (45 loc) · 1.01 KB
/
Copy pathstack.cpp
File metadata and controls
49 lines (45 loc) · 1.01 KB
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
#include <bits/stdc++.h>
using namespace std;
#define lli long long int
#define pb push_back
#define rep(i, a, b) for (int i = a; i < b; i++)
#define vl vector<lli>
#define vi vector<int>
#define lb lower_bound
#define ub upper_bound
#define sum(v) accumalate(v.begin(),v.end(),0)
#define mii map<int,int>
#define umii unordered_map<int,int>
#define order(v) sort(v.begin(),v.end())
#define endl '\n'
#define yes cout<<"YES"<<endl
#define no cout<<"NO"<<endl
const int N = 1e5 + 2;
bool prime[100000];
void SieveOfEratosthenes()
{
memset(prime, true, sizeof(prime));
for (int p = 2; p * p <= 100000; p++)
{
if (prime[p] == true)
{
for (int i = p * p; i <= 100000; i += p)
prime[i] = false;
}
}
}
// code to know the stack using stl function
void solve1()
{
stack<int> s;
int x;
while(cin >> x)
s.push(x);
}
int main()
{
cin.tie(0);
ios_base::sync_with_stdio(false);
solve1();
return 0;
}