test
Bytebeat composer
Bytebeat player with a collection of many formulas from around the internet
test
#include <bits/stdc++.h>
using namespace std;
struct p {
int c;
int dis;
vector<int> pc;
p(int x, int y, vector<int> z) {
c = x;
dis = y;
pc = z;
}
};
int n, a, b, l, st, en, mdis = 100000000;
vector<pair<int, int>> g[1005];
queue<p> q;
vector<int> fa;
int main() {
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());
}
vector<int> v;
v.push_back(st);
p t(st, 0, v);
q.push(t);
while(!q.empty()) {
t = q.front(); q.pop();
int cc = t.c, cd = t.dis;
v = t.pc;
// cout << cc << ' ' << cd << ' ';
// for(int i : v) {
// cout << "->" << i;
// }
// cout << endl;
if(cd < mdis) {
if(cc == en) {
mdis = cd;
fa = v;
} else {
for(auto [np, d] : g[cc]) {
if(find(v.begin(), v.end(), np) == v.end()) {
v.push_back(np);
p temp(np, cd + d, v);
q.push(temp);
v.erase(v.end() - 1);
}
}
// cout << t.c << ' ' << t.dis << endl;
}
}
}
cout << mdis << endl;
for(int i : fa)
cout << i << ' ';
cout << endl;
return 0;
}
oh whats this
something you dont know I guess?
C++
oh ok (man one day ill learn coding)
Also can we private chat
okay where?
In the forum tho
I get his when I plan on going live. It wonβt connect to the chat.
It just shows a white dog appearing to bite a cable.
unrelated question but what operating systems do yall use (i use windows10 soon swapping to linux when support ends)
for my computer its chromeOS
for the phone? uh i think android
What linux distro are you gonna use?
I use Windows 11.
epic
im thinking either linux mint cinnamon or debian bookworm xfce
nice
what operating system you using rn
operating system? huh
Bytebeat player with a collection of many formulas from around the internet
DashcubyDev testing chords