QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#377315 | #7986. 游戏 | AChievedreaM# | WA | 1ms | 3764kb | C++17 | 538b | 2024-04-05 12:20:52 | 2024-04-05 12:20:53 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
using ll=long long;
using db=double;
const ll N=1e6+5;
ll a[N];
int main()
{
ios::sync_with_stdio(0),cin.tie(0),cout.tie(0);
ll t,n,a,b;
t=1;
//cin>>t;
while(t--)
{
map<ll,ll>mp;
cin>>n;
for(ll i=1;i<=n-1;i++)
{
cin>>a>>b;
if(a>b)
swap(a,b);
mp[a]++;
}
ll f=1;
for(auto s:mp)
{
if(s.second==1)
f=0;
}
if(mp[1]==1)
f=1;
if(f)
cout<<"You win, temporarily.";
else
cout<<"Wasted.";
}
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 1ms
memory: 3628kb
input:
6 1 2 2 3 2 4 1 5 5 6
output:
Wasted.
result:
ok single line: 'Wasted.'
Test #2:
score: 0
Accepted
time: 0ms
memory: 3764kb
input:
7 1 2 2 3 2 4 1 5 5 6 5 7
output:
You win, temporarily.
result:
ok single line: 'You win, temporarily.'
Test #3:
score: -100
Wrong Answer
time: 0ms
memory: 3492kb
input:
1
output:
You win, temporarily.
result:
wrong answer 1st lines differ - expected: 'Wasted.', found: 'You win, temporarily.'