QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#874642#9689. 伪伪随机JohnAlfnov#5 61ms4608kbC++14968b2025-01-28 12:49:232025-01-28 12:49:23

Judging History

This is the latest submission verdict.

  • [2025-01-28 12:49:23]
  • Judged
  • Verdict: 5
  • Time: 61ms
  • Memory: 4608kb
  • [2025-01-28 12:49:23]
  • Submitted

answer

#include "prg.h"
#include<bits/stdc++.h>
using namespace std;
int solve(int n,int m,int k,vector<int>op,array<vector<int>,3000>x,int c,array<array<int,3000>,25>s){
	if(k==2){
		int a1=0,a2=0;
		for(int i=0;i<c;++i){
			int h=0;
			for(int j=0;j<m;++j){
				h+=s[i][j];
			}
			if(h>=(m/4+m/2)/2&&h<=(m*3/4+m/2)/2)++a1;
			else ++a2;
		}
		return (a2<=1?1:2);
	}
	if(k>=3&&op[k-2]!=2){
		int a1=0,a2=0;
		for(int i=0;i<c;++i){
			int h=0;
			for(int j=0;j<m;++j){
				h+=s[i][j];
			}
			if(h>=m/2-m/16&&h<=m/2+m/16)++a1;
			else ++a2;
		}
		return (a2<=1?1:2);
	}
	vector<vector<int>>gs(n);
	for(int i=0;i<m;++i){
		gs[x[i][2]].emplace_back(i);
	}
	int mn=0,ms=0;
	for(int i=0;i<n;++i)if((signed)gs[i].size()>=2){
		int t=gs[i].size(),kn=0;
		for(int j=0;j<c;++j){
			int h=0;
			for(auto k:gs[i]){
				h+=s[j][k];
			}
			if(h==0||h==t)++kn;
		}
		mn+=kn;++ms;
	}
	if(1.0*mn/ms>6.1)return 2;
//	assert(0);
	return 1;
}

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 5
Accepted

Test #1:

score: 5
Accepted
time: 35ms
memory: 4480kb

input:

15478345200793503450
1237460 18364524
21312414

output:

126534127

result:

ok Perfect. Correct in 100 tests.

Test #2:

score: 5
Accepted
time: 37ms
memory: 4352kb

input:

8777328773999050296
1237460 18364524
21312414

output:

126534127

result:

ok Perfect. Correct in 100 tests.

Test #3:

score: 5
Accepted
time: 38ms
memory: 4480kb

input:

8306860370301473558
1237460 18364524
21312414

output:

126534127

result:

ok Perfect. Correct in 100 tests.

Test #4:

score: 5
Accepted
time: 38ms
memory: 4480kb

input:

7355535262167792602
1237460 18364524
21312414

output:

126534127

result:

ok Perfect. Correct in 100 tests.

Test #5:

score: 5
Accepted
time: 38ms
memory: 4480kb

input:

5901033176077457090
1237460 18364524
21312413

output:

126534127

result:

ok Perfect. Correct in 100 tests.

Test #6:

score: 5
Accepted
time: 37ms
memory: 4480kb

input:

6725216784977925179
1237460 18364524
21312414

output:

126534127

result:

ok Perfect. Correct in 100 tests.

Test #7:

score: 5
Accepted
time: 38ms
memory: 4480kb

input:

15228205213107479514
1237460 18364524
21312414

output:

126534127

result:

ok Perfect. Correct in 100 tests.

Test #8:

score: 5
Accepted
time: 38ms
memory: 4480kb

input:

10794704323727532585
1237460 18364524
21312413

output:

126534127

result:

ok Perfect. Correct in 100 tests.

Test #9:

score: 5
Accepted
time: 39ms
memory: 4480kb

input:

1531863096801291235
1237460 18364524
21312414

output:

126534127

result:

ok Perfect. Correct in 100 tests.

Test #10:

score: 5
Accepted
time: 39ms
memory: 4480kb

input:

12583269177593428071
1237460 18364524
21312414

output:

126534127

result:

ok Perfect. Correct in 100 tests.

Test #11:

score: 5
Accepted
time: 37ms
memory: 4480kb

input:

17884260014537450829
1237460 18364524
21312414

output:

126534127

result:

ok Perfect. Correct in 100 tests.

Test #12:

score: 5
Accepted
time: 39ms
memory: 4480kb

input:

5598933293992250528
1237460 18364524
21312414

output:

126534127

result:

ok Perfect. Correct in 100 tests.

Test #13:

score: 5
Accepted
time: 37ms
memory: 4480kb

input:

15029988260575536839
1237460 18364524
21312414

output:

126534127

result:

ok Perfect. Correct in 100 tests.

Test #14:

score: 5
Accepted
time: 37ms
memory: 4480kb

input:

18435900855108017468
1237460 18364524
21312413

output:

126534127

result:

ok Perfect. Correct in 100 tests.

Test #15:

score: 5
Accepted
time: 36ms
memory: 4480kb

input:

4740054765891404200
1237460 18364524
21312414

output:

126534127

result:

ok Perfect. Correct in 100 tests.

Test #16:

score: 5
Accepted
time: 37ms
memory: 4480kb

input:

14854659461851577578
1237460 18364524
21312413

output:

126534127

result:

ok Perfect. Correct in 100 tests.

Test #17:

score: 5
Accepted
time: 37ms
memory: 4480kb

input:

11860421814773748892
1237460 18364524
21312414

output:

126534127

result:

ok Perfect. Correct in 100 tests.

Test #18:

score: 5
Accepted
time: 36ms
memory: 4480kb

input:

2618043996784533224
1237460 18364524
21312413

output:

126534127

result:

ok Perfect. Correct in 100 tests.

Test #19:

score: 5
Accepted
time: 38ms
memory: 4480kb

input:

4729099511370153840
1237460 18364524
21312414

output:

126534127

result:

ok Perfect. Correct in 100 tests.

Test #20:

score: 5
Accepted
time: 37ms
memory: 4480kb

input:

6142100148239098773
1237460 18364524
21312413

output:

126534127

result:

ok Perfect. Correct in 100 tests.

Subtask #2:

score: 0
Wrong Answer

Test #21:

score: 0
Wrong Answer
time: 56ms
memory: 4608kb

input:

15644456504653888385
1237461 18364524
21312413 32673238

output:

126534088

result:

points 0.0 Correct Answer. Correct in 61 tests.

Subtask #3:

score: 0
Wrong Answer

Test #41:

score: 3.11278
Acceptable Answer
time: 50ms
memory: 4608kb

input:

18096446825184275106
1237458 18364525

output:

126534115

result:

points 0.1037593748 Correct Answer. Correct in 88 tests.

Test #42:

score: 0.698321
Acceptable Answer
time: 50ms
memory: 4608kb

input:

14902425508262229602
1237458 18364525

output:

126534112

result:

points 0.0232773511 Correct Answer. Correct in 85 tests.

Test #43:

score: 5.08554
Acceptable Answer
time: 52ms
memory: 4352kb

input:

15139748546799860644
1237458 18364525

output:

126534117

result:

points 0.1695179763 Correct Answer. Correct in 90 tests.

Test #44:

score: 4.05426
Acceptable Answer
time: 51ms
memory: 4480kb

input:

9307674455823252809
1237458 18364525

output:

126534116

result:

points 0.1351420953 Correct Answer. Correct in 89 tests.

Test #45:

score: 2.2467
Acceptable Answer
time: 52ms
memory: 4608kb

input:

3661511870465233329
1237458 18364525

output:

126534114

result:

points 0.0748900705 Correct Answer. Correct in 87 tests.

Test #46:

score: 1.44484
Acceptable Answer
time: 51ms
memory: 4608kb

input:

9635149641212141231
1237458 18364525

output:

126534113

result:

points 0.0481612695 Correct Answer. Correct in 86 tests.

Test #47:

score: 2.2467
Acceptable Answer
time: 53ms
memory: 4608kb

input:

8623126583531512280
1237458 18364525

output:

126534114

result:

points 0.0748900705 Correct Answer. Correct in 87 tests.

Test #48:

score: 0
Wrong Answer
time: 52ms
memory: 4608kb

input:

17542991876646715766
1237458 18364525

output:

126534139

result:

points 0.0 Correct Answer. Correct in 80 tests.

Subtask #4:

score: 0
Wrong Answer

Test #61:

score: 0
Wrong Answer
time: 61ms
memory: 4608kb

input:

6934415118162240981
1237458 18364524
21312414 32673238 236176120

output:

126534086

result:

points 0.0 Correct Answer. Correct in 59 tests.