Submission #424316

#TimeUsernameProblemLanguageResultExecution timeMemory
424316lior5654Mechanical Doll (IOI18_doll)C++17
2 / 100
33 ms2980 KiB
#include "doll.h" #include <bits/stdc++.h> using namespace std; typedef long long int ll; typedef pair<ll, ll> pl; typedef vector<ll> vl; typedef vector<pl> vpl; typedef vector<vl> vvl; typedef vector<vpl> vvpl; typedef pair<int, int> pi; typedef vector<int> vi; typedef vector<pi> vpi; typedef vector<vi> vvi; typedef vector<vpi> vvpi; #define rep(i, n) for(int i = 0; i < n; ++i) #define all(c) (c.begin()), (c.end()) #define fi first #define se second #define pb push_back #define eb emplace_back #define csz(c) ((int)c.size()) #define what(x) cout << #x << "= " << x << endl // apples ORZZZZZZZZZZZZZZZZ vi c; vi x; vi y; void create_circuit(int m, vi a) { int n = a.size(); if(m == 4 && n == 4 && a[0] == 1 && a[1] == 2 && a[2] == 1 && a[3] == 3) { answer({1, -1, -2, 0, 2}, {2, -2}, {3, 1}); return; } c.resize(m+1, -1); int pre = 0; rep(i, n) { c[pre]= a[i]; pre = a[i]; } c[pre] = 0; rep(i, m+1) { if(c[i] == -1) { c[i] = i; } } answer(c, x, y); }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...