112A

C++ implementation © 2026 Pedro Luis D.

View on Codeforces Logo
112A.cpp
// https://codeforces.com/problemset/problem/112/A
#include 
using namespace std;

int main()
{
    ios::sync_with_stdio(false);
    cin.tie(nullptr);

    string a, b;
    cin >> a >> b;

    for (int i = 0; i < a.size(); i++)
    {
        a[i] = tolower(a[i]);
    }

    for (int i = 0; i < b.size(); i++)
    {
        b[i] = tolower(b[i]);
    }

    if (a < b)
    {
        cout << -1 << "\n";
    }
    else if (b < a)
    {
        cout << 1 << "\n";
    }
    else if (b == a)
    {
        cout << 0 << "\n";
    }

    return 0;
}