# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1118074 | cpdreamer | Watching (JOI13_watching) | C++17 | 1002 ms | 6376 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;
#define P pair
#define S second
#define F first
#define all(v) v.begin(),v.end()
#define V vector
#define pb push_back
const ll MOD=998244353;
void file() {
freopen("input.txt.txt", "r", stdin);
freopen("output.txt.txt", "w", stdout);
}
void setIO(string s = "") {
if (!s.empty()){
freopen((s + ".in").c_str(), "r", stdin);
freopen((s + ".out").c_str(), "w", stdout);
}
ios::sync_with_stdio(false);
cin.tie(0);
}
long long intersection(const std::pair<long long, long long>& interval1,
const std::pair<long long, long long>& interval2) {
long long start = std::max(interval1.first, interval2.first);
long long end = std::min(interval1.second, interval2.second);
if (start <= end) {
return end - start + 1;
}
return 0;
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |