CSES - Datatähti 2023 alku - Results
Submission details
Task:Lista
Sender:Laserr
Submission time:2022-11-12 20:29:37 +0200
Language:text (C++11)
Status:READY
Result:0
Feedback
groupverdictscore
#10
Test results
testverdicttimescore
#10.00 s0details

Code

#include<iostream>
#include<vector>

using namespace std;

vector<pair<int, int>> syote;
vector<int> lista(2023, 0); //tulostettava lista
vector<int> ll(2023, 0); //jaljella olevat luvut

vector<int> p(2023, 0); // kaydyt luvut
vector<int> valiaika; //valiaikainen lista johon tallentetaan luvut
int summa = 0; //valiaikaine haussa kaytettava summa
int mika = 0;
int tavoite = 0; 


void haku(int k) {
	if (valiaika.size() == 43) {
		if (summa == syote[mika].first) {

		}
	}
	if (k == 2023) {
		return;
	}
	else {
		haku(k+1);

		valiaika.push_back(k);
		summa += k + 1;
		haku(k + 1);
		summa -= k + 1;
		valiaika.pop_back();
	}
}

int main() {
	for (int i = 1; i <= 2023; i++)ll[i-1] = i;
	for (int i = 0; i < 100; i++) {
		int x;
		cin >> x;
		syote.push_back({ x, i });
	}

	for (int i = 0; i < 100; i++) {
		mika = i;
		tavoite = syote[i].first + 1;
		haku(1);
	}
	cout << "moi";
}

Test details

Test 1

Verdict:

input
58667 68283 64141 69169 67564 ...

correct output
688 488 1060 602 1171 471 322 ...

user output
#include<iostream>
#include<vector>

using namespace std;

...