abc189_a - Slot

Check if three values are equal.

Time complexity: $O(1)$

Memory complexity: $O(1)$

Click to show code.


using namespace std;
using ll = long long;
using ii = pair<int, int>;
using vi = vector<int>;
int main(void)
{
    ios::sync_with_stdio(false), cin.tie(NULL);
    string s;
    cin >> s;
    cout << (s[0] == s[1] and s[1] == s[2] ? "Won" : "Lost") << endl;
    return 0;
}