# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
477517 | hjc4vr | Studentsko (COCI14_studentsko) | C++14 | 0 ms | 0 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 <iostream>
#include <queue>
#include <stack>
#include <deque>
#include <set>
#include <vector>
#include <map>
#define int long long
using namespace std;
int ft[5005];
int query(int x){
int ans=0;
for (;x!=0;x-=x&(-x)) ans = max(ft[x],ans);
return ans;
}
void insert(int x,int val){
for (;x<=5004;x+=x&(-x)) ft[x] = val;
}
bool s(pair<int,int> &a,pair<int,int> &b){
if (a.first < b.first){
return true;
}
else if (a.first == b.first){
return a.second < b.second;
}else{
return false;
}
}