# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
708099 | veehj | Strange Device (APIO19_strange_device) | C++17 | 1854 ms | 100088 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;
typedef long long ll;
typedef long double ld;
#define F first
#define S second
#define pb push_back
#define sz(a) (int)a.size()
#define all(x) (x).begin(), (x).end()
int main() {
ll n, a, b; cin >> n >> a >> b;
map<ll, ll> mp;
while(n--){
ll l, r; cin >> l >> r;
l%=a*b;
r%=a*b;
if(l>r){
mp[l]++;
mp[a*b]--;
mp[0]++;
mp[r+1]--;
}
else{
mp[l]++;
mp[r+1]--;
}
} // 1 0 1 -1 -1 0 1 0 -1
// 1 1 2 1 0 1 1 0
ll cnt=0, nw=0, ans=0, bul=0;
# | 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... |
# | 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... |