제출 #1275266

#제출 시각아이디문제언어결과실행 시간메모리
1275266rafsanamin2020Arranging Shoes (IOI19_shoes)C++20
0 / 100
1 ms336 KiB
#include <bits/stdc++.h>
#include "shoes.h"

using namespace std;

// long long count_swaps(std::vector<int> s)
// {
// 	int N = s.size(), p = 0, n = 0;

// 	queue<int> neg;
// 	queue<int> pos;

// 	int swp = 0;

// 	for (int i = 0; i < N; i += 2)
// 	{
// 		if (s[i + (neg.size() % 2)] > 0)
// 		{
// 			neg.push(i);
// 		}
// 		if (s[i + 1 - (neg.size() % 2)] < 0)
// 		{
// 		}
// 	}

// 	return std::max(p, n);
// }

long long count_swaps(std::vector<int> s)
{
	long long N = s.size();

	return N * (N - 1) / 2;
}
#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...