# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
914853 | starchan | Permutation (APIO22_perm) | C++17 | 199 ms | 1356 KiB |
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<bits/stdc++.h>
#include "perm.h"
using namespace std;
#define int long long
#define double long double
#define in pair<int, int>
#define f first
#define s second
#define pb push_back
#define pob pop_back
#define INF (int)1e17
#define MX (int)3e5+5
#define SSX (int)6
#define fast() ios_base::sync_with_stdio(false); cin.tie(NULL)
bool no_pre = true;
vector<pair<double, pair<in, vector<int>>>> bruter;
vector<pair<double, pair<in, vector<int>>>> brute;
bool valid(const vector<int> &t)
{
vector<int> a(SSX+1, 0), b(SSX+1, 0);
for(int i = 0; i < t.size(); i++)
{
if(t[i] > 0)
a[t[i]]++;
else
b[-t[i]]++;
}
for(int i = 1; i < SSX; i++)
{
if((a[i] >= 2) || (b[i] >= 2))
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |