QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#244492 | #4486. Bragging Dice | ucup-team203# | AC ✓ | 200ms | 3700kb | C++20 | 778b | 2023-11-09 10:09:44 | 2023-11-09 10:09:44 |
Judging History
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