QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#49507#4545. Triangle GameCDsmen#AC ✓5ms3420kbC++865b2022-09-21 19:34:372022-09-21 19:34:37

Judging History

This is the latest submission verdict.

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2022-09-21 19:34:37]
  • Judged
  • Verdict: AC
  • Time: 5ms
  • Memory: 3420kb
  • [2022-09-21 19:34:37]
  • Submitted

answer

#include <bits/stdc++.h>
#define IO ios::sync_with_stdio(false), cin.tie(0), cout.tie(0)
using namespace std;
typedef long long llint;

inline int read()
{
    int ans = 0, w = 1;
    char ch = getchar();
    while (ch < '0' || ch > '9')
    {
        if (ch == '-')
            w = -1;
        ch = getchar();
    }
    while (ch >= '0' && ch <= '9')
    {
        ans = ans * 10 + ch - '0';
        ch = getchar();
    }
    return ans * w;
}

inline void solve()
{
    int a = read(), b = read(), c = read();
    int sum = (a - 1) ^ (b - 1) ^ (c - 1);
    if (sum != 0)
    {
        puts("Win");
    }
    else
        puts("Lose");
}

int main()
{
    // IO;
    //  init();
    int tt = 1;
    tt = read();
    //   scanf("%d", &tt);
    while (tt--)
    {
        solve();
        // cout << tt << endl;
    }
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 5ms
memory: 3420kb

input:

10000
1 1 1
1 2 2
1 3 3
1 4 4
1 5 5
1 6 6
1 7 7
1 8 8
1 9 9
1 10 10
1 11 11
1 12 12
1 13 13
1 14 14
1 15 15
1 16 16
1 17 17
1 18 18
1 19 19
1 20 20
2 1 2
2 2 1
2 2 2
2 2 3
2 3 2
2 3 3
2 3 4
2 4 3
2 4 4
2 4 5
2 5 4
2 5 5
2 5 6
2 6 5
2 6 6
2 6 7
2 7 6
2 7 7
2 7 8
2 8 7
2 8 8
2 8 9
2 9 8
2 9 9
2 9 10
2...

output:

Lose
Lose
Lose
Lose
Lose
Lose
Lose
Lose
Lose
Lose
Lose
Lose
Lose
Lose
Lose
Lose
Lose
Lose
Lose
Lose
Lose
Lose
Win
Win
Win
Win
Lose
Lose
Win
Win
Win
Win
Lose
Lose
Win
Win
Win
Win
Lose
Lose
Win
Win
Win
Win
Lose
Lose
Win
Win
Win
Win
Lose
Lose
Win
Win
Win
Win
Lose
Lose
Win
Win
Win
Win
Lose
Lose
Win
Win
...

result:

ok 10000 lines