제출 #558602

#제출 시각아이디문제언어결과실행 시간메모리
558602savacskaBroken Device 2 (JOI22_device2)C++17
10 / 100
774 ms524288 KiB
#include "Anna.h"
#include <bits/stdc++.h>
#define pb push_back
#define mp make_pair
#define x first
#define y second

using namespace std;

typedef long long ll;
typedef long double ld;

namespace
{
 	const int LEN = 2000;
}

int Declare()
{
	return LEN;
}

pair <vector <int>, vector <int> > Anna(ll A)
{
	for (int i = 1; i <= LEN; i++)
	{
	 	if (2ll * i + 1 >= A)
	 	{
	 		A--;
	 		vector <int> s(i), t(i);
	 		for (int j = 0; j < i; j++)
	 			if (A > 0) s[j] = 1, A--;
	 		for (int j = 0; j < i; j++)
	 			if (A > 0) t[j] = 1, A--;
	 		return mp(s, t);
	 	}
	 	A -= 2ll * i + 1;
	}
}
#include "Bruno.h"
#include <bits/stdc++.h>
#define pb push_back
#define mp make_pair
#define x first
#define y second

using namespace std;

typedef long long ll;
typedef long double ld;

namespace
{
	const int LEN = 2000;
}


ll Bruno(vector <int> u)
{
	ll cur = 0;
	for (int i = 1; 2 * i < (int) u.size(); i++)
		cur += 2 * i + 1;

	int sum = 0;
	for (int c : u) sum += c;

	cur += sum + 1;
	return cur;
}

컴파일 시 표준 에러 (stderr) 메시지

Anna.cpp: In function 'std::pair<std::vector<int>, std::vector<int> > Anna(ll)':
Anna.cpp:39:1: warning: control reaches end of non-void function [-Wreturn-type]
   39 | }
      | ^
#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...