QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#676667#6527. Cyberlandneilliu44 66ms46512kbC++174.6kb2024-10-25 22:57:092024-10-25 22:57:09

Judging History

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

  • [2024-10-25 22:57:09]
  • 评测
  • 测评结果:44
  • 用时:66ms
  • 内存:46512kb
  • [2024-10-25 22:57:09]
  • 提交

answer

//#include "cyberland.h"
//#include <bits/stdc++.h>
//#include <vector>
//using namespace std;
//#define MAXN 100005
//vector<int> edge[MAXN];
//vector<int> lian[MAXN];
//bool ok[MAXN];
//double dis[70][MAXN][2];
//bool vis[70][MAXN];
//struct kkk{
//	int id;
//	int ceng;
//	double w;
//	friend bool operator <(kkk ano1,kkk ano2){
//		if(ano1.ceng == ano2.ceng)
//		return ano1.w > ano2.w;
//		else return ano1.ceng > ano2.ceng;
//	}
//};
//priority_queue<kkk> qq;
//double solve(int N, int M, int K, int H, std::vector<int> x, std::vector<int> y, std::vector<int> c, std::vector<int> arr) {
//	K = min(K,70);
//	for(int i = 0; i < N; i++) edge[i].clear(),lian[i].clear();
//    for(int i = 0; i < N; i++) ok[i] = 0; 
//    for(int i = 0; i < M; i++){
//    	edge[x[i]].push_back(y[i]);
//    	edge[y[i]].push_back(x[i]);
//    	lian[x[i]].push_back(c[i]);
//		lian[y[i]].push_back(c[i]); 
//	}
//	queue<int> q; q.push(0);
//	while(q.size()){
//		int nowx = q.front(); q.pop();
//		if(ok[nowx]) continue;
//		ok[nowx] = 1;
//		if(nowx == H) continue;
//		for(int v : edge[nowx]){
//			q.push(v);
//		}
//	}
//	if(!ok[H]) return -1;
//	for(int i = 0; i <= K; i++){
//		for(int j = 0; j <= N; j++) dis[i][j][0] = dis[i][j][1] = 1e16,vis[i][j] = 0;
//	} 
//	while(qq.size()) qq.pop();
//	for(int i = 0; i < N; i++){
//		if(arr[i] == 0 && ok[i] == 1){
//			 qq.push((kkk){i,0,0});
//			 dis[0][i][1] = 0;
//		}
//	}
//	qq.push((kkk){0,0,0});
//	dis[0][0][1] = 0;
//	double ans = 1e16;
//	int cengok[100];
//	memset(cengok,0,sizeof(cengok));
//	while(qq.size()){
//		int nowx = qq.top().id,ceng = qq.top().ceng; qq.pop();
//		if(vis[ceng][nowx]) continue;
//		vis[ceng][nowx] = 1;
//		if(nowx % N == H && !cengok[ceng]) {
//			ans = min(ans,min(dis[ceng][nowx][0],dis[ceng][nowx][1]));
//			//cengok[ceng] = 1;
//			continue;
//		}
//		if(arr[nowx] == 2 && dis[ceng+1][nowx][0] > dis[ceng][nowx][1] / 2.0 && ceng < K){
//			dis[ceng+1][nowx][0] = dis[ceng][nowx][1] / 2.0;
//			qq.push((kkk){nowx,ceng+1,dis[ceng+1][nowx][0]});
//		}
//		for(int vv = 0; vv < edge[nowx].size(); vv++){
//			int v = edge[nowx][vv];
//				if(dis[ceng][v][1] > min(dis[ceng][nowx][0],dis[ceng][nowx][1]) + lian[nowx][vv]){
//					dis[ceng][v][1] = min(dis[ceng][nowx][0],dis[ceng][nowx][1]) + lian[nowx][vv];
//					qq.push((kkk){v,ceng,dis[ceng][v][1]});
//				}
//		}
//	}
//	return ans;
//}
#include "cyberland.h"
#include <bits/stdc++.h>
#include <vector>
using namespace std;
#define MAXN 100005
vector<int> edge[MAXN];
vector<int> lian[MAXN];
bool ok[MAXN];
double dis[70][MAXN];
bool vis[70][MAXN];
struct kkk{
	int id;
	int ceng;
	double w;
	friend bool operator <(kkk ano1,kkk ano2){
		if(ano1.ceng == ano2.ceng) return ano1.w > ano2.w;
		else return ano1.ceng > ano2.ceng;
	}
};
priority_queue<kkk> qq;
double solve(int N, int M, int K, int H, std::vector<int> x, std::vector<int> y, std::vector<int> c, std::vector<int> arr) {
	K = min(K,70);
	for(int i = 0; i < N; i++) edge[i].clear(),lian[i].clear();
    for(int i = 0; i < N; i++) ok[i] = 0; 
    for(int i = 0; i < M; i++){
    	edge[x[i]].push_back(y[i]);
    	edge[y[i]].push_back(x[i]);
    	lian[x[i]].push_back(c[i]);
		lian[y[i]].push_back(c[i]); 
	}
	queue<int> q; q.push(0);
	while(q.size()){
		int nowx = q.front(); q.pop();
		if(ok[nowx]) continue;
		ok[nowx] = 1;
		if(nowx == H) continue;
		for(int v : edge[nowx]){
			q.push(v);
		}
	}
	if(!ok[H]) return -1;
	for(int i = 0; i <= K; i++){
		for(int j = 0; j <= N; j++) dis[i][j] = 1e16,vis[i][j] = 0;
	} 
	while(qq.size()) qq.pop();
	for(int i = 0; i < N; i++){
		if(arr[i] == 0 && ok[i] == 1){
			 qq.push((kkk){i,0,0});
			 dis[0][i] = 0;
		}
	}
	qq.push((kkk){0,0,0});
	dis[0][0] = 0;
	double ans = 1e16;
	int cengok[100];
	memset(cengok,0,sizeof(cengok));
	while(qq.size()){
		int nowx = qq.top().id,ceng = qq.top().ceng; qq.pop();
		if(cengok[ceng]) continue;
		if(vis[ceng][nowx]) continue;
		vis[ceng][nowx] = 1;
		if(nowx % N == H && !cengok[ceng]) {
			ans = min(ans,min(dis[ceng][nowx],dis[ceng][nowx]));
			cengok[ceng] = 1;
			continue;
		}
		for(int vv = 0; vv < edge[nowx].size(); vv++){
			int v = edge[nowx][vv];
				if(dis[ceng][v] > min(dis[ceng][nowx],dis[ceng][nowx]) + lian[nowx][vv]){
					dis[ceng][v] = min(dis[ceng][nowx],dis[ceng][nowx]) + lian[nowx][vv];
					qq.push((kkk){v,ceng,dis[ceng][v]});
				}
				if(arr[nowx] == 2 && dis[ceng+1][v] > (dis[ceng][nowx] + lian[nowx][vv]) / 2.0 && ceng < K){
					dis[ceng+1][v] = (dis[ceng][nowx] + lian[nowx][vv]) / 2.0;
					qq.push((kkk){v,ceng+1,dis[ceng+1][v]});
				}
		}
	}
	return ans;
}

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 0
Wrong Answer

Test #1:

score: 0
Wrong Answer
time: 7ms
memory: 38480kb

input:

10000
2 1 30
1
1 1
1 0 13080
3 3 30
1
1 1 1
0 2 25242
2 1 13399
1 0 2123
2 1 30
1
1 1
0 1 11947
2 1 30
1
1 1
0 1 27361
3 0 30
2
1 0 1
2 0 30
1
1 1
3 2 30
1
1 1 2
1 2 23211
0 1 9991
3 1 30
1
1 1 1
2 1 3093
2 1 30
1
1 1
1 0 10703
2 1 30
1
1 1
0 1 15754
2 1 30
1
1 1
1 0 18752
2 1 30
1
1 1
1 0 2300
2 1 ...

output:

a9100fda0a7059a979d560b8550f715d4ee391ff9b8b680b2f87b26a69ee5a5e
13080.000000000000000
2123.000000000000000
11947.000000000000000
27361.000000000000000
-1.000000000000000
-1.000000000000000
9991.000000000000000
-1.000000000000000
10703.000000000000000
15754.000000000000000
18752.000000000000000
2300...

result:

wrong answer Wrong Answer.

Subtask #2:

score: 8
Accepted

Test #3:

score: 8
Accepted
time: 7ms
memory: 38556kb

input:

100
982 981 30
107
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 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 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...

output:

a9100fda0a7059a979d560b8550f715d4ee391ff9b8b680b2f87b26a69ee5a5e
2890510903.000000000000000
3821686160.000000000000000
1609473865.000000000000000
2750149399.000000000000000
2417101128.000000000000000
2097280135.000000000000000
1128830384.000000000000000
2431381306.000000000000000
2235988284.00000000...

result:

ok Correct.

Test #4:

score: 8
Accepted
time: 12ms
memory: 38124kb

input:

100
433 432 30
419
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 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 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...

output:

a9100fda0a7059a979d560b8550f715d4ee391ff9b8b680b2f87b26a69ee5a5e
5466448077.000000000000000
2727503607.000000000000000
4869467484.000000000000000
5710628002.000000000000000
921465181.000000000000000
1812475869.000000000000000
2553966161.000000000000000
3569153499.000000000000000
2282881526.000000000...

result:

ok Correct.

Test #5:

score: 8
Accepted
time: 11ms
memory: 38988kb

input:

100
889 888 30
423
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 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 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...

output:

a9100fda0a7059a979d560b8550f715d4ee391ff9b8b680b2f87b26a69ee5a5e
4348584915.000000000000000
2785817041.000000000000000
3171683181.000000000000000
6184805682.000000000000000
4923578532.000000000000000
5611607743.000000000000000
1395154513.000000000000000
2374890690.000000000000000
4186075668.00000000...

result:

ok Correct.

Test #6:

score: 8
Accepted
time: 16ms
memory: 35684kb

input:

100
460 459 30
374
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 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 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...

output:

a9100fda0a7059a979d560b8550f715d4ee391ff9b8b680b2f87b26a69ee5a5e
1654315324.000000000000000
2059633004.000000000000000
827651507.000000000000000
3929632837.000000000000000
4181481309.000000000000000
4767712780.000000000000000
5026510285.000000000000000
1132800793.000000000000000
2563052680.000000000...

result:

ok Correct.

Test #7:

score: 8
Accepted
time: 12ms
memory: 39368kb

input:

100
168 167 30
72
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 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 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

output:

a9100fda0a7059a979d560b8550f715d4ee391ff9b8b680b2f87b26a69ee5a5e
3440203584.000000000000000
4049533446.000000000000000
3406405690.000000000000000
1157696694.000000000000000
2542318284.000000000000000
4552335199.000000000000000
4249993453.000000000000000
2221442978.000000000000000
758195400.000000000...

result:

ok Correct.

Test #8:

score: 8
Accepted
time: 15ms
memory: 36804kb

input:

10
2146 2145 30
114
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 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 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

output:

a9100fda0a7059a979d560b8550f715d4ee391ff9b8b680b2f87b26a69ee5a5e
4604436479.000000000000000
3959689549.000000000000000
3081184947.000000000000000
2878984439.000000000000000
3587121437.000000000000000
2534081222.000000000000000
1718547061.000000000000000
4868284834.000000000000000
2439965581.00000000...

result:

ok Correct.

Test #9:

score: 8
Accepted
time: 10ms
memory: 40072kb

input:

10
4889 4888 30
4837
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 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 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...

output:

a9100fda0a7059a979d560b8550f715d4ee391ff9b8b680b2f87b26a69ee5a5e
3313627885.000000000000000
5701734576.000000000000000
5284916648.000000000000000
1867035635.000000000000000
2371326783.000000000000000
4872870443.000000000000000
4928988750.000000000000000
3781067292.000000000000000
7035274238.00000000...

result:

ok Correct.

Test #10:

score: 8
Accepted
time: 7ms
memory: 40964kb

input:

1
19563 19562 30
17649
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 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 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...

output:

a9100fda0a7059a979d560b8550f715d4ee391ff9b8b680b2f87b26a69ee5a5e
6313320244.000000000000000
a9100fda0a7059a979d560b8550f715d4ee391ff9b8b680b2f87b26a69ee5a5e

result:

ok Correct.

Test #11:

score: 8
Accepted
time: 14ms
memory: 39204kb

input:

1000
68 67 30
36
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 1 1 1 1 1 1 1 1
1 0 409149481
2 1 520201015
3 2 605130760
4 2 400647948
5 4 962899085
6 0 612744294
7 4 844263436
8 2 117687154
9 7 768251332
10 9 920755872
11 2 8...

output:

a9100fda0a7059a979d560b8550f715d4ee391ff9b8b680b2f87b26a69ee5a5e
2000431212.000000000000000
2088421998.000000000000000
383460986.000000000000000
1863165906.000000000000000
894932266.000000000000000
1435507968.000000000000000
3754982620.000000000000000
2548744207.000000000000000
912333289.00000000000...

result:

ok Correct.

Test #12:

score: 8
Accepted
time: 12ms
memory: 38520kb

input:

1000
61 60 30
8
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 1
1 0 192055571
2 0 589934167
3 2 879659855
4 0 126507466
5 2 540310167
6 1 430214589
7 5 315950459
8 6 81168716
9 3 814436520
10 8 622184631
11 5 9002670
12 2 7235...

output:

a9100fda0a7059a979d560b8550f715d4ee391ff9b8b680b2f87b26a69ee5a5e
703438876.000000000000000
3864424862.000000000000000
2708815450.000000000000000
925417979.000000000000000
1479246813.000000000000000
3797352681.000000000000000
1168500578.000000000000000
997045830.000000000000000
1943619241.00000000000...

result:

ok Correct.

Subtask #3:

score: 13
Accepted

Dependency #2:

100%
Accepted

Test #13:

score: 13
Accepted
time: 13ms
memory: 38540kb

input:

100
13 12 30
12
1 1 0 1 1 0 0 0 0 0 1 1 1
1 0 612949774
2 0 918186410
3 0 549451784
4 3 52491453
5 3 39361617
6 5 762672334
7 1 690365436
8 0 781197787
9 0 730324427
10 6 722788760
11 6 974046930
12 5 991661776
352 351 30
162
1 0 0 1 1 0 1 0 0 0 0 0 0 1 0 1 0 1 0 0 0 1 0 0 0 1 0 0 0 1 0 1 1 1 1 1 1 ...

output:

a9100fda0a7059a979d560b8550f715d4ee391ff9b8b680b2f87b26a69ee5a5e
991661776.000000000000000
979662989.000000000000000
649433802.000000000000000
656015320.000000000000000
1593877905.000000000000000
776094022.000000000000000
955724530.000000000000000
379513132.000000000000000
552099557.000000000000000
...

result:

ok Correct.

Test #14:

score: 13
Accepted
time: 12ms
memory: 38380kb

input:

100
377 376 30
225
1 1 1 0 1 0 1 1 0 1 1 0 1 1 0 0 1 0 0 1 1 1 1 1 0 0 1 0 1 1 0 0 1 1 0 0 1 0 1 1 1 1 0 0 1 0 0 0 0 0 1 0 1 0 0 1 1 0 0 0 0 1 0 0 0 0 0 0 1 1 0 1 0 0 0 1 0 1 1 1 0 0 1 0 0 1 0 1 1 0 1 0 1 0 0 1 1 0 0 1 1 1 0 0 0 0 1 1 1 1 1 1 1 0 1 0 0 1 1 0 0 0 0 1 0 1 1 0 1 1 0 0 1 0 1 0 0 0 0 0 1...

output:

a9100fda0a7059a979d560b8550f715d4ee391ff9b8b680b2f87b26a69ee5a5e
269269789.000000000000000
276978773.000000000000000
454987083.000000000000000
2510659248.000000000000000
109156075.000000000000000
303238554.000000000000000
390081665.000000000000000
699500278.000000000000000
408608508.000000000000000
...

result:

ok Correct.

Test #15:

score: 13
Accepted
time: 12ms
memory: 39260kb

input:

100
828 827 30
151
1 0 1 1 0 0 1 1 1 1 1 1 0 0 1 1 0 1 0 1 0 0 1 1 0 1 1 0 0 0 0 0 1 1 1 1 0 1 0 0 1 1 1 1 0 1 1 0 1 1 0 1 1 0 0 1 0 1 0 1 0 1 1 1 1 0 0 0 0 0 1 1 1 1 1 1 0 1 0 1 1 1 0 0 1 0 1 1 1 0 1 0 0 1 0 0 1 0 1 0 1 1 0 1 1 0 1 0 0 1 1 1 1 1 0 1 0 1 1 0 1 0 0 0 1 1 1 0 0 1 0 0 1 1 1 0 1 1 0 0 0...

output:

a9100fda0a7059a979d560b8550f715d4ee391ff9b8b680b2f87b26a69ee5a5e
290365980.000000000000000
516977689.000000000000000
502467117.000000000000000
1445108754.000000000000000
1088993175.000000000000000
1378915153.000000000000000
960086665.000000000000000
482858007.000000000000000
396904981.00000000000000...

result:

ok Correct.

Test #16:

score: 13
Accepted
time: 17ms
memory: 35860kb

input:

1000
61 60 30
15
1 1 1 0 0 1 0 1 0 1 1 0 0 1 0 1 0 0 1 1 1 1 1 1 0 0 0 1 0 0 1 0 0 1 1 1 0 1 1 0 1 1 1 1 1 1 0 1 1 0 0 1 0 1 1 0 0 1 0 1 0
1 0 323257963
2 1 252372968
3 0 863959919
4 1 291367611
5 2 846374577
6 4 60039837
7 0 962594844
8 5 410232119
9 2 469439078
10 6 648030889
11 1 491212773
12 3 5...

output:

a9100fda0a7059a979d560b8550f715d4ee391ff9b8b680b2f87b26a69ee5a5e
581673275.000000000000000
1232976114.000000000000000
224283203.000000000000000
130597896.000000000000000
186674762.000000000000000
605223153.000000000000000
591792132.000000000000000
735302813.000000000000000
68987879.000000000000000
1...

result:

ok Correct.

Test #17:

score: 13
Accepted
time: 12ms
memory: 35744kb

input:

1000
97 96 30
72
1 0 1 1 0 1 0 1 1 1 0 1 0 0 1 1 1 0 1 0 1 1 1 0 0 0 0 0 1 1 0 1 1 0 1 1 1 0 0 0 1 1 0 0 0 0 0 0 1 1 1 1 1 0 0 0 1 0 0 1 0 0 0 1 0 1 0 0 0 0 1 1 1 0 0 0 0 1 0 1 1 1 1 0 0 1 1 0 1 0 0 0 0 1 0 0 1
1 0 77209775
2 0 158346983
3 0 145087899
4 3 839167140
5 1 399629222
6 3 801549656
7 1 94...

output:

a9100fda0a7059a979d560b8550f715d4ee391ff9b8b680b2f87b26a69ee5a5e
1019269430.000000000000000
1538848016.000000000000000
794783499.000000000000000
441627147.000000000000000
2605988222.000000000000000
794332560.000000000000000
286338215.000000000000000
1066607589.000000000000000
498276624.0000000000000...

result:

ok Correct.

Test #18:

score: 13
Accepted
time: 0ms
memory: 39928kb

input:

1
8044 8043 30
63
1 0 0 0 0 0 1 0 1 0 0 0 0 0 0 1 1 1 1 0 1 1 1 1 1 1 1 0 0 0 0 0 1 1 0 0 1 1 0 1 0 1 0 1 1 0 0 1 0 0 0 0 1 0 0 1 0 0 0 1 1 0 0 1 0 0 1 0 0 1 0 0 0 0 1 0 1 1 1 1 1 0 0 1 1 0 0 0 0 1 1 0 1 0 1 0 0 1 0 1 1 1 1 1 1 0 1 1 0 0 0 1 1 1 1 1 0 0 1 1 1 1 0 1 1 1 1 1 1 0 1 0 1 0 1 1 0 0 0 1 1 ...

output:

a9100fda0a7059a979d560b8550f715d4ee391ff9b8b680b2f87b26a69ee5a5e
150836119.000000000000000
a9100fda0a7059a979d560b8550f715d4ee391ff9b8b680b2f87b26a69ee5a5e

result:

ok Correct.

Subtask #4:

score: 0
Wrong Answer

Test #19:

score: 0
Wrong Answer
time: 65ms
memory: 46512kb

input:

1
58243 58242 30
14059
1 2 0 1 0 2 2 0 0 0 1 0 2 0 2 1 2 1 0 0 0 2 1 0 0 0 0 1 2 1 0 2 0 2 2 2 2 2 0 0 2 2 1 2 1 2 0 2 2 1 2 0 0 1 0 0 0 0 2 2 0 0 2 2 1 0 0 0 2 2 0 1 2 1 0 2 0 0 2 0 1 0 2 1 2 2 1 1 2 1 2 1 2 2 0 1 0 1 1 2 1 2 2 1 0 1 2 1 2 1 0 2 2 2 1 2 0 1 0 1 0 1 2 0 0 0 2 2 1 1 1 2 0 1 2 2 2 2 1...

output:

a9100fda0a7059a979d560b8550f715d4ee391ff9b8b680b2f87b26a69ee5a5e
1017011461.106542706489563
a9100fda0a7059a979d560b8550f715d4ee391ff9b8b680b2f87b26a69ee5a5e

result:

wrong answer Wrong Answer.

Subtask #5:

score: 7
Accepted

Test #24:

score: 7
Accepted
time: 11ms
memory: 38676kb

input:

100
442 637 30
269
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 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 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...

output:

a9100fda0a7059a979d560b8550f715d4ee391ff9b8b680b2f87b26a69ee5a5e
2587209245.000000000000000
-1.000000000000000
3649459267.000000000000000
-1.000000000000000
5454642919.000000000000000
3957060220.000000000000000
-1.000000000000000
1779591226.000000000000000
819344528.000000000000000
3336087675.000000...

result:

ok Correct.

Test #25:

score: 7
Accepted
time: 16ms
memory: 38288kb

input:

100
816 984 30
144
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 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 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...

output:

a9100fda0a7059a979d560b8550f715d4ee391ff9b8b680b2f87b26a69ee5a5e
2196802496.000000000000000
1698012587.000000000000000
-1.000000000000000
2648505981.000000000000000
5562489050.000000000000000
-1.000000000000000
571443644.000000000000000
2146114662.000000000000000
2940739290.000000000000000
110581265...

result:

ok Correct.

Test #26:

score: 7
Accepted
time: 11ms
memory: 35784kb

input:

100
418 122 30
296
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 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 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...

output:

a9100fda0a7059a979d560b8550f715d4ee391ff9b8b680b2f87b26a69ee5a5e
-1.000000000000000
-1.000000000000000
2120104592.000000000000000
3953379855.000000000000000
226409214.000000000000000
351470745.000000000000000
-1.000000000000000
159520078.000000000000000
-1.000000000000000
4264953349.000000000000000
...

result:

ok Correct.

Test #27:

score: 7
Accepted
time: 15ms
memory: 39616kb

input:

10
2338 1039 30
2107
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 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 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...

output:

a9100fda0a7059a979d560b8550f715d4ee391ff9b8b680b2f87b26a69ee5a5e
-1.000000000000000
2806505467.000000000000000
7058408824.000000000000000
272797954.000000000000000
-1.000000000000000
2156140916.000000000000000
1446195287.000000000000000
-1.000000000000000
7134487400.000000000000000
293822773.0000000...

result:

ok Correct.

Test #28:

score: 7
Accepted
time: 14ms
memory: 38536kb

input:

1000
58 54 30
3
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
10 19 288992106
34 18 960341288
13 23 666569767
54 22 752721472
39 21 976259448
33 2 88954838
55 29 222119438
54 33 399272840
16 26 257680697
21 43 349971395
57 13 4315...

output:

a9100fda0a7059a979d560b8550f715d4ee391ff9b8b680b2f87b26a69ee5a5e
3115892415.000000000000000
-1.000000000000000
1706294576.000000000000000
-1.000000000000000
213494866.000000000000000
-1.000000000000000
1076679737.000000000000000
-1.000000000000000
-1.000000000000000
1259768210.000000000000000
-1.000...

result:

ok Correct.

Subtask #6:

score: 16
Accepted

Dependency #5:

100%
Accepted

Test #29:

score: 16
Accepted
time: 7ms
memory: 35916kb

input:

100
827 892 30
233
1 1 0 0 1 0 0 1 0 1 1 1 1 1 1 1 0 1 0 0 1 0 1 1 0 1 0 0 1 1 0 1 0 1 1 1 0 1 0 1 0 1 1 1 1 1 1 1 0 1 1 0 1 1 0 0 0 1 0 1 0 1 1 0 0 0 1 1 0 1 0 1 1 0 0 0 1 0 1 0 1 0 0 0 1 0 0 1 1 1 1 0 0 1 0 1 0 1 1 0 0 0 1 1 0 0 0 0 0 1 0 1 0 1 0 1 0 1 1 0 1 0 0 0 0 1 0 0 0 0 1 0 1 0 1 0 0 1 1 1 0...

output:

a9100fda0a7059a979d560b8550f715d4ee391ff9b8b680b2f87b26a69ee5a5e
44345190.000000000000000
1652411868.000000000000000
76660251.000000000000000
204288289.000000000000000
27421640.000000000000000
211358346.000000000000000
-1.000000000000000
1154344180.000000000000000
366704209.000000000000000
545790148...

result:

ok Correct.

Test #30:

score: 16
Accepted
time: 11ms
memory: 38656kb

input:

100
488 462 30
448
1 1 0 1 0 0 0 0 1 1 0 1 1 0 0 0 0 1 0 0 0 1 0 0 0 1 0 1 1 0 0 0 0 0 1 1 0 0 0 0 0 1 1 0 1 0 1 0 0 1 1 0 1 1 0 0 0 1 1 0 1 0 0 1 1 1 0 0 0 0 1 1 0 1 0 1 0 0 0 0 1 0 0 1 0 0 1 0 0 0 0 0 0 1 0 0 0 0 1 0 1 0 0 0 0 0 0 1 1 1 1 0 1 0 0 0 0 1 1 1 1 0 1 0 0 0 1 0 1 0 0 0 1 1 1 0 0 0 0 0 0...

output:

a9100fda0a7059a979d560b8550f715d4ee391ff9b8b680b2f87b26a69ee5a5e
-1.000000000000000
39736705.000000000000000
-1.000000000000000
105156377.000000000000000
264037699.000000000000000
92604876.000000000000000
30926259.000000000000000
60699564.000000000000000
40200749.000000000000000
512360338.0000000000...

result:

ok Correct.

Test #31:

score: 16
Accepted
time: 33ms
memory: 16796kb

input:

1
75628 77960 30
2128
1 1 0 1 1 0 0 1 0 0 0 1 1 0 0 0 1 1 1 1 1 1 0 0 0 1 0 1 0 0 1 1 0 1 0 1 0 1 1 0 0 0 0 1 0 1 0 1 1 1 0 1 1 1 1 1 1 0 1 1 1 0 1 1 0 1 0 1 0 0 1 1 1 0 1 1 0 0 1 1 0 0 1 0 0 0 0 1 1 1 1 1 0 0 1 1 0 0 1 1 0 0 0 1 1 0 1 1 1 1 1 1 1 0 0 1 0 1 0 1 1 1 0 1 0 0 0 0 0 1 0 0 1 0 0 1 0 0 0 ...

output:

a9100fda0a7059a979d560b8550f715d4ee391ff9b8b680b2f87b26a69ee5a5e
-1.000000000000000
a9100fda0a7059a979d560b8550f715d4ee391ff9b8b680b2f87b26a69ee5a5e

result:

ok Correct.

Test #32:

score: 16
Accepted
time: 4ms
memory: 40020kb

input:

10
2249 243 30
1355
1 0 0 0 1 1 1 0 0 1 0 1 0 1 0 1 0 1 0 0 0 1 0 0 1 1 1 1 1 0 0 0 1 0 0 0 1 1 1 0 1 1 0 0 1 1 1 1 1 1 0 1 0 1 0 0 0 1 1 1 0 1 0 0 1 0 0 0 0 1 1 1 0 0 1 1 0 0 1 0 0 0 1 0 0 0 1 1 1 1 1 0 0 1 1 0 0 1 0 0 1 1 0 0 1 0 0 1 0 0 1 1 0 0 0 1 1 0 0 1 1 0 0 0 1 0 1 0 1 1 1 0 0 0 1 1 0 1 1 0 ...

output:

a9100fda0a7059a979d560b8550f715d4ee391ff9b8b680b2f87b26a69ee5a5e
-1.000000000000000
-1.000000000000000
-1.000000000000000
37574925.000000000000000
126609413.000000000000000
-1.000000000000000
-1.000000000000000
2515625.000000000000000
286520594.000000000000000
135752641.000000000000000
a9100fda0a705...

result:

ok Correct.

Test #33:

score: 16
Accepted
time: 11ms
memory: 39032kb

input:

1000
44 49 30
23
1 1 1 1 1 0 0 1 0 0 0 1 1 1 1 1 0 1 1 0 0 0 1 1 1 0 0 0 0 0 1 1 0 0 0 0 0 0 0 1 1 0 1 1
27 42 225126945
32 8 302015535
18 30 492272908
9 24 904931059
40 7 466676590
1 18 581979365
30 9 778013597
31 27 460075665
16 41 474819876
4 5 576352554
38 16 79713465
5 34 768724234
20 32 643137...

output:

a9100fda0a7059a979d560b8550f715d4ee391ff9b8b680b2f87b26a69ee5a5e
-1.000000000000000
1319592467.000000000000000
-1.000000000000000
253259229.000000000000000
631899095.000000000000000
78303687.000000000000000
519279842.000000000000000
-1.000000000000000
52717825.000000000000000
333261049.0000000000000...

result:

ok Correct.

Test #34:

score: 16
Accepted
time: 12ms
memory: 38368kb

input:

100
263 439 30
171
1 1 1 0 0 1 1 0 1 1 0 1 1 1 1 0 1 0 0 0 1 0 1 0 0 1 0 0 1 1 1 1 0 0 0 0 0 1 0 1 0 0 0 0 1 0 0 0 1 1 0 1 0 1 1 1 1 0 0 0 1 1 1 1 1 0 1 1 1 0 1 0 0 0 0 1 0 0 0 1 1 1 1 1 0 1 0 0 1 0 0 1 0 0 1 1 1 1 0 0 0 0 1 0 1 1 0 0 0 0 0 1 1 0 1 0 0 0 0 0 1 0 1 1 1 0 0 1 0 0 1 0 0 1 0 0 0 1 1 0 0...

output:

a9100fda0a7059a979d560b8550f715d4ee391ff9b8b680b2f87b26a69ee5a5e
430641097.000000000000000
203318467.000000000000000
-1.000000000000000
-1.000000000000000
-1.000000000000000
-1.000000000000000
309068853.000000000000000
466208173.000000000000000
-1.000000000000000
62451163.000000000000000
-1.00000000...

result:

ok Correct.

Subtask #7:

score: 0
Wrong Answer

Dependency #6:

100%
Accepted

Test #35:

score: 0
Wrong Answer
time: 66ms
memory: 35812kb

input:

100
677 1 30
48
1 2 2 1 2 1 2 0 0 1 2 2 2 0 1 2 0 2 2 2 0 0 1 1 1 0 2 0 0 0 1 0 2 0 0 1 1 2 2 1 2 0 0 0 2 2 0 2 1 1 0 1 1 1 2 2 0 0 2 0 1 1 1 0 1 2 1 1 1 0 1 2 2 2 1 2 2 1 0 2 2 1 1 1 1 2 2 1 2 2 0 2 1 2 1 0 1 0 2 0 1 2 0 2 2 2 0 0 1 1 2 0 0 1 2 0 2 0 0 1 2 1 1 0 1 0 0 0 2 2 1 1 0 1 1 2 1 2 0 1 2 2 ...

output:

a9100fda0a7059a979d560b8550f715d4ee391ff9b8b680b2f87b26a69ee5a5e
-1.000000000000000
-1.000000000000000
1205837607.250000000000000
369376864.000000000000000
-1.000000000000000
180213166.500000000000000
-1.000000000000000
143601774.308427453041077
268399792.500000000000000
540702513.000000000000000
49...

result:

wrong answer Wrong Answer.

Subtask #8:

score: 0
Skipped

Dependency #1:

0%