QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#46195#4486. Bragging DicemiaomiaoziAC ✓345ms4372kbC++171.0kb2022-08-26 16:01:192022-08-26 16:01:21

Judging History

你现在查看的是最新测评结果

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2022-08-26 16:01:21]
  • 评测
  • 测评结果:AC
  • 用时:345ms
  • 内存:4372kb
  • [2022-08-26 16:01:19]
  • 提交

answer

#include <bits/stdc++.h>
using namespace std;
// https://space.bilibili.com/672346917

#ifndef LOCAL
#define LOG(...) 42
#endif

#define fi first
#define se second
#define pb push_back
#define endl '\n'
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()

typedef long long LL;
typedef pair <int, int> PII;

constexpr int inf = 0x3f3f3f3f;
constexpr double EPS = 1e-8;
const double PI = acos(-1);

int multi_cases = 1;

void A_SOUL_AvA () {
    int n;
    cin >> n;

    vector <int> a(n), b(n);
    for (int i = 0; i < n; i++) {
        cin >> a[i];
    }
    for (int i = 0; i < n; i++) {
        cin >> b[i];
    }

    set <int> A(all(a)), B(all(b));
    if (A.size() == n && B.size() == n) {
        cout << "Just a game of chance.\n";
    } else {
        cout << "Win!\n";
    }
}

int main () {
    cin.tie(nullptr)->sync_with_stdio(false);
    cout << fixed << setprecision(12);

    int T = 1;
    for (multi_cases && cin >> T; T; T--) {
        A_SOUL_AvA ();
    }

    return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 345ms
memory: 4372kb

input:

30
5
4 6 4 1 2
3 6 6 2 3
5
6 4 5 1 2
5 2 4 6 4
10
6 4 6 3 5 3 1 6 4 5
6 4 3 1 3 4 5 1 6 2
10
3 4 6 3 4 6 3 5 6 4
6 3 5 1 3 2 5 5 6 3
100000
1 6 4 4 2 6 5 1 4 3 4 5 1 4 6 3 1 3 4 5 1 1 5 3 3 6 5 4 6 6 3 1 2 5 6 3 2 3 1 3 3 2 1 1 4 6 4 6 6 3 4 3 2 3 1 3 1 1 1 5 4 5 3 1 2 3 3 6 2 5 6 5 5 3 4 2 2 5 4 5 ...

output:

Win!
Win!
Win!
Win!
Win!
Win!
Win!
Win!
Win!
Win!
Win!
Win!
Win!
Win!
Win!
Win!
Win!
Win!
Win!
Win!
Win!
Win!
Win!
Win!
Win!
Win!
Win!
Win!
Win!
Win!

result:

ok 30 lines