QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#466476 | #8055. Balance | ucup-team2307# | WA | 0ms | 3576kb | C++20 | 1.3kb | 2024-07-07 21:09:16 | 2024-07-07 21:09:18 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
//#define int ll
#define rep(i, a, b) for(int i = a; i < (b); ++i)
#define all(x) begin(x), end(x)
#define sz(x) (int)(x).size()
using pii = pair<int, int>;
using vi = vector<int>;
#define fi first
#define se second
#define pb push_back
signed main() {
cin.tie(0)->sync_with_stdio(0);
cin.exceptions(cin.failbit);
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
int t=rng()%5+1;
cout<<t<<"\n";
while(t--)
{
int n=rng()%5+2,m=rng()%5;
vector<int> perm(n);
iota(all(perm),1);
shuffle(all(perm),rng);
vector<pii> edges;
for(int i=1;i<n;i++)
{
int j=rng()%i;
if(rng()%2)
edges.pb({perm[i],perm[j]});
else
edges.pb({perm[j],perm[i]});
}
while(m--)
{
int i=rng()%n;
int j=i;
while(j==i)
j=rng()%n;
edges.pb({perm[i],perm[j]});
}
shuffle(all(edges),rng);
cout<<n<<" "<<edges.size()<<"\n";
for(auto[x,y]:edges)
cout<<x<<" "<<y<<"\n";
while(n--)
cout<<rng()%5+1<<" ";
cout<<"\n";
}
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 0
Wrong Answer
time: 0ms
memory: 3576kb
input:
5 5 4 1 2 2 3 3 4 4 5 1 2 3 4 5 5 4 1 2 1 3 1 4 1 5 1 2 3 4 5 5 4 1 2 1 3 1 4 1 5 1 2 2 2 3 5 6 1 2 1 2 2 3 3 4 4 5 3 5 1 2 1 2 1 2 2 1 2 1 2 1 2
output:
5 5 7 1 4 1 3 4 1 2 4 4 2 3 4 1 5 1 5 5 5 3 5 4 2 1 5 1 5 3 3 4 3 3 3 4 2 6 8 3 1 1 6 6 1 2 4 6 4 3 4 1 2 4 5 3 1 1 3 1 4 6 5 6 5 6 2 2 4 3 5 1 2 4 2 4 4 1 1 2 3 2 1 2 1 1 2 2 2
result:
wrong answer Token parameter [name=yesno] equals to "5", doesn't correspond to pattern "Yes|No" (test case 1)