제출 #716721

#제출 시각UTC-0아이디문제언어결과실행 시간메모리
7167212023-03-30 23:24:59snpmrnhlolBoat (APIO16_boat)C++17
100 / 100
923 ms4632 KiB
#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
int segs[250001],dp[250001];
int length[1001];
int segl[1001];
int l[501],r[501];
int dp2[1001];
int inv[250001];
vector <int> v2[1001];
int p(int a,int b){
int r = 1;
while(b > 0){
if(b%2 == 1)r = 1ll*r*a%mod;
a = 1ll*a*a%mod;
b/=2;
}
return r;
}
void precalc(){
for(int i = 0;i <= 250000;i++){
inv[i] = p(i,mod - 2);
}
}
int main(){
precalc();
int n,i,cnt = 1,j,cnt2 = 0,ans = 0;
cin>>n;
for(i = 0;i < n;i++){
cin>>l[i]>>r[i];
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...