# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
291358 | muhammad_hokimiyon | Painting Walls (APIO20_paint) | C++14 | 1597 ms | 266364 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 "paint.h"
#include <bits/stdc++.h>
#define fi first
#define se second
#define ll long long
#define dl double long
using namespace std;
int t[100100];
vector < int > v[100100];
int minimumInstructions( int N, int M, int K, vector<int> C, vector<int> A, vector<vector<int>> B)
{
for( int i = 0; i < M; i++ ){
for( int j = 0; j < A[i]; j++ ){
int x = B[i][j];
v[x].push_back(i);
}
}
vector < int > len;
vector < int > d(M , 1e9);
vector < pair < int , int > > dd(M , make_pair(1e9 , 0));
int G = 0;
for( int i = N - 1; i >= 0; i-- ){
for( auto x : v[C[i]] ){
int y = x + 1;
if( y >= M )y -= M;
if( dd[y].fi != 1e9 && dd[y].se == G ){
# | 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... |