Submission #1034792

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
10347922024-07-25 18:23:04anangoAlternating Current (BOI18_alternating)C++17
0 / 100
3067 ms6260 KiB
#include <bits/stdc++.h>
#define int long long
using namespace std;
int INF = 1LL<<30;
int n,m;
vector<pair<int,int>> segments;
vector<int> indices,invindices;
bool inside(int a, int b, int c) {
//is it a,b,c in this order?
bool ans = (a<=b && b<=c) || (a<=b && b>c && c<a) || (a>b && b<=c && c<a);
////cout << a <<" " << b <<" " << c <<" " << ans << endl;
return ans;
}
bool between(pair<int,int> s1, pair<int,int> s2) {
//is s2 fully between s1's endpoints
int a=s1.first; int b = s1.second; int c = s2.first; int d = s2.second;
bool ans = inside(a,c,d) && inside(c,d,b) && inside(a,c,b) && inside(a,d,b);
////cout << a <<" " << b <<" " << c <<" " <<d << " " << ans << endl;
return ans;
}
bool works(vector<int> ans) {
//1 implies 0-covered, 2 implies 1-covered
set<int> remset0;
set<int> remset1;
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...