Submission #1063856

#TimeUsernameProblemLanguageResultExecution timeMemory
1063856pravcoderWiring (IOI17_wiring)C++17
0 / 100
13 ms2936 KiB
#include "wiring.h"
#include <cmath>
#include <cstdio>
#include <vector>
#include <iostream>
#include <algorithm>
#include <string>
using namespace std;

typedef long long ll;
typedef vector<int> vi;
typedef vector<vi> v2i;
typedef pair<int, int> pi;
typedef vector<pi> vpi;
typedef vector<bool> vb;

#define pb push_back
#define mp make_pair
#define rept(i, a, b) for (int i = a; i < b; i++)
#define rep(i, n) for (int i = 0; i < n; i++)

long long min_total_length(std::vector<int> r, std::vector<int> b) {
	ll length = 0;
	int n = r.size(), m = b.size();
	for (auto x : r) {
		length += b[0] - x;
	}
	for (auto x : b) {
		length += x - b[0];
	}
	return length;
}

Compilation message (stderr)

wiring.cpp: In function 'long long int min_total_length(std::vector<int>, std::vector<int>)':
wiring.cpp:24:6: warning: unused variable 'n' [-Wunused-variable]
   24 |  int n = r.size(), m = b.size();
      |      ^
wiring.cpp:24:20: warning: unused variable 'm' [-Wunused-variable]
   24 |  int n = r.size(), m = b.size();
      |                    ^
#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...