제출 #414737

#제출 시각아이디문제언어결과실행 시간메모리
414737milleniumEeeeA Difficult(y) Choice (BOI21_books)C++14
5 / 100
278 ms476 KiB
#include <bits/stdc++.h> #include "books.h" // start my defines #define fr first #define sc second #define pii pair<int, int> #define pb push_back #define szof(s) (int)s.size() #define all(s) s.begin(), s.end() #define I64 long long template<class T>void umax(T &a,T b){if(a < b)a = b;} template<class T>void umin(T &a,T b){if(b < a)a = b;} // finish my defines #ifndef EVAL #include "grader.cpp" #endif using namespace std; // answer(vector <int> v) // skim(int i) const int MAXN = (int)1e5 + 5; I64 arr[MAXN]; void solve(int N, int K, I64 A, int S) { for (int i = 1; i <= N; i++) { arr[i] = skim(i); } I64 cur = 0; for (int i = 1; i <= N; i++) { for (int j = i + 1; j <= N; j++) { for (int k = j + 1; k <= N; k++) { cur = arr[i] + arr[j] + arr[k]; if (A <= cur && cur <= A + A) { answer({i, j, k}); 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...