QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#244492#4486. Bragging Diceucup-team203#AC ✓200ms3700kbC++20778b2023-11-09 10:09:442023-11-09 10:09:44

Judging History

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

  • [2023-11-09 10:09:44]
  • 评测
  • 测评结果:AC
  • 用时:200ms
  • 内存:3700kb
  • [2023-11-09 10:09:44]
  • 提交

answer

#include<stdio.h>
#include<iostream>
#include<vector>
#include<algorithm>
#include<queue>
#define rep(i,a,b) for(int i=a;i<=b;i++)
#define pb push_back
using namespace std;
typedef long long ll;
typedef pair<int,int> Pii;
typedef pair<ll,int> PIi;
const int maxn=1e6+10;
const ll inf = 0x3f3f3f3f3f3f3f3f;
//10:04 大概

int cnt[7];
int main()
{
    int _;  cin>>_;
    while(_--){
        rep(i,1,6) cnt[i]=0;
        int n;  cin>>n;
        rep(i,1,2*n){
            int x; scanf("%d",&x);
            cnt[x]++;
        }

        bool flag=false;
        rep(i,1,6) if(cnt[i]>1) flag=true;
        puts(flag?"Win!":"Just a game of chance");
    }
    fflush(stdin);
    getchar();
}
/*
6
6 1 2
3 5 2
2 4 6
5 2 2
5 6 20
3 8
6 5

*/

詳細信息

Test #1:

score: 100
Accepted
time: 200ms
memory: 3700kb

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