This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include "split.h"
#include<bits/stdc++.h>
#define pb push_back
#define pli pair<int,int>
#define fi first
#define se second
#define fastio ios_base::sync_with_stdio(false); cin.tie(NULL);
using namespace std;
using ll=long long;
const ll maxn=2e5;
const ll inf=1e18;
const ll mod=1e9+7;
vector<int> find_split(int n,int a,int b,int c,vector<int>p,vector<int>q)
{
int m=p.size();
vector<int> ans;
ans.resize(n,0);
for(int i=0;i<m;i++)
{
for(int j=i+1;j<m;j++)
{
if(p[i]!=p[j]&&p[i]!=q[j]&&q[i]!=p[j]&&q[i]!=q[j])
{
for(int k=0;k<n;k++)
{
ans[k]=3;
}
ans[p[i]]=1;
ans[q[i]]=1;
ans[p[j]]=2;
ans[q[j]]=2;
return ans;
}
}
}
return ans;
}
/*int main()
{
fastio
//freopen(TASKNAME".INP","r",stdin);
//freopen(TASKNAME".OUT","w",stdout);
auto cac=find_split(9, 4, 2, 3, {0, 0, 0, 0, 0, 0, 1, 3, 4, 5}, {1, 2, 3, 4, 6, 8, 7, 7, 5, 6});
for(auto zz:cac) cout << zz<<' ';
}*/
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |