Submission #1192361

#TimeUsernameProblemLanguageResultExecution timeMemory
1192361woodCity Mapping (NOI18_citymapping)C++20
9 / 100
34 ms584 KiB
#include "citymapping.h"
#include <bits/stdc++.h>
using namespace std;

#define pb push_back
#define eb emplace_back
#define fi first
#define se second
typedef long long ll;
typedef pair<int, int> pint;
typedef pair<ll, ll> pll;
#define vint vector<int>
#define vpint vector<pint>
#define vll vector<ll>
#define vpll vector<pll>
#define fast_cin()                                                             \
	ios_base::sync_with_stdio(false);                                          \
	cin.tie(NULL);                                                             \
	cout.tie(NULL)
#define MOD %= 1000000007
#include <ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;
template <class T>
using Tree =
	tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
// are you certain that you have a clear idea of your code in your head?
// don't rush to the computer it'll only make it worse, it never works
// if this is the first time reading this you definitely need to go back and
// think about the implementation

void find_roads(int N, int Q, int A[], int B[], int W[]) {
	int n = N;
	int cur = 0;
	for(int i = 0; i<n; i++){
		for(int j = i+1; j<n; j++){
			if(get_distance(i+1,j+1)==1){
				A[cur] = i+1;
				B[cur] = j+1;
				W[cur] = 1;
				cur++;
			}
		}
	}
	cerr<<n<<endl;
	for(int i = 0; i<n-1; i++) cerr<<A[i]<<' '<<B[i]<<'\n';;
	cerr<<endl;
	return;
}
#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...