# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
20192 | jihoon | 수열 (APIO14_sequence) | C++98 | 2088 ms | 86 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include<stdio.h>
int n,k;
long long sum[100001];
long long hsum[100001];
long long square[100001];
int backtrack[100001][201];
long long stk[100001][2];
long long dp[100001][2];
int stp;
long long inf;
long long calc(int i,int j,int turn){
long long a = sum[i],c = sum[j],b = dp[i][turn]-hsum[i],d = dp[j][turn]-hsum[j];
//printf("%lld %lld\n",a,c);
if(a==c){
if(b<d) return inf;
else return 0;
}
if(b<d){
return (b-d)/(c-a);
}else{
return (b-d+c-a-1)/(c-a);
}
}
int main(){
int now,target;
long long ans,ansn;
long long res;
scanf("%d %d",&n,&k);
Compilation message (stderr)
# | 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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |