| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1364837 | mrasool1665 | Strange Device (APIO19_strange_device) | C++20 | 5092 ms | 589824 KiB |
//MRasool kheyri
//iran -> khorasan -> ferdows -> Baghestan
//14/2/1405
//vasat azmoonima...
#include<bits/stdc++.h>
using namespace std ;
typedef long long ll ;
#define el '\n'
#define mid (l+r)/2
#define lid id<<1
#define rid lid|1
const ll maxn = 1e6 + 100 ;
const ll oo = 1e17 + 100 ;
ll n , A , B ;
void solve(){
cin>>n>>A>>B ;
set<pair<ll,ll>> s ;
for(ll i = 0 ; i < n ; i++){
ll l , r ;
cin>>l>>r ;
for(ll i = l ; i <= r ; i++){
s.insert({(i+(i/B))%A,i%B}) ;
}
}
cout<<s.size()<<el ;
return ;
}
int main(){
//ios_base::sync_with_stdio(0) , cin.tie(nullptr) , cout.tie(nullptr) ;
ll t = 1 ;
//cin>>t ;
while(t--){
solve() ;
}
return 0 ;
}| # | 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... | ||||
