| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1367871 | hmms127 | Strange Device (APIO19_strange_device) | C++20 | 157 ms | 16084 KiB |
#include "bits/stdc++.h"
using namespace std;
#define f1(n) for(int i=0;i<n;i++)
#define f2(m,n,q) for(int i=m;i<n;i+=q)
#define int long long
#define pb push_back
constexpr int N=1e3+5,inf=1e18;
using pr=pair<int,int>;
using ar=array<int,3>;
signed main() {
ios::sync_with_stdio(false);cin.tie(nullptr);
int n,a,b;cin>>n>>a>>b;
int l[n],r[n];f1(n)cin>>l[i]>>r[i];
map<pr,int>mp;int mx=(a%2 ? a:a/2);
int cnt=0;
f1(n) {
cnt+=(r[i]-l[i]+1);
if (cnt>mx)break;
}
cout<<min(mx,cnt);
}| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
