-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path112A.cpp
43 lines (39 loc) · 897 Bytes
/
112A.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
#include <iostream>
#include <vector>
#include <set>
#include <queue>
#include <stack>
#include <map>
#include <string>
#include <algorithm> // sort and math
#include <iomanip> // set int
#include <cstdlib> // srand()/rand()
#include <ctime> // time()
#include <unistd.h> // sleep()/usleep()
#include <sstream> // split string
#include <fstream> // files
#include <utility> // pair
using namespace std;
string toLowerCase(string str){
transform(str.begin(), str.end(), str.begin(), ::tolower);
return str;
}
int main(){
ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
string s1, s2;
getline(cin, s1);
getline(cin, s2);
string lowerStr1 = toLowerCase(s1);
string lowerStr2 = toLowerCase(s2);
if(lowerStr1 == lowerStr2){
cout << 0;
}
else if(lowerStr1 > lowerStr2){
cout << 1;
}
else{
cout << -1;
}
}