0_0_38181795_18835.cpp:1:1: error: 'vector' does not name a type
vector<int> s;
^
0_0_38181795_18835.cpp:2:1: error: 'vector' does not name a type
vector<int> dp;
^
0_0_38181795_18835.cpp: In function 'int getY(int, int)':
0_0_38181795_18835.cpp:4:10: error: 'dp' was not declared in this scope
return (dp[k2]+s[k2]*s[k2])-(dp[k1]+s[k1]*s[k1]);
^
0_0_38181795_18835.cpp:4:17: error: 's' was not declared in this scope
return (dp[k2]+s[k2]*s[k2])-(dp[k1]+s[k1]*s[k1]);
^
0_0_38181795_18835.cpp: In function 'int getX(int, int)':
0_0_38181795_18835.cpp:7:12: error: 's' was not declared in this scope
return s[k2]-s[k1];
^
0_0_38181795_18835.cpp: In function 'int getVal(int, int)':
0_0_38181795_18835.cpp:10:12: error: 'dp' was not declared in this scope
return dp[j]+(s[i]-s[j])*(s[i]-s[j])+m;
^
0_0_38181795_18835.cpp:10:19: error: 's' was not declared in this scope
return dp[j]+(s[i]-s[j])*(s[i]-s[j])+m;
^
0_0_38181795_18835.cpp:10:42: error: 'm' was not declared in this scope
return dp[j]+(s[i]-s[j])*(s[i]-s[j])+m;
^
0_0_38181795_18835.cpp: At global scope:
0_0_38181795_18835.cpp:12:16: error: 'vector' does not name a type
int getM(const vector<int>& v){
^
0_0_38181795_18835.cpp:12:22: error: expected ',' or '...' before '<' token
int getM(const vector<int>& v){
^
0_0_38181795_18835.cpp: In function 'int getM(int)':
0_0_38181795_18835.cpp:13:2: error: 's' was not declared in this scope
s=vector<int>(n+1);
^
0_0_38181795_18835.cpp:13:4: error: 'vector' was not declared in this scope
s=vector<int>(n+1);
^
0_0_38181795_18835.cpp:13:11: error: expected primary-expression before 'int'
s=vector<int>(n+1);
^
0_0_38181795_18835.cpp:14:2: error: 'dp' was not declared in this scope
dp=vector<int>(n+1);
^
0_0_38181795_18835.cpp:14:12: error: expected primary-expression before 'int'
dp=vector<int>(n+1);
^
0_0_38181795_18835.cpp:15:17: error: 'n' was not declared in this scope
for(int i=1;i<=n;i++){
^
0_0_38181795_18835.cpp:16:18: error: 'v' was not declared in this scope
s[i]=s[i-1]+v[i];
^
0_0_38181795_18835.cpp:20:9: error: expected primary-expression before 'int'
vector<int> q(n+1);
^
0_0_38181795_18835.cpp:21:2: error: 'q' was not declared in this scope
q[tail++]=0;
^
0_0_38181795_18835.cpp:22:17: error: 'n' was not declared in this scope
for(int i=1;i<=n;i++){
^
0_0_38181795_18835.cpp:32:12: error: 'n' was not declared in this scope
return dp[n];
^
0_0_38181795_18835.cpp: In function 'int main()':
0_0_38181795_18835.cpp:35:5: error: 'cin' was not declared in this scope
cin>>n>>m;
^
0_0_38181795_18835.cpp:35:10: error: 'n' was not declared in this scope
cin>>n>>m;
^
0_0_38181795_18835.cpp:35:13: error: 'm' was not declared in this scope
cin>>n>>m;
^
0_0_38181795_18835.cpp:36:5: error: 'vector' was not declared in this scope
vector<int> w(n+1);
^
0_0_38181795_18835.cpp:36:12: error: expected primary-expression before 'int'
vector<int> w(n+1);
^
0_0_38181795_18835.cpp:38:11: error: 'w' was not declared in this scope
cin>>w[i];
^
0_0_38181795_18835.cpp:40:21: error: 'w' was not declared in this scope
printf("%d\n",getM(w));
^
0_0_38181795_18835.cpp:40:23: error: 'printf' was not declared in this scope
printf("%d\n",getM(w));
^
|