QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#708182#4781. 完美的集合NineSuns0 0ms3648kbC++141.1kb2024-11-03 20:06:512024-11-03 20:06:52

Judging History

你现在查看的是最新测评结果

  • [2024-11-03 20:06:52]
  • 评测
  • 测评结果:0
  • 用时:0ms
  • 内存:3648kb
  • [2024-11-03 20:06:51]
  • 提交

answer

#include <bits/stdc++.h>
#define ll long long
#define pii pair <int, int>
#define fi first
#define se second
#define pb push_back
#define pil pair <int, ll> 
#define LL __int128

using namespace std;
mt19937 rnd(chrono::steady_clock::now().time_since_epoch().count());
const int N = 65, S = 10005; 
const ll mod = 11920928955078125;  
int n, m, c; 
ll M, w[N], v[N], k, dis[N][N], f[N][S]; 
vector <pil> e[N];

void dfs (int rt, int p, int fa) {
	for (auto i : e[p]) {
		if (i.fi == fa) continue; 
		dis[rt][i.fi] = dis[rt][p]+i.se; dfs(rt, i.fi, p); 
	}
}

vector <int> tmp1, tmp2; 
void dp (int p, int fa) {
	
}

void solve () {
	cin >> n >> m >> k >> M;
	for (int i = 1;i <= n;i++) cin >> w[i];
	for (int i = 1;i <= n;i++) cin >> v[i]; 
	for (int i = 1;i < n;i++) {
		int x, y; ll c; cin >> x >> y >> c; 
		e[x].pb({y, c}); e[y].pb({x, c}) ;
	}
	for (int i = 1;i <= n;i++) dfs(i, i, 0); 
	dp(1, 0); 
}

signed main () {
	ios::sync_with_stdio(0);
	cin.tie(0); cout.tie(0);
	return 0; 
	int T = 1; 
	while (T--) solve();
	return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 0
Wrong Answer

Test #1:

score: 0
Wrong Answer
time: 0ms
memory: 3636kb

input:

16 109 1 4025082
46 68 46 1 46 67 111 1 156 1 45 45 1 45 45 45
8525 12789 8526 0 8526 12788 954 0 6 0 8525 8526 0 8525 8526 8526
1 2 290
1 3 188
1 4 420
1 5 6
2 6 29
1 7 643
1 8 461
4 9 468
1 10 228
5 11 428
2 12 71
4 13 290
1 14 957
2 15 955
4 16 549

output:


result:

wrong answer Answer contains longer sequence [length = 1], but output contains 0 elements

Subtask #2:

score: 0
Wrong Answer

Test #13:

score: 0
Wrong Answer
time: 0ms
memory: 3632kb

input:

40 816 1 285
46 124 125 137 90 33 15 73 67 41 134 106 3 163 152 151 14 77 157 82 40 9 151 148 60 60 163 71 40 134 152 145 70 59 26 64 94 38 158 57
2 2 1 1 1 1 3 3 1 1 3 3 1 3 1 3 2 1 3 3 1 1 2 2 3 2 1 2 1 2 2 1 3 3 3 1 1 1 3 3
1 2 20
1 3 26
2 4 14
3 5 25
1 6 17
4 7 49
1 8 37
1 9 50
2 10 52
4 11 55
2...

output:


result:

wrong answer Answer contains longer sequence [length = 1], but output contains 0 elements

Subtask #3:

score: 0
Wrong Answer

Test #17:

score: 0
Wrong Answer
time: 0ms
memory: 3648kb

input:

60 2 14 266401688520
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
712303980 712303980 712303979 712303980 712303980 712303980 712303980 712303980 712303980 712303980 712303980 712303980 712303980 712303980 712303980 712303980...

output:


result:

wrong answer Answer contains longer sequence [length = 1], but output contains 0 elements

Subtask #4:

score: 0
Skipped

Dependency #1:

0%

Subtask #5:

score: 0
Skipped

Dependency #2:

0%

Subtask #6:

score: 0
Skipped

Dependency #1:

0%