이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#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... |