Submission #667289

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
6672892022-12-01 03:58:52Darren0724Group Photo (JOI21_ho_t3)C++17
Compilation error
0 ms0 KiB
#include <bits/stdc++.h>
using namespace std;
struct BIT{
vector<int> v;
int n;
BIT(int n1){
n=n1;
v.resize(n+1);
}
void add(int p,int x){
for(int i=p;i<=n;i+=i&(-i)){
v[i]+=x;
}
}
int ask(int p){
int ans=0;
for(int i=p;i>0;i-=i&(-i)){
ans+=v[i];
}
return ans;
}
};
int main(){
ios_base::sync_with_stdio(false);
cin.tie(0);
int n;cin>>n;
vector<int> pos(n+1);
vector<vector<int>> cnt(n+2,vector<int>(n+2));
for(int i=1;i<=n;i++){
int k;cin>>k;
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

Main.cpp: In function 'int main()':
Main.cpp:51:24: error: 'INF' was not declared in this scope
   51 |     vector<int> dp(n+1,INF);
      |                        ^~~