# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
168532 | muhammad_hokimiyon | K개의 묶음 (IZhO14_blocks) | C++14 | 232 ms | 80644 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#define fi first
#define se second
#define ll long long
using namespace std;
const int N = 1e5 + 7;
const int mod = 1e9 + 7;
ll n,k;
ll a[N];
ll d[111][N];
void solve()
{
cin >> n >> k;
for( int i = 1; i <= n; i++ ){
cin >> a[i];
d[1][i] = max( d[1][i - 1] , a[i] );
}
for( int i = 2; i <= k; i++ ){
d[i][i] = d[i - 1][i - 1] + a[i];
stack < pair < ll , ll > > st;
st.push({d[i - 1][i - 1] , a[i]});
for( int j = i + 1; j <= n; j++ ){
ll cnt = d[i - 1][j - 1];
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |