Submission #1007683

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
10076832024-06-25 10:14:36doducanhtrapezoid (balkan11_trapezoid)C++14
45 / 100
1081 ms18600 KiB
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define fi first
#define se second
const int maxn=1e5+7;
const int mod=30013;
const int maxx=1e15+7;
pair<int,int> cmax(pair<int,int>a,pair<int,int>b)
{
if(a.fi<b.fi)a=b;
else{
if(a.fi==b.fi&&a.fi!=0)a.se=(a.se+b.se)%mod;
}
return a;
}
int id(int x,vector<pair<int,int>>tmp)
{
return lower_bound(tmp.begin(),tmp.end(),make_pair(x,-maxx))-tmp.begin()+1;
}
struct BIT
{
int n;
vector<pair<int,int>>t;
BIT(){}
BIT(int n):n(n),t(n+7){}
void up(int x,pair<int,int> val){
for(;x<n;x+=(x&(-x)))t[x]=cmax(t[x],val);
}
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

trapezoid.cpp:44:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
   44 | main()
      | ^~~~
#Verdict Execution timeMemoryGrader output
Fetching results...