# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
254189 | shayan_p | Homecoming (BOI18_homecoming) | C++14 | 189 ms | 118140 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
// And you curse yourself for things you never done
#include<bits/stdc++.h>
#define F first
#define S second
#define PB push_back
#define sz(s) int((s).size())
#define bit(n,k) (((n)>>(k))&1)
using namespace std;
typedef long long ll;
typedef pair<int,int> pii;
const int maxn = 2e6 + 10, mod = 1e9 + 7;
const ll inf = 1e18;
int a[maxn], b[maxn];
ll dp[maxn][2], A[maxn], B[maxn];
ll solve(int n, int k, int *a, int *b){
for(int i = 0; i < n; i++)
A[i] = a[i] - b[i];
ll sm = 0;
for(int i = 1; i <= k-1; i++)
sm+= a[n-i];
for(int i = 0; i < n; i++)
B[i] = -sm, sm+= a[i], sm-= a[(i + n - k + 1) % n];
ll ans = 0;
# | 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... |