Submission #772835

#TimeUsernameProblemLanguageResultExecution timeMemory
772835ImeonA Difficult(y) Choice (BOI21_books)C++17
Compilation error
0 ms0 KiB
#include<bits/stdc++.h> //#include"books.h" using namespace std; void solve(int N, int K, long long A, int S) { cin >> N >> K >> S >> A; long long x[N + 1]; long long sm = 0; int f = 0; for (int i = 1; i <= S + 1;i++){ cin >> x[i]; // x[i] = skim(i); sm += x[i]; f++; if (f > K){sm -= x[i - K - 1];} if (f == K and sm >= A and sm <= 2ll * A){ vector<int>v; for (int j = i - K; j <= i; j++){ cout << j << " "; v.push_back(j); } cout << '\n'; // answer(v); } } cout << -1; //imposibble() } int main () { solve(4,4,4ll,2); }

Compilation message (stderr)

/usr/bin/ld: /tmp/cchBvQ9o.o: in function `main':
grader.cpp:(.text.startup+0x0): multiple definition of `main'; /tmp/ccgBYdUn.o:books.cpp:(.text.startup+0x0): first defined here
collect2: error: ld returned 1 exit status