Chat about anything! (Part 4)

It was a joke, do you not Know what jokes are

Fr tho

I’ll get @Son_BlueCube because you were hating on him you retard

Hello Son_BlueCube Here why were you making fun of me?

lmao imagine faking to be BlueCube

Im just dashy’s Middle brother

Reta-reta-Retarded Retard!

hu

>:)

Normally if you try to type these symbols: “>:)” and “>:(”, you will get this:

:)

:(

To bypass it, you need to place “<d>” just before the “>”

Like this:
>:(

>:)

I think the bug only works if you type the symbols without any character before it.

hmm…

#include <bits/stdc++.h>
using namespace std;

int st, en;
vector<pair<int, int>> g[1005];
long long int mdis = 1000000000;
vector<int> p;

void f(int c, vector<int> cp, long long int dis) {
  if(dis < mdis) {
    if(c == en) {
      p = cp;
      mdis = dis;
    } else {
      // cout << "->" << c;
      for(auto [np, d] : g[c]) {
        if(find(cp.begin(), cp.end(), np) == cp.end()) {
          cp.push_back(np);
          f(np, cp, dis + d);
          cp.pop_back();
        }
      }
    }
  }
}

int main() {
  vector<int> cp;
  int n, a, b, l;
  cin >> n >> st >> en;
  
  while(cin >> a >> b >> l) {
    if(a == 0 && b == 0 && l == 0) {
      break;
    } else {
      g[a].push_back(make_pair(b, l));
      g[b].push_back(make_pair(a, l));
    }
  }

  for(int i = 1; i <= n; i++) {
    sort(g[i].begin(), g[i].end());
  }

  cp.push_back(st);
  f(st, cp, 0);

  cout << mdis << endl;
  for(int i : p)
    cout << i << ' ';
  cout << endl;
  return 0;
}

This code wastes too many time hm
probably DFS needs much time
Imma use BFS instead

Are you studying C or C++?

c++

Oh ok.

Your finally back! Toho

The fourth test was a failure.

where has toho been all this time