# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
764509 | Ahmed57 | Boat (APIO16_boat) | C++17 | 1453 ms | 8308 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 <bits/stdc++.h>
using namespace std;
long long mod = 1000000007;
long long fast(long long a,long long b){
if(b==0)return 1;
if(b==1)return a;
long long h = fast(a,b/2);h*=h;h%=mod;
if(b%2==0)return h;
else return (h*a)%mod;
}
signed main(){
ios_base::sync_with_stdio(false);cin.tie(0);
int n;
cin>>n;
long long rev[n+1];
for(int i = 0;i<=n;i++){
rev[i] = fast(i,mod-2);
}
vector<pair<long long,long long>> v;
vector<long long> ans;
for(int i = 0;i<n;i++){
long long x,y;
cin>>x>>y;
v.push_back({x,y});
ans.push_back(x-1);
ans.push_back(y);
}
ans.push_back(0);
sort(ans.begin(),ans.end());
ans.resize(unique(ans.begin(),ans.end())-ans.begin());
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |