제출 #465341

#제출 시각아이디문제언어결과실행 시간메모리
465341dattranxxxArranging Shoes (IOI19_shoes)C++14
15 / 100
28 ms3120 KiB
/*
 * Author :  shora
 */
#include "shoes.h"
#include <bits/stdc++.h>
#define print(_v) for (auto &_ : _v) {cerr << _ << ' ';} cerr << endl;
using namespace std;
using ll = long long;
const int oo = 1e9;
ll n;
namespace task_2 {
	ll solve(vector<int>& a) {
		return 2;
	}
}

namespace task_3 {
	bool check(vector<int>& a) {
		for (int i = 0; i < n; ++i) 
			if (a[i] > 0 || a[i] != -a[i+n])
				return 0;
		return 1;
	}
}

long long count_swaps(std::vector<int> a) {
	n = a.size() / 2;
	return n * (n-1) / 2;
	if (n == 1) return a[0] < 0;
	if (task_3::check(a)) return n * (n-1);
	if (n <= 8) return task_2::solve(a);
	return -1;
}
#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...