Submission #46309

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
463092018-04-19 04:36:32RayaBurong25_1Split the sequence (APIO14_sequence)C++17
0 / 100
2071 ms86268 KiB
#include <stdio.h>
#include <vector>
#include <algorithm>
#include <cassert>
#define INF 1e18
long long Sum[100005];
long long SumSq[100005];
long long DP[100005];
int Last[100005][205];
typedef struct line line;
struct line
{
long long m, c;
double s;
int i;
};
line Lines[100005];
int L;
long long max(long long a, long long b)
{
return (a > b)?a:b;
}
int compare(long long x, line l)
{
return x < l.s;
}
int I, J;
long long getLine(long long x)
{
int i;
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

sequence.cpp: In function 'long long int getLine(long long int)':
sequence.cpp:30:9: warning: unused variable 'i' [-Wunused-variable]
     int i;
         ^
sequence.cpp: In function 'int main()':
sequence.cpp:76:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
     scanf("%d %d", &N, &K);
     ~~~~~^~~~~~~~~~~~~~~~~
sequence.cpp:80:14: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
         scanf("%lld", &Sum[i]);
         ~~~~~^~~~~~~~~~~~~~~~~
sequence.cpp: In function 'void insertLine(int, long long int, long long int)':
sequence.cpp:69:18: warning: 's' may be used uninitialized in this function [-Wmaybe-uninitialized]
         Lines[L] = {m, c, s, ii};
         ~~~~~~~~~^~~~~~~~~~~~~~~
#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...