#include "doll.h"
#include <bits/stdc++.h>
#define fi first
#define se second
#define lo long long
#define inf 1000000009
#define md 1000000007
#define li 100005
#define mp make_pair
#define pb push_back
#define mid (start+end)/2
using namespace std;
int tp[li],anahtar,vis[li];
vector<int> v[li],ans,x,y;
void create_circuit(int M,vector<int> A){
A.pb(0);
for(int i=0;i<(int)A.size()-1;i++){
tp[ A[i] ]++;
//v[A[i]].pb(A[i+1]);
}
ans[0]=A[0];
for(int i=0;i<(int)A.size();i++){
if(i==(int)A.size()-1) continue;
if(tp[A[i]]>1 && vis[A[i]]==0){
vis[A[i]]=1;
anahtar++;
ans[A[i]]=-anahtar;
//ans.pb(-anahtar);
x.pb(A[i+1]);
}
else if(tp[A[i]]>1 && vis[A[i]]==1){
y.pb(A[i+1]);
}
else if(tp[A[i]]==1){
ans[A[i]]=A[i+1];
}
else if(tp[A[i]]==0){
ans[A[i]]=1;
}
}
answer(ans,x,y);
}
//~ int main(){
//~ return 0;
//~ }
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
6 ms |
5068 KB |
Execution killed with signal 11 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
6 ms |
5068 KB |
Execution killed with signal 11 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
6 ms |
5068 KB |
Execution killed with signal 11 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
6 ms |
5068 KB |
Execution killed with signal 11 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
5 ms |
5196 KB |
Execution killed with signal 11 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
5 ms |
5196 KB |
Execution killed with signal 11 |
2 |
Halted |
0 ms |
0 KB |
- |