# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
76677 | Xylofo | 통행료 (IOI18_highway) | C++14 | 70 ms | 11620 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "highway.h"
#include <bits/stdc++.h>
using namespace std;
#define rep(i,a,b) for(int i = a; i<(int)b; ++i)
using vi = vector<int>;
using ll = long long;
struct off_map {
map<vi,vi> m;
vi off;
off_map(int a) : off(a,0) {}
void inc(vi& x) {rep(i,0,x.size()) off[i] += x[i];}
vi get(vi&& y) {
rep(i,0,y.size()) y[i] -= off[i];
if(m.count(y)) return m[y];
else return vi{};
}
void ins(vi&& y, vi&& a) {
rep(i,0,y.size()) y[i] -= off[i];
vi &x = m[y];
x.insert(x.end(),a.begin(),a.end());
}
};
vi match;
vector<pair<int,int> > poss;
void mrg(off_map&a, off_map&b){
if(a.m.size() < b.m.size()) swap(a.m,b.m), swap(a.off,b.off);
vector<pair<vi,vi> > to_ins;
for(auto x:b.m) {
# | 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... |