-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathtemplate Extended.cpp
More file actions
82 lines (64 loc) · 1.91 KB
/
Copy pathtemplate Extended.cpp
File metadata and controls
82 lines (64 loc) · 1.91 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
//
//
#include<iostream>
#include<vector>
#include<set>
#include<map>
#include<iterator>
#include<algorithm>
#include<cmath>
#include<unordered_map>
#include<bits/stdc++.h>
#define ll long long
#define pb push_back
#define deb(x) cout<<#x<<" = "<<x<<endl
#define deb2(x,y) cout<<#x<<" = "<<x <<", "<<#y<<" = "<<y<<endl
#define all(x) x.begin(), x.end()
using namespace std;
int main(){
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
// Save output to a file
// freopen ("myfile.txt","w",stdout);
int testCases;
cin>>testCases;
for(int t=0;t<testCases;t++){
/*string str;
getline(cin, str);
string a;
cin>>a;
// int to string
string tempSumStr = to_string(73846)
// String to int
string str1 = "31337 sdkh";
int myint1 = stoi(str1); // output => 31337
const char *str1 = "31337 sdkj";
int num1 = atoi(str1);
// To Lower case
transform(s.begin(), s.end(), s.begin(), ::tolower);
transform(s.begin(), s.end(), s.begin(), ::toupper);
// Unique
vector<int>::iterator ip;
ip = std::unique(v.begin(), v.begin() + 12);
v.resize(std::distance(v.begin(), ip));
// Sort in descending
sort(arr.begin(), arr.end(),greater<int>());
// Find
std::vector<int>::iterator it;
it = std::find (vec.begin(), vec.end(), required);
if (it != vec.end())
std::cout << "Element " << required <<" found at : "<< it - vec.begin();
else
std::cout << "Element not found";
// Bitwise even odd
// outputs 0/1 => 1 : 0
// (condition) if true : false
string res = number & 1 ? "odd":"even" ;
cout<<res;
*/
}
// Save Output to file
// fclose (stdout);
return 0;
}