# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
246143 | user202729 | Strange Device (APIO19_strange_device) | C++17 | 843 ms | 28532 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.
//oj.uz/problem/view/APIO19_strange_device
//already.
#ifndef LOCAL
#define NDEBUG 1
#endif
#include<bits/stdc++.h>
int main(){
std::ios::sync_with_stdio(0);std::cin.tie(0);
int number; int64_t a, b;
std::cin>>number>>a>>b;
auto const c=a/std::gcd(a, b+1);
int64_t const period=(double)b*(double)c>2e18 ? INT64_MAX: b*c;
struct Event{
bool open: 1;
uint64_t position: 63;
uint64_t key() const{
uint64_t result=position<<1|open;
assert(result==*(uint64_t*) this);
return result;
//return position;
}
bool operator<(Event it) const{
return key()<it.key();
}
};
# | 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... |