Submission #976886

#TimeUsernameProblemLanguageResultExecution timeMemory
976886penguin133A Difficult(y) Choice (BOI21_books)C++17
0 / 100
5 ms2000 KiB
#include<vector> #include<cstdio> #include<set> #include<cstdlib> #include<cstdarg> #include<cassert> #include"books.h" #include <bits/stdc++.h> using namespace std; #define pi pair<int, int> #define pii pair<int, pi> #define fi first #define se second #ifdef _WIN32 #define getchar_unlocked _getchar_nolock #endif mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count()); void solve(int N, int K, long long A, int S) { __int128 X[N + 1]; X[0] = 0; for(int i = 1; i <= N; i++)X[i] = skim(i); for(int i = 1; i < N; i++){ assert(X[i] < X[i + 1]); } for(int i = 1; i <= N; i++)X[i] += X[i - 1]; for(int i = K; i <= N; i++){ if(X[i] - X[i - K] >= A && X[i] - X[i - K] <= A * 2){ vector <int> v; for(int j = i - K + 1; j <= i; j++)v.push_back(j); answer(v); return; } } impossible(); }
#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...
#Verdict Execution timeMemoryGrader output
Fetching results...